[USflag] The American Programmer [USflag]


Home
Books on Mainframe Programming
Mainframe Manuals and Tutorials
System Abend codes, Sqlcodes, VSAM/QSAM codes
Everything about the IBM AS/400 Midrange Computer - iSeries
Everything about CICS
Cobol programs, manuals, books
  Sample Cobol code: The Simple, Single File COBOL Program
  Sample Cobol code: The Simple, Single File Report COBOL Program with Record Count or Final Totals
  Sample Cobol code: The Simple, Single File Report COBOL Program with Record Count or Final Totals
  Sample Cobol code: The Sequence Check COBOL Program
  Sample Cobol code: The Record Selection COBOL Program
  Sample Cobol code: The Edit or Validate COBOL Program
  Sample Cobol code: The The One Level Subtotal (Control Break) COBOL Program
  Sample Cobol code: The Three Level Subtotal (Control Break) COBOL Program
  Sample Cobol code: The Sequential File, Batch Update COBOL Program
  Sample Cobol code: The COBOL Sort
  Sample Cobol code: The CASE Structure: COBOL EVALUATE
  Sample Cobol code: Direct Subscripting in COBOL
  Sample Cobol code: The Sequential, or Serial Search in COBOL
  Sample Cobol code: The Binary Search in COBOL
  Sample Cobol code: Loading a Table from a Sequential File in a COBOL program
  Sample Cobol code: The VSAM File Read Sequentially in a COBOL program
  Sample Cobol code: The VSAM KSDS, Read Randomly in a COBOL program
  Sample Cobol code: The VSAM File, Read Randomly in a COBOL program
  Sample Cobol code: VSAM Initial Load in a COBOL program
  Sample Cobol code: VSAM File Maintenance (Add, Change, Delete) in a COBOL program
  Sample Cobol code: VSAM Read Sequentially, with START, in a COBOL program
  Sample Cobol code: Creating a Variable Format File in a COBOL program
  Sample Cobol code: Reading a Variable Format File in a COBOL program
  Sample Cobol code: Creating a Variable Format File with Occurs Depending On in a COBOL program
  Sample Cobol code: COBOL Reading a Variable Format File with Occurs Depending On, in a COBOL program
  Sample Cobol code: COBOL The Table Load with Occurs Depending On
  Sample Cobol/DB2 code: Singleton Select
  Manuals on the COBOL programming language.
  Books on Cobol
  Abend Codes from Cobol programs
Everything about DB2 and SQL
Everything about IMS
Everything about Java and JavaScript
Everything about JCL and JES
Everything about REXX
Everything about zOS, VSAM, Tivoli, Assembler
Everything about TSO, ISPF, Spufi
Site Map and Site Search

           Home   > COBOL   > COBOL program the VSAM File Read Sequentially

The VSAM File Read Sequentially in a COBOL program


16. The VSAM File Read Sequentially

VSAMSEQ1 and VSAMSEQ2.
These two programs are identical, except that VSAMSEQ2 uses the optional VSAM extended status codes for error checking. Use whichever one you prefer.
We have a VSAM KSDS (Key Sequenced Data Set) as input. This file can be read randomly or sequentially. In this first VSAM program we will read it sequentially. We are treating it like an ordinary sequential file, or like a VSAM ESDS (Entry Sequenced Data Set).

You might need to produce a report using the VSAM file. The report will assume that the file is sorted. When reading a KSDS sequentially you will see the records in order, as if they had been sorted. You can do a program with subtotals, provided that the data is actually in sequence by all the fields needed for the subtotals. The VSAM KSDS might be a transaction file or a master file used in a file update program. This is possible because the records will appear in order.

This program will get you familiar with the simple JCL needed for any VSAM file (just DSNAME and DISP.) You will see what the COBOL SELECT statements look like and you will become comfortable with status code checking.

Here are the programs VSAMSEQ1 and VSAMSEQ2:

Compliments of Gabe Gargiulo, author of several recent books on programming and modern languages, available at Amazon.com.



000100 IDENTIFICATION DIVISION.
000200 PROGRAM-ID. VSAMSEQ1.
000300* READ VSAM KSDS SEQUENTIALLY
000400* JUST DISPLAY THE VSAM RECORDS
000500* NOTHING COMPLEX IN THIS PROGRAM
000600* THE LOGIC IS THE SAME AS FOR THE SIMPLE FILE READ SEQUENTIALLY
000700 ENVIRONMENT DIVISION.
000800 CONFIGURATION SECTION.
000900 INPUT-OUTPUT SECTION.
001000 FILE-CONTROL.
001100*    INPUT VSAM FILE IS: TSOUSR1.VSAMKSDS.EMPSORTD
001200*    JCL TO CREATE INPUT FILE IS VSAMDEF.JCL
001300*    USES EMPSORTD INPUT TO JCL
001400*    OF COURSE THE NAMES MAY BE DIFFERENT AT YOUR COMPANY
001500     SELECT VSAM-KSDS-FILE ASSIGN VSAMKSDS
001600        ORGANIZATION IS INDEXED
001700        ACCESS MODE IS SEQUENTIAL
001800*    RECORD KEY NOT NEEDED FOR SEQ READING
001900        RECORD KEY IS VSAM-KSDS-RECORD-KEY
002000        FILE STATUS  IS VSAM-STATUS-CODE
002100                        VSAM-EXTENDED-STATUS-CODE.
002200 DATA DIVISION.
002300 FILE SECTION.
002400
002500 FD  VSAM-KSDS-FILE.
002600 01  VSAM-KSDS-RECORD.
002700*    YOU WON'T BE USING THE NEXT FIELD IN THIS PROGRAM
002800*    BECAUSE YOU ARE READING SEQUENTIALLY, NOT RANDOMLY
002900*    THE 20 MEANS THE KEY FIELD HAS A LENGTH OF 20
003000*    REFER  BACK TO THE JCL WHICH CREATES THE VSAM FILE
003100*    BECAUSE THAT IS WHERE THE 20 COMES FROM
003200*    THE RECORD KEY IS ACTUALLY EMPLOYEE NAME IN THIS DATA FILE
003300     05  VSAM-KSDS-RECORD-KEY    PIC X(20).
003400     05  VSAM-KSDS-EMP-INFO      PIC X(60).
003600 WORKING-STORAGE SECTION.
003700 01  VSAM-STATUS-CODE.
003800     05 VSAM-STATUS-CODE-BYTE1   PIC X.
003900     05 VSAM-STATUS-CODE-BYTE2   PIC X.
004000
004100 01  VSAM-EXTENDED-STATUS-CODE.
004200     05 VSAM-EXTENDED-RETURN-CODE   PIC S9(4) COMP.
004300     05 VSAM-EXTENDED-FUNCTION-CODE PIC S9(4) COMP.
004400     05 VSAM-EXTENDED-FEEDBACK-CODE PIC S9(4) COMP.
004500
004600 01  SWITCHES.
004700      05  FILE-AT-END     PIC X  VALUE 'N'.
004800
004900 PROCEDURE DIVISION.
005000     PERFORM INITIALIZATION
005100     PERFORM PROCESS-ALL
005200         UNTIL FILE-AT-END = 'Y'
005300     PERFORM TERMINATION
005400     GOBACK.
005600 INITIALIZATION.
005700     OPEN INPUT VSAM-KSDS-FILE
005800     IF VSAM-STATUS-CODE IS NOT EQUAL TO '00'
005900     THEN GO TO ERROR-EXIT
006000     END-IF
006100     PERFORM READ-PAR.
006300 PROCESS-ALL.
006400*    THIS PROGRAM IS SIMPLE.
006500*    IT JUST DISPLAYS THE RECORDS OF THE VSAM FILE
006600*    OTHER PROGRAMS WOULD DO MORE INVOLVED PROCESSING
006700     DISPLAY VSAM-KSDS-RECORD
006800     PERFORM READ-PAR.
006900
007000 TERMINATION.
007100     CLOSE VSAM-KSDS-FILE.
007300 READ-PAR.
007400     READ VSAM-KSDS-FILE
007500     AT END MOVE 'Y' TO FILE-AT-END
007600     NOT AT END
007700      IF VSAM-STATUS-CODE IS NOT EQUAL TO '00'
007800      THEN GO TO ERROR-EXIT
007900      END-IF
008000     END-READ.
008200 ERROR-EXIT.
008300*   SEE THE PROGRAM VSAMSEQ2 FOR VSAM STATUS CODES
008400*   AND EXTENDED STATUS CODES
008500*   AND THE REMAINDER OF THIS PARAGRAPH

Here is the input data file userid.VSAMKSDS.EMPSORTD (check to see what name was actually used) (the next two lines are a column ruler)

         1         2         3         4         5         6
123456789.123456789.123456789.123456789.123456789.123456789.12345678
BUD WEIZER          05000  9  0001  0000001  000000
HERB GARDNER        03000  1  0040  0000055  000022
HUGH MUNGUS         06000  1  0200  0000020  000020
L. A. VATOR         07000  5  0020  0000033  000033
PAT A. GONIA        04000  0  0002  0000022  000011
PEARLE E. GATES     01000  2  0010  0000020  000300
PHIL HARMONIC       02000  3  0030  0000050  000020

Here is sample JCL:

//* vsamseq1.jcl
//DEFKSDS  EXEC PGM=IDCAMS
//SYSPRINT DD   SYSOUT=*
//SYSIN    DD   *
 DELETE (userid.VSAMKSDS.EMPSORTD) CLUSTER

 DEFINE CLUSTER -
 (NAME(userid.VSAMKSDS.EMPSORTD) -
  CYLINDERS(1,1) -
  KEYS(20,0) -
  RECORDSIZE(80,80)-
  INDEXED )

 REPRO INFILE(INFILE) OUTDATASET(userid.VSAMKSDS.EMPSORTD)

/*
//INFILE DD   DSN=userid.COBBOOK.DATA(EMPSORTD),DISP=SHR
//*
//STEP1    EXEC PGM=VSAMSEQ1
//STEPLIB DD DSN=your.executable.program.library.goes.here,DISP=SHR
//*OF COURSE, THE NEXT DATASET NAME MAY BE DIFFERENT AT YOUR COMPANY
//VSAMKSDS  DD   DSN=userid.VSAMKSDS.EMPSORTD,DISP=SHR
//SYSOUT    DD   SYSOUT=*
//SYSUDUMP  DD   SYSOUT=*
//SYSABOUT  DD   SYSOUT=*
//SYSDBOUT  DD   SYSOUT=*
//*

Here is the program VSAMSEQ2:

000100 IDENTIFICATION DIVISION.
000200 PROGRAM-ID. VSAMSEQ2.
000300*  THIS PROGRAM IS THE SAME AS VSAMSEQ1,
000400*   EXCEPT THAT THIS ONE USES EXTENDED VSAM STATUS CODES.
000500* READ VSAM KSDS SEQUENTIALLY
000600* JUST DISPLAY THE VSAM RECORDS
000700* NOTHING COMPLEX IN THIS PROGRAM
000800* THE LOGIC IS THE SAME AS FOR THE SIMPLE FILE READ SEQUENTIALLY
000900 ENVIRONMENT DIVISION.
001000 CONFIGURATION SECTION.
001100 INPUT-OUTPUT SECTION.
001200 FILE-CONTROL.
001300*    INPUT VSAM FILE IS: TSOUSR1.VSAMKSDS.EMPSORTD
001400*    JCL TO CREATE INPUT FILE IS VSAMDEF.JCL
001500*    USES EMPSORTD AS INPUT TO JCL
001600*    OF COURSE THE NAMES MAY BE DIFFERENT AT YOUR COMPANY
001700     SELECT VSAM-KSDS-FILE ASSIGN VSAMKSDS
001800        ORGANIZATION IS INDEXED
001900        ACCESS MODE IS SEQUENTIAL
002000*    RECORD KEY NOT NEEDED FOR SEQ READING
002100        RECORD KEY IS VSAM-KSDS-RECORD-KEY
002200        FILE STATUS  IS VSAM-STATUS-CODE
002300                        VSAM-EXTENDED-STATUS-CODE.
002400 DATA DIVISION.
002500 FILE SECTION.
002600
002700 FD  VSAM-KSDS-FILE.
002800 01  VSAM-KSDS-RECORD.
002900*    YOU WON'T BE USING THE NEXT FIELD IN THIS PROGRAM
003000*    BECAUSE YOU ARE READING SEQUENTIALLY, NOT RANDOMLY
003100*    THE 20 MEANS THE KEY FIELD HAS A LENGTH OF 20
003200*    REFER  BACK TO THE JCL WHICH CREATES THE VSAM FILE
003300*    BECAUSE THAT IS WHERE THE 20 COMES FROM
003400*    THE RECORD KEY IS ACTUALLY EMPLOYEE NAME IN THIS DATA FILE
003500     05  VSAM-KSDS-RECORD-KEY    PIC X(20).
003600     05  VSAM-KSDS-EMP-INFO    PIC X(60).
003700
003800
003900 WORKING-STORAGE SECTION.
004000
004100 01  VSAM-STATUS-CODE.
004200     05 VSAM-STATUS-CODE-BYTE1   PIC X.
004300     05 VSAM-STATUS-CODE-BYTE2   PIC X.
004400
004500 01  VSAM-EXTENDED-STATUS-CODE.
004600     05 VSAM-EXTENDED-RETURN-CODE   PIC S9(4) COMP.
004700     05 VSAM-EXTENDED-FUNCTION-CODE PIC S9(4) COMP.
004800     05 VSAM-EXTENDED-FEEDBACK-CODE PIC S9(4) COMP.
004900
005000 01  SWITCHES.
005100      05  FILE-AT-END     PIC X  VALUE 'N'.
005300 PROCEDURE DIVISION.
005400     PERFORM INITIALIZATION
005500     PERFORM PROCESS-ALL
005600         UNTIL FILE-AT-END = 'Y'
005700     PERFORM TERMINATION
005800     GOBACK.
005900
006000 INITIALIZATION.
006100     OPEN INPUT VSAM-KSDS-FILE
006200     IF VSAM-STATUS-CODE IS NOT EQUAL TO '00'
006300     THEN GO TO ERROR-EXIT
006400     END-IF
006500     PERFORM READ-PAR.
006600
006700 PROCESS-ALL.
006800*    THIS PROGRAM IS SIMPLE.
006900*    IT JUST DISPLAYS THE RECORDS OF THE VSAM FILE
007000*    OTHER PROGRAMS WOULD DO MORE INVOLVED PROCESSING
007100     DISPLAY VSAM-KSDS-RECORD
007200     PERFORM READ-PAR.
007300
007400 TERMINATION.
007500     CLOSE VSAM-KSDS-FILE.
007600
007700 READ-PAR.
007800     READ VSAM-KSDS-FILE
007900     AT END MOVE 'Y' TO FILE-AT-END
008000     NOT AT END
008100       IF VSAM-STATUS-CODE IS NOT EQUAL TO '00'
008200       THEN GO TO ERROR-EXIT
008300       END-IF
008400     END-READ.
008500
008600 EVALUATE-VSAM-STATUS-CODE.
008700*    THIS WILL DISPLAY DIAGNOSTIC MESSAGES
008800*    FOR VSAM STATUS CODES AS WELL AS ORDINARY SEQUENTIAL
008900     DISPLAY 'FILE STATUS CODE:' VSAM-STATUS-CODE
009000     EVALUATE VSAM-STATUS-CODE
009100     WHEN '00' DISPLAY 'SUCCESSFUL COMPLETION'
009200     WHEN '02' DISPLAY 'DUPLICATE KEY, NON UNIQ. ALT INDX'
009300     WHEN '04' DISPLAY 'READ, WRONG LENGTH RECORD'
009400     WHEN '05' DISPLAY 'OPEN, FILE NOT PRESENT'
009500     WHEN '07' DISPLAY 'CLOSE OPTION INCOMPAT FILE DEVICE'
009600               DISPLAY 'OPEN IMPLIES TAPE; TAPE NOT USED'
009700     WHEN '10' DISPLAY 'END OF FILE'
009800     WHEN '14' DISPLAY 'RRN > RELATIVE KEY DATA'
009900     WHEN '20' DISPLAY 'INVALID KEY VSAM KSDS OR RRDS'
010000     WHEN '21' DISPLAY 'SEQUENCE ERROR, ON WRITE'
010100               DISPLAY 'OR CHANGING KEY ON REWRITE'
010200     WHEN '22' DISPLAY 'DUPLICATE KEY'
010300     WHEN '23' DISPLAY 'RECORD OR FILE NOT FOUND'
010400     WHEN '24' DISPLAY 'BOUNDARY VIOLATION.'
010500               DISPLAY 'WRITE PAST END OF KSDS RECORD '
010600               DISPLAY 'COBOL 370: REL: REC# TOO BIG'
010700               DISPLAY 'OUT OF SPACE ON KSDS/RRDS FILE'
010800     WHEN '30' DISPLAY 'PERMANENT DATA ERROR'
010900               DISPLAY 'DATA CHECK, PARITY CHK, HARDW'
011000     WHEN '34' DISPLAY 'BOUNDARY VIOLATION'
011100               DISPLAY 'WRITE PAST END OF ESDS RECORD'
011200               DISPLAY 'OR NO SPACE TO ADD KSDS/RRDS RECORD'
011300               DISPLAY 'OUT OF SPACE ON SEQUENTIAL FILE'
011400     WHEN '35' DISPLAY 'OPEN, FILE NOT PRESENT'
011500     WHEN '37' DISPLAY 'OPEN MODE INCOMPAT WITH DEVICE'
011600     WHEN '38' DISPLAY 'OPENING FILE CLOSED WITH LOCK'
011700     WHEN '39' DISPLAY 'OPEN, FILE ATTRIB CONFLICTING'
011800     WHEN '41' DISPLAY 'OPEN, FILE IS OPEN'
011900     WHEN '42' DISPLAY 'CLOSE, FILE IS CLOSED'
012000     WHEN '43' DISPLAY 'DELETE OR REWRITE & NO GOOD READ FIRST'
012100     WHEN '44' DISPLAY 'BOUNDARY VIOLATION/REWRITE REC TOO BIG'
012200     WHEN '46' DISPLAY 'SEQUENTIAL READ WITHOUT POSITIONING'
012300     WHEN '47' DISPLAY 'READING FILE NOT OPEN AS INPUT/IO/EXTEND'
012400     WHEN '48' DISPLAY 'WRITE WITHOUT OPEN IO'
012500     WHEN '49' DISPLAY 'DELETE OR REWRITE WITHOUT OPEN IO'
012600     WHEN '90' DISPLAY 'UNKNOWN'
012700     WHEN '91' DISPLAY 'VSAM - PASSWORD FAILURE'
012800     WHEN '92' DISPLAY 'LOGIC ERROR/OPENING AN OPEN FILE'
012900               DISPLAY 'OR READING OUTPUT FILE'
013000               DISPLAY 'OR WRITE INPUT FILE'
013100               DISPLAY 'OR DEL/REW BUT NO PRIOR READ'
013200     WHEN '93' DISPLAY 'VSAM - VIRTSTOR. RESOURCE NOT AVAILABLE'
013300     WHEN '94' DISPLAY 'VSAM - SEQUENTIAL READ AFTER END OF FILE'
013400               DISPLAY 'OR NO CURRENT REC POINTER FOR SEQ'
013500     WHEN '95' DISPLAY 'VSAM - INVALID FILE INFORMATION'
013600               DISPLAY 'OR OPEN OUTPUT (LOAD) '
013700               DISPLAY   'WITH FILE THAT NEVER CONTNED DATA'
013710               DISPLAY   'OR ESDS OPEND OUTPUT BUT CONTNS DATA'
013800     WHEN '96' DISPLAY 'VSAM - MISSING DD STATEMENT IN JCL'
013900     WHEN '97' DISPLAY 'VSAM - OPEN OK, FILE INTEGRITY VERIFIED'
014000               DISPLAY 'FILE SHOULD BE OK'
014100     WHEN OTHER DISPLAY 'UNKNOWN REASON' VSAM-STATUS-CODE
014200     END-EVALUATE.
014300
014400*    From http://www.TheAmericanProgrammer.com                       s
014500*    commercial use or resale of this document is not permitted
014400     EVALUATE VSAM-EXTENDED-RETURN-CODE
014500     WHEN 0 DISPLAY 'SUCCESSFUL COMPLETION'
014600     WHEN 4 DISPLAY 'ANOTHER REQUEST IS ACTIVE'
014700     WHEN 8 DISPLAY 'THERE IS A LOGICAL ERROR'
014800             PERFORM EVALUATE-LOGICAL-ERROR
014900     WHEN 12 DISPLAY 'THERE IS A PHYSICAL ERROR'
015000             PERFORM EVALUATE-PHYSICAL-ERROR
015100     WHEN OTHER DISPLAY 'UNKNOWN REASON'
015200     END-EVALUATE.
015300
015400 EVALUATE-VSAM-EXTENDED.
015500     EVALUATE VSAM-EXTENDED-FUNCTION-CODE
015600     WHEN 0 DISPLAY 'ACCESSING BASE CLUSTER, NO PROBLEM'
015700     WHEN 1 DISPLAY 'ACCESSING BASE CLUSTER, MAY BE A PROBLEM'
015800     WHEN 2 DISPLAY 'ACCESSING ALTERNATE INDEX, NO PROBLEM'
015900     WHEN 3 DISPLAY 'ACCESSING ALTERNATE INDEX, MAY BE A PROBLEM'
016000     WHEN 4 DISPLAY 'UPGRADE PROCESSING, NO PROBLEM'
016100     WHEN 5 DISPLAY 'UPGRADE PROCESSING, MAY BE A PROBLEM'
016200     WHEN OTHER DISPLAY 'UNKNOWN REASON'
016300     END-EVALUATE.
016400
016500 EVALUATE-PHYSICAL-ERROR.
016600*    USE THIS WHEN THERE IS RC 12 IN VSAM-EXTENDED-RETURN-CODE
016700     EVALUATE VSAM-EXTENDED-FEEDBACK-CODE
016800     WHEN 4 DISPLAY 'READ ERROR ON DATA'
016900     WHEN 8 DISPLAY 'READ ERROR ON INDEX'
017000     WHEN 12 DISPLAY 'READ ERROR IN SEQUENCE SET'
017100     WHEN 16 DISPLAY 'WRITE ERROR ON DATA'
017200     WHEN 20 DISPLAY 'WRITE ERROR ON INDEX'
017300     WHEN 24 DISPLAY 'WRITE ERROR IN SEQUENCE SET'
017400     WHEN OTHER DISPLAY 'UNKNOWN REASON'
17700  EVALUATE-LOGICAL-ERROR.
017800*    USE THIS WHEN THERE IS RC  8 IN VSAM-EXTENDED-RETURN-CODE
017900     EVALUATE VSAM-EXTENDED-FEEDBACK-CODE
018000     WHEN   4 DISPLAY 'READ PAST END OF FILE'
018100     WHEN   8 DISPLAY 'DUPLICATE KEY'
018200     WHEN  12 DISPLAY 'KEY SEQUENCE ERROR'
018300     WHEN  16 DISPLAY 'NOT FOUND'
018400     WHEN  20 DISPLAY 'CONTROL INTERVAL IN USE BY OTHER JOB'
018500     WHEN  24 DISPLAY 'VOLUME CANNOT BE MOUNTED'
018600     WHEN  28 DISPLAY 'UNABLE TO EXTEND DATASET'
018700     WHEN  32 DISPLAY 'RBA NOT FOUND'
018800     WHEN  36 DISPLAY 'KEY IS NOT IN A DEFINED KEY RANGE'
018900     WHEN  40 DISPLAY 'INSUFFICIENT VIRTUAL STORAGE'
019000     WHEN  64 DISPLAY 'NO AVAILABLE STRINGS'
019100     WHEN  68 DISPLAY 'OPEN DID NOT SPECIFY PROC TYPE'
019200     WHEN  72 DISPLAY 'KEY ACCESS TO ESDS OR RRDS'
019300     WHEN  76 DISPLAY 'ATTEMPTED INSERT TO WRONG TYPE DATASET'
019400     WHEN  80 DISPLAY 'ATTEMPTED DELETE FROM ESDS'
019500     WHEN  84 DISPLAY 'OPTCD LOC FOR PUT REQUEST'
019600     WHEN  88 DISPLAY 'POSITION NOT ESTABLISHED'
019700     WHEN  92 DISPLAY 'PUT WITHOUT GET FOR UPDATE'
019800     WHEN  96 DISPLAY 'TRYING TO CHANGE PRIMARY KEY'
019900     WHEN 100 DISPLAY 'TRYING TO CHANGE LRECL'
020000     WHEN 104 DISPLAY 'INVALID RPL OPTIONS'
020100     WHEN 108 DISPLAY 'INVALID LRECL'
020200     WHEN 112 DISPLAY 'INVALID KEY LENGTH'
020300     WHEN 116 DISPLAY 'VIOLATED LOAD MODE RESTRICTION'
020400     WHEN 120 DISPLAY 'WRONG TASK SUBMITTING REQUEST'
020500     WHEN 132 DISPLAY 'TRYING TO GET SPANNED REC IN LOC MODE'
020600     WHEN 136 DISPLAY 'TRYING TO GET SPANNED REC BY ADDRESS'
020700              DISPLAY 'IN KSDS'
020800     WHEN 140 DISPLAY 'INCONSISTENT SPANNED REC'
020900     WHEN 144 DISPLAY 'ALT INDEX POINTER WITH NO MATCHING'
021000              DISPLAY 'BASE RECORD'
021100     WHEN 148 DISPLAY 'EXCEEDED MAX POINTERS IN ALT INDEX REC'
021200     WHEN 152 DISPLAY 'INSUFFICIENT BUFFERS AVAILABLE'
021300     WHEN 156 DISPLAY 'INVALID CONTROL INTERVAL'
021400     WHEN 192 DISPLAY 'INVALID RELATIVE REC NUMBER'
021500     WHEN 196 DISPLAY 'ATTEMPTED ADDRESSED REQUEST TO RRDS'
021600     WHEN 200 DISPLAY 'INVALID ACCESS THROUGH A PATH'
021700     WHEN 204 DISPLAY 'PUT IN BACKWARD MODE'
021800     WHEN 208 DISPLAY 'INVALID ENDREQ MACRO'
021900     WHEN OTHER DISPLAY 'UNKNOWN REASON'
022000     END-EVALUATE.
022100
022200     CLOSE VSAM-KSDS-FILE
022300     GOBACK.

Compliments of Gabe Gargiulo, author of several recent books on programming and modern languages, available at Amazon.com.

Top of Page

Your email and other personal information will not be given to anyone
[Books Computer]

Home Books for Computer Professionals Privacy Terms |
Site Map and Site Search Programming Manuals and Tutorials The REXX Files Top of Page |