Download ASM S/390 User`s Guide
Transcript
B.1.2 Write Record to NearArchive Database. * SET UP NEARARCHIVE ARCHIVE PARAMETERS PERFORM B200-INIT-NEARARCHIVE-PARMS. (1) MOVE MOVE SET MOVE MOVE MOVE '44' TO W02-REQUEST-CODE. 'V100' TO W02-DATABASE-NAME. W02-KEY-POINTER TO ADDRESS OF PD-STAFF-NO. PD-EMP-TO-DATE TO W02-ARCHIVE-DATE. W04-EX-REC-LENGTH TO W02-DATA-LENGTH. EXPENSES-RECORD TO W02-ARCHIVE-DATA. (2) * CALL NEARARCHIVE TO ARCHIVE DATA CALL 'OTASP100' USING IF NOT (W02-RETURN-CODE = '00') MOVE W02-RETURN-CODE TO MOVE W02-SUPP-CODE1 TO MOVE W02-SUPP-CODE2 TO MOVE W99-ERR-MSG3 TO PERFORM Z900-ERROR-PROCESSING. W02-NEAR-PARMS. (3) W99-ERR-MSG3-RETURN. W99-ERR-MSG3-SUPP1. W99-ERR-MSG3-SUPP2. W99-ERR-MSG. Notes: 1. Initialize NearArchive parameter block (see B.1.1). 2. W02-REQUEST-CODE W02-DATABASE-NAME W02-KEY-POINTER W02-ARCHIVE-DATE W02-DATA-LENGTH W02-DATA - '44', write a data segment to the database - Name of database to be updated - Pointer to primary key of data object being archived. Note that the primary key field itself must be defined in the program linkage section. Refer to program OTASC100 in the distributed NearArchive sample code library for an example of this usage. - Archival date in format YYYYMMDD - Length of data record to be archived - Data record to be archived 3. On return to the calling program, NearArchive sets a 2 digit numeric code in the return code field of the parameter block to indicate the success or otherwise of the NearArchive call. Non-zero return codes may have additional error information in the supplementary code fields 1 and 2. ASM for S/390 v2.5 - User Manual B.5