To override the subschema named in a batch application program in the z/OS environment, perform the following steps:
01 RUNTIME-TEST-PARMS.
05 PARM-LENGTH PIC S9(4) COMP.
05 RUNTIME-TEST-SUBSCHEMA PIC X(8).
PROCEDURE DIVISION USING RUNTIME-TEST-PARMS.
IF PARM-LENGTH NOT EQ ZERO MOVE RUNTIME-TEST-SUBSCHEMA TO SUBSCHEMA-SSNAME.
Local Mode Considerations
The database and the appropriate subschemas must be defined in the database name table in the load (core-image) library.
Note: For more information about the database name table, see CA IDMS Database Administration Guide.
'Z/VSE users'. You can pass the alternative subschema name by using a SYSPARM:
// OPTION SYSPARM=ssname.
Example of Overriding a Batch Subschema
The program excerpt and JCL below illustrate the batch subschema override technique in the z/OS COBOL environment.
The PARM option on the EXEC statement specifies the name of a test subschema used to override the production subschema. If the parameter is passed, the application program moves the parameter to the SUBSCHEMA-SSNAME field in program variable storage before issuing the BIND RUN-UNIT command.
DB EMPSS01 WITHIN EMPSCHM.
'
01 SUBSCHEMA-SSNAME PIC X(8) VALUE 'EMPSS01'.
'
LINKAGE SECTION.
01 RUNTIME-TEST-PARMS.
05 PARM-LENGTH PIC S9(4) COMP.
05 RUNTIME-TEST-SUBSCHEMA PIC X(8).
PROCEDURE DIVISION USING RUNTIME-TEST-PARMS.
MOVE 'TESTPROG' TO PROGRAM-NAME.
IF PARM-LENGTH NOT EQUAL TO 0 THEN
MOVE RUNTIME-TEST-SUBSCHEMA TO SUBSCHEMA-SSNAME.
BIND RUN-UNIT.
.
.
.
//RUNJOB EXEC PGM=TESTPROG,PARM='EMPSS01T'
|
Copyright © 2013 CA.
All rights reserved.
|
|