The CULLUS22 source code, shown below, must be modified when:
z/OS Identifications
When more than one ISAM is to be accessed by CULLUS22:
z/VSE Modifications
z/VSE users must modify CULLUS22 source code to define one or more ISAM files:
CULLUS22 Source Code
Source code modifications are required to define the ISAM files. In z/OS systems, modifications are required only when using multiple ISAM files. z/VSE requires modification to define all ISAM files used in the run.
CULLUS22 START 0 USING CULLUS22,15 B @START BRANCH AROUND HEAD MACRO CULHEAD NOCODE=YES,PATCH=NO @START DS 0H STM 14,12,12(13) SAVE REGISTERS LR 12,15 LOAD BASE REGISTER DROP 15 USING CULLUS22,R12 TELL THE ASSEMBLER ABOUT IT ST 13,SAVE+4 DO LR 10,13 STANDARD LA 13,SAVE SAVE AREA ST 13,8(10) LINKAGE LM 4,6,4(1) PICK UP ARGS 1 TO 3 CLI 0(5),C'C' IS USER CALLING FOR CLOSE? BE CLOSEIT YES RESET NOP GETIT ACTIVE BRANCH ON ALL BUT 1ST MVI *-3,X'F0' SET BRANCH ON OPEN ISFILE OPEN IS FILE GETIT CLI LCODE,0 IS IT 1ST TIME THRU? BE GETKEY YES - SKIP CLC W/LAST KEY CLI LCODE,C'E' WAS THERE I/O ERROR ON LAST GET BE GETKEY YES - GO READ IT AGAIN *** *** CHANGE THE FOLLOWING INST AS REQUIRED *** (IF NOT PACKED DEC DO CLC ETC.) *** CP LKEY,0(8,6) LAST KEY VS. CURRENT REQUEST BE READOK SAME KEY -PROCESS AGAIN *** *** THE FOLLOWING CONVERTS P.DEC TO BINARY *** REPLACE AS REQUIRED *** GETKEY MVC DBLWD,0(6) MOVE KEY TO DOUBLE WORD CVB 7,DBLWD CONVERT TO BINARY (KEY FORMAT) ST 7,SKEY PUT IN KEY LOCATION READ ISFILE,KEY READ RECORD CALLED FOR BY KEY WAITF ISFILE WAIT FOR I/O COMPLETION TM ISFILEC,X'CE' BZ READOK NO I/O ERROR MVI 0(5),C'E' SIGNAL I/O ERROR B NORECORD GO BLANK I/O AREA READOK MVI 0(5),C'N' SET CODE TO NO RECORD TM ISFILEC,X'10' BO NORECORD NO MVI 0(5),C'Y' SET CODE TO RECORD FOUND *** *** IF RECORD LENGTH EXCEEDS 256 BYTES 2 OR MORE *** MVC STATEMENTS WOULD BE NEEDED *** MVC 0(L'ISREC,4),ISREC MOVE RECORD INTO USER AREA B RETURN GO BACK TO USER NORECORD MVI 0(4),C' ' START BLANKING USER AREA *** *** IF RECORD LENGTH EXCEEDS 256 BYTES 2 OR MORE *** MVC STATEMENTS WOULD BE NEEDED *** MVC 1(L'ISREC-1,4),0(4) PROPAGATE BLANKS B RETURN GO BACK TO USER CLOSEIT CLI LCODE,C'C' WAS LAST CALL TO CLOSE? BE RETURN GO BACK TO USER- ALREADY CLOSE CLOSE ISFILE CLOSE IS FILE AS REQUESTED MVI RESET+1,X'00' RESET SO IT WILL OPEN ON NXCALL RETURN MVC LCODE,0(5) SAVE RETURN CODE *** *** CHANGE TO MVC OR AS REQUIRED *** ZAP LKEY,0(8,6) SAVE KEY L 13,SAVE+4 RESTORE REG 13 LM 14,12,12(13) RESTORE REGS 14 TO 12 SR 15,15 CLEAR REG 15 BR 14 RETURN TO USER LCODE DC X'0' SAVE LAST RETURN CODE DBLWD DS D DOUBLE WORD WORK AREA *** *** SET LKEY TO LENGTH (& TYPE) OF INPUT KEY *** SET SKEY TO LENGTH (& TYPE) OF ON FILE *** SET ISREC TO LENGTH OF ONE RECORD (INCLUDING KEY) *** LKEY DC PL8'0' SAVE LAST KEY HERE SKEY DC F'0' CURRENT KEY REQUESTED ISREC DS CL174 I/O WORK AREA (1 RECORD) SAVE DS 18F LINKAGE SAVE AREA *** *** SET DTFIS PARAMETERS AS REQUIRED *** ISFILE DTFIS X DEVICE=2314, X DSKXTNT=6, X HINDEX=2314, X IOAREAR=IOA1, X IOROUT=RETRVE, X KEYARG=SKEY, X KEYLEN=4, X KEYLOC=1, X MSTIND=YES, X NRECDS=4, X RECFORM=FIXBLK, X RECSIZE=174, X TYPEFLE=RANDOM, X WORKR=ISREC *** *** SET IOA1 TO SIZE OF ONE BLOCK *** IOA1 DS CL696 I/O AREA FOR DTFIS END
Example
This sample code shows the CA Culprit parameters required to retrieve an ISAM record.
The following code:
IN 80 F 400 REC KEY-FIELD 1 15 3 IN 80 F 80 MB=D REC REC1 1 80 $START OF DUMMY BUFFER REC FLD1 1 15 $FIELD 1 OF THE ISAM RECORD REC FLD2 16 30 $FIELD 2 OF THE ISAM RECORD 010 COMM-SW 'Z' 0151*010 KEY-FIELD 017005 IF EOF EQ 200 017010 CALL US22 (REC1 COMM-SW KEY-FIELD) 017020 IF COMM-SW EQ 'Y' TAKE 017030 IF COMM-SW EQ 'E' 300 017200 MOVE 'C' TO COMM-SW 017010 CALL US22 (REC1 COMM-SW KEY-FIELD) 017 STOP 017300 $ERROR ROUTINE HERE
Copyright © 2014 CA.
All rights reserved.
|
|