**** START OF SPECIFICATIONS ***************************************** 00010000 * * 00020000 *01* MODULE NAME = APSUX04X * 00030000 * * 00040000 * $MOD(APSUX04 ) COMP(APS) PROD(PSF) : VERSION 3.3.0 * 00050000 * * 00060000 *01* DESCRIPTIVE NAME = * 00070000 * LOGICAL RECORD INSTALLATION EXIT EXAMPLE (LINE DATA RECORDS) * 00080000 * * 00090000 *01* STATUS = VERSION 3, RELEASE 3, LEVEL 0 * 00100000 * * 00110000 *01* FUNCTION = * 00120000 * ADD RECORDS TO THE INPUT LINE DATA * 00130000 * * 00140000 *02* OPERATION = * 00150000 * 1. CLEAR THE STORAGE IN THE APSUECA WORK BUFFER. * 00160000 * 2. BUILD THE INDEX, INDEX ENTRIES, AND RECORDS * 00170000 * FOR THE CURRENT RECORD AND THE ADDED RECORDS. * 00180000 * 3. UPDATE THE PSF PROCESSING INDICATOR TO 'WRITE * 00190000 * RECORDS IN INDEX'. * 00200000 * 4. UPDATE THE INDEX POINTER IN PARAMETER LIST APSGEXTP * 00210000 * * 00220000 *01* NOTES = * 00230000 *02* DEPENDENCIES = NONE * 00240000 *02* RESTRICTIONS = * 00250000 * THIS EXAMPLE WILL NOT PROCESS BLANK OR SHORT LINE RECORDS. * 00260000 * THE DATA MUST BE LONG ENOUGH TO CONTAIN THE MODIFICATION * 00270000 * FIELD, MODREC. * 00280000 *02* REGISTER CONVENTIONS = * 00290000 * SEE THE ASSEMBLER EQUATES * 00300000 *02* PATCH LABEL = PSPACE * 00310000 * * 00320000 *01* MODULE TYPE = PROCEDURE * 00330000 *02* PROCESSOR = ASSEMBLER * 00340000 *02* ATTRIBUTES = REENTRANT * 00350000 * AMODE 31 * 00360000 * RMODE ANY * 00370000 * * 00380000 *01* ENTRY POINT = APSUX04 * 00390000 *02* LINKAGE = * 00400000 * R1 = ADDRESS OF A 4 BYTE FIELD WHICH CONTAINS THE * 00410000 * ADDRESS OF APSGEXTP * 00420000 * R15 = ENTRY POINT ADDRESS * 00430000 * R13 = SAVE AREA ADDRESS * 00440000 * * 00450000 *01* INPUT = * 00460000 * * 00470000 *01* OUTPUT = * 00480000 * INDEX AND RECORDS IN THE APSUECA * 00490000 * * 00500000 *01* EXIT NORMAL = RETURN TO CALLER * 00510000 * * 00520000 *01* EXIT ERROR = NONE * 00530000 * * 00540000 *01* EXTERNAL REFERENCES = * 00550000 *02* ROUTINES = NONE * 00560000 *02* DATA AREAS = * 00570000 * APSGEXTP - PSF INSTALLATION EXIT PARAMETER AREA * 00580000 * APSUECA - PSF EXIT COMMUNICATIONS AREA * 00590000 * IAZIDX - JES RECORD INDEX * 00600000 *02* INCLUDES = NONE * 00610000 * * 00620000 *01* MACROS = NONE * 00630000 * * 00640000 *01* MESSAGES = NONE * 00650000 * * 00660000 * 01* CHANGE ACTIVITY = * 00670000 * $H3=LAPS0003, HAF1220, 870928, BJ13WLC: RELEASE 2.1 * 00680000 * $L1=LAPS0004, HAF1228, 880601, B53KELJ: RELEASE 3.0 * 00690000 * $H5=LAPS0005, HPRF102, 033189, B53KEMC: REL 2.1.0 NEW FUNCT @H5A* 00700000 * $DU=LAPS0007,HPRF310,980604,BDKURLB: Version 3.1.0 @DUA* 00710000 * $DX=LAPS0008,HPRF320,991117,BUQ4RLB: Version 3.2.0 @DXA* 00720000 * $EV=LAPS0009,HPRF330,010530,BUQ4RLB: Version 3.3.0 @EVA* 00730000 * * 00740000 **** END OF SPECIFICATIONS ******************************************* 00750000 APSUX04 START 0 00760000 TITLE 'DSECT - XTP' 00770000 APSGEXTP LIST=YES 00780000 TITLE 'DSECT - ECA' 00790000 APSUECA LIST=YES 00800000 TITLE 'DSECT - IAZIDX RECORD INDEX' 00810000 IAZIDX LIST=YES 00820000 TITLE 'INSTALLATION EXIT LOGICAL RECORD PROCESSOR EXAMPLE (LINX00830000 E DATA RECORDS)' 00840000 APSUX04 CSECT , 00850000 APSUX04 AMODE 31 @H5A 00860000 APSUX04 RMODE ANY @H5A 00870000 USING *,15 00880000 B START 00890000 DC AL1(16) LENGTH OF FOLLOWING FIELDS 00900000 DC CL8'APSUX04 ' NAME OF THIS ROUTINE 00910000 DC CL8'&SYSDATE' DATE OF THIS ASSEMBLY 00920000 DROP 15 00930000 START DS 0H 00940000 STM 14,12,12(13) SAVE CALLERS REGISTERS 00950000 LR BASEREG,15 SWITCH BASE REGISTER 00960000 USING APSUX04,BASEREG 00970000 USING APSGEXTP,XTPPTR 00980000 USING APSUECA,ECAPTR 00990000 USING IAZIDX,IDXPTR 01000000 USING IDXENTRY,IDXEPTR 01010000 USING NEWREC,RECPTR 01020000 L XTPPTR,0(,1) LOAD ADDRESS OF APSGEXTP 01030000 L ECAPTR,XTPECAP LOAD ADDRESS OF APSUECA 01040000 LR 2,13 LOAD ADDRESS OF CALLERS SAVE 01050000 LA 13,ECAUSAVE ADDRESS OF APSUX04 SAVE AREA 01060000 ST 2,4(,13) SAVE CALLERS SAVE AREA ADDRESS 01070000 ST 13,8(,2) SAVE APSUX04 SAVE AREA ADDRESS 01080000 ********************************************************************* 01090000 * INITIALIZE WORK POINTERS 01100000 ********************************************************************* 01110000 LA IDXPTR,ECAWKBUF SET ADDRESS OF NEW INDEX 01120000 LA IDXEPTR,IDXSIZ(IDXPTR) SET PTR TO 1ST INDEX ENTRY 01130000 ********************************************************************* 01140000 * CLEAR WORK AREA FOR INDEX AND RECORDS 01150000 ********************************************************************* 01160000 SLR 8,8 RESET WORK REGISTER 01170000 SLR 9,9 RESET WORK REGISTER 01180000 L 7,WORKLEN SET LENGTH TO CLEAR 01190000 LR 6,IDXPTR SET ADDR OF TO FIELD 01200000 MVCL 6,8 MOVE FROM FIELD TO THE TO FIELD 01210000 ********************************************************************* 01220000 * BUILD THE INDEX HEADER 01230000 ********************************************************************* 01240000 MVC IDXID,INDEXID SET INDEX HEADER ID 01250000 LA 14,NUMIDXE 01260000 STH 14,IDXNUM SET NUMBER OF ENTRIES 01270000 ********************************************************************* 01280000 * COPY THE 1ST INDEX ENTRY AND MODIFY THE CURRENT RECORD. 01290000 * THIS ENTRY POINTS TO THE MODIFIED CURRENT RECORD. 01300000 * 01310000 * Set the record address and length in the IDX. This is @H5A 01320000 * necessary for 'spanned' records. For 'spanned' records, @H5A 01330000 * the original IDX points to the last section of the @H5A 01340000 * 'spanned' record. This IDX must point to the entire @H5A 01350000 * record. @H5A 01360000 ********************************************************************* 01370000 L 14,XTPRIXP SET PTR TO PSF INDEX ENTRY 01380000 MVC IDXENTRY(IDXESIZ),0(14) COPY OLD ENTRY TO NEW ENTRY 01390000 MVC IDXRECL(2),XTPRECL+2 SET RECORD LENGTH @H5A 01400000 MVC IDXRADR,XTPRECP SET RECORD ADDRESS @H5A 01410000 L 14,XTPRECP SET PTR TO CURRENT RECORD 01420000 MVC 1(L'MODREC,14),MODREC MODIFY THE CURRENT RECORD DATA, 01430000 * SEE THE WARNING INFORMATION 01440000 * IN RESTRICTIONS AREA OF THE 01450000 * SPECIFICATIONS ABOVE. 01460000 ********************************************************************* 01470000 * BUILD THE 2ND INDEX ENTRY AND 1ST ADDED RECORD 01480000 ********************************************************************* 01490000 LA RECPTR,IDXESIZ*NUMIDXE(IDXEPTR) 01500000 * SET PTR TO 1ST ADDED RECORD 01510000 LA 14,IDXESIZ SET LENGTH OF ENTRY 01520000 ALR IDXEPTR,14 SET PTR TO 2ND ENTRY 01530000 STH 14,IDXENTRL SET ENTRY LENGTH 01540000 MVC IDXRECL,RECLEN SET RECORD LENGTH 01550000 ST RECPTR,IDXRADR SET RECORD ADDRESS 01560000 MVI IDXFLAG1,IDXLMR+IDXMACH SET RECORD TYPE TO LINE DATA 01570000 * USING MACHINE CHARACTER 01580000 MVC IDXRECID,RECID SET RECORD ID 01590000 MVI RECCC,WRITE SET CONTROL CHAR TO WRT/SPACE 01600000 MVC RECTEXT,RECINFO COMPLETE NEW RECORD TEXT 01610000 ********************************************************************* 01620000 * BUILD THE 3RD INDEX ENTRY AND 2ND ADDED RECORD 01630000 ********************************************************************* 01640000 AH RECPTR,RECLEN ADJUST PTR TO 2ND NEW RECORD 01650000 LA 14,IDXESIZ SET LENGTH OF ENTRY 01660000 ALR IDXEPTR,14 ADJUST PTR TO 3RD ENTRY 01670000 STH 14,IDXENTRL SET ENTRY LENGTH 01680000 MVC IDXRECL,RECLEN SET RECORD LENGTH 01690000 ST RECPTR,IDXRADR SET RECORD ADDRESS 01700000 MVI IDXFLAG1,IDXLMR+IDXMACH SET RECORD TYPE TO LINE DATA 01710000 * USING MACHINE CHARACTERS 01720000 MVC IDXRECID,RECID SET RECORD ID 01730000 MVI RECCC,WRITE SET CONTROL CHAR TO WRT/SPACE 01740000 MVC RECTEXT,RECINFO COMPLETE NEW RECORD TEXT 01750000 ********************************************************************* 01760000 * UPDATE THE INSTALLATION EXIT PARAMETER LIST 01770000 ********************************************************************* 01780000 MVI XTPPIND,XTWRTIX SET PSF PROCESSING INDICATOR 01790000 * TO WRITE RECORDS IN INDEX 01800000 ST IDXPTR,XTPRIXP UPDATE POINTER TO NEWLY 01810000 * CREATED INDEX HEADER 01820000 ********************************************************************* 01830000 * EPILOGUE 01840000 ********************************************************************* 01850000 SLR 15,15 PSF EXPECTS ZERO RETURN CODE 01860000 L 13,4(,13) RESTORE CALLERS SAVE AREA ADDR. 01870000 L 14,12(,13) RESTORE CALLERS RETURN ADDRESS 01880000 LM 0,12,20(13) RESTORE CALLERS REGISTERS 01890000 BR 14 RETURN TO CALLER 01900000 SPACE 2 01910000 NUMIDXE EQU 3 NUMBER OF INDEX ENTRIES 01920000 WRITE EQU X'09' WRITE WITH SPACE CONTROL 01930000 WORKLEN DC F'300' LENGTH OF WORK AREA (LONGER 01940000 * THAN NECESSARY) 01950000 RECLEN DC Y(L'RECCC+L'RECTEXT) LENGTH OF ADDED RECORD 01960000 INDEXID DC C'IDX ' USED FOR INDEX HEADER ID 01970000 RECID DC C'APSUX04 ' USED FOR RECORD ID 01980000 MODREC DC C'THIS RECORD WAS MODIFIED BY APSUX04' 01990000 * USED TO MODIFY CURRENT RECORD 02000000 RECINFO DC C'THIS RECORD WAS INSERTED BY APSUX04' 02010000 * USED TO BUILD ADDED RECORDS 02020000 XTPPTR EQU 4 POINTER TO APSGEXTP 02030000 ECAPTR EQU 5 POINTER TO APSUECA 02040000 RECPTR EQU 6 POINTER TO APSUECA 02050000 IDXPTR EQU 10 POINTER TO NEW IAZIDX 02060000 IDXEPTR EQU 11 POINTER TO NEW INDEX ENTRY 02070000 BASEREG EQU 12 BASE REGISTER 02080000 SPACE 2 02090000 NEWREC DSECT ADDED RECORD DESCRIPTION 02100000 RECCC DS CL1 PRINT CONTROL CHARACTER 02110000 RECTEXT DS CL35 NEW RECORD INFORMATION 02120000 END APSUX04 02130000