We are migrating a site that use STOPX37 and we are switching to Allocate.
We have a situation that in the JCL of some Jobs, the SPACE card is not informed and in these cases STOPX37 specifies CYL, with a primary of 100 and a secondary of 100.
See the JCL:
//STEP01 EXEC PGM=ICEGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD *
TEST
//SYSUT2 DD DSN=TEST.ALOC.NOT.SPACE,
// DISP=(,CATLG,DELETE),UNIT=SYSDA,
// DCB=(LRECL=400,RECFM=FB,BLKSIZE=23200)
//SYSIN DD DUMMY
We created this logic in Allocate to set the SPACE information:
IF &VAMENVIR = 'ALLOC' THEN
DO
IF &DSN=TESTE.ALOC.NOT.SPACE THEN
DO
IF &DSORG = 'PS' THEN
DO
SET &SPACTYPE = 'CYL'
SET &PRIMARY = 100
SET &SECONDARY = 100
END
END
END
However, we need to create a logic for any file that does not come with the SPACE parameter, setting CYL with primary 100 and secondary 100. However, files that have SPACE informed in the JCL must be respected.
This is the error message that occurs when the job does not have the space parameter specified:
IEF344I PSSMJCDD STEP01 SYSUT2 - ALLOCATION FAILED DUE TO DATA FACILITY SYSTEM ERROR
IGD17045I SPACE NOT SPECIFIED FOR ALLOCATION OF DATA SET
CRJ.A0810.PETPICLB.D202206.U05KK
Release : 12.5
Component : Allocate DASD Space and Placement
Different rules between STOPX37 and Allocate DASD Space and Placement
/
/*-------------------------------------------------------------------------------------------------------------------
/* SET SPACE PRIMARY AND SECONDARY WHEN NOT SPECIFIED IN JCL
/*-----------------------------------------------------------------------------------------------------------------
IF &DSORG = 'PS' AND &DSTYPE NE 'TEMP' THEN
DO
IF &SPACTYPE = 'BLK' AND &PRI = 0 AND &SEC = 0 THEN
DO
WRITE 'SAM@DAD01 * FILE &DSN'
WRITE ' * WITHOUT SPACE PARAMETER INFORMED IN JCL '
WRITE ' * ALLOCATE RECORDED WITH CYL 100 200'
SET &SPACTYPE = 'CYL'
SET &PRIMARY = 100
SET &SECONDARY = 200
SET &RLSE = 'Y'
END
END