View previous topic :: View next topic
|
Author |
Message |
mdolia
New User
Joined: 12 Dec 2007 Posts: 3 Location: Bangalore
|
|
|
|
I'm having a problem when executing a job with missing DD statements for COBOL program output files. The main program calls a sub-program where the output files are assigned to DD names.
The program doesn't abend even when there is no corresponding DD names defined for the output file.
I have also checked the compile/link-edit option if something needs to be changed with no luck!
Please help and provide your inputs
Thanks! |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
My guess is that none of the programs ever attempted to open any of the output assignments pointing to the missing DD names. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
If the subprogram is COBOL, the files could be optional. Or as Kevin said the files were never used by the subprogram. |
|
Back to top |
|
|
mdolia
New User
Joined: 12 Dec 2007 Posts: 3 Location: Bangalore
|
|
|
|
Hi Robert and Kevin,
Thanks for your reply. My requirement is to abend the job in case of missing DD names. The sub-program opens the output files that are pointing to the missing DDs. And even when I remove all the DD names of the ouput files defined in the sub-program, the sub-program doesn't abend.
Thanks! |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Can you show us the JCL as expanded by JES? Which DD statements are being opened by the subprogram? What language is the subprogram in? How do you know for sure that the subprogram is actually opening the files? Are there any messages being generated by the job? |
|
Back to top |
|
|
mdolia
New User
Joined: 12 Dec 2007 Posts: 3 Location: Bangalore
|
|
|
|
Hi Robert,
The JCL is below:(Please note I have commented the SYS020 and SYS021 DD names)
=================
//RB140 EXEC PGM=IKJEFT1A,DYNAMNBR=20
................
//SYSTSIN DD *
DSN SYSTEM (DB3)
RUN PROGRAM(RB140) PLAN(RB140)
END
//*
...............
//*SYS020 DD DSN=GP1390.TEST1,
//* UNIT=DISK,
//* DISP=(,CATLG,DELETE),
//* SPACE=(TRK,(300,100),RLSE),
//* DCB=(LRECL=1416,RECFM=VB)
//*
//*SYS021 DD DSN=GP1930.TEST2,
//* UNIT=DISK,
//* DISP=(,CATLG,DELETE),
//* SPACE=(TRK,(300,100),RLSE),
//* DCB=(LRECL=1416,RECFM=VB)
//*
The DD statements SYS020/SYS021 is defined in the sub-program as below:
FILE-CONTROL.
SELECT GIISAP01 ASSIGN UT-S-SYS020 FILE STATUS GIISAP01-STAT.
SELECT GIISAP02 ASSIGN UT-S-SYS021 FILE STATUS GIISAP02-STAT.
The sub-program is opening the files in this manner:
A050-OPEN-GIISAP SECTION.
OPEN OUTPUT GIISAP01.
OPEN OUTPUT GIISAP02.
The sub-program is also written in purely COBOL.
These are the some messages generated by the job for the above DD names:
PGM=RB140M25 ---> Sub-program
IGD101I SMS ALLOCATED TO DDNAME (SYS020 )
DSN (SYS09034.T153706.RA000.GP4090V3.R0173129 )
STORCLAS (SCTEMP) MGMTCLAS ( ) DATACLAS ( )
VOL SER NOS= VIO
IGD101I SMS ALLOCATED TO DDNAME (DR#00001)
DSN (RE.T153706.RB1400T.L01NSW.PNK1TD.FT100 )
STORCLAS (SCPROD) MGMTCLAS (D07KNNY) DATACLAS ( )
VOL SER NOS= PR0380
DB9005 TAB NFNDS120 DEBIT/CR HKONT: A9999997 WERTT: PA
IGD101I SMS ALLOCATED TO DDNAME (SYS021 )
DSN (SYS09034.T153714.RA000.GP4090V3.R0173132 )
STORCLAS (SCTEMP) MGMTCLAS ( ) DATACLAS ( )
VOL SER NOS= VIO
My doubt is even when I remove the corresponding SYS020/SYS021 DD names, the JCL doesnot abend.
And my requirement is to abend the JCL in case if any DD names are missing corresponding to the output files. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Code: |
PGM=RB140M25 ---> Sub-program
IGD101I SMS ALLOCATED TO DDNAME (SYS020 )
DSN (SYS09034.T153706.RA000.GP4090V3.R0173129 )
STORCLAS (SCTEMP) MGMTCLAS ( ) DATACLAS ( )
VOL SER NOS= VIO
IGD101I SMS ALLOCATED TO DDNAME (DR#00001)
DSN (RE.T153706.RB1400T.L01NSW.PNK1TD.FT100 )
STORCLAS (SCPROD) MGMTCLAS (D07KNNY) DATACLAS ( )
VOL SER NOS= PR0380
DB9005 TAB NFNDS120 DEBIT/CR HKONT: A9999997 WERTT: PA
IGD101I SMS ALLOCATED TO DDNAME (SYS021 )
DSN (SYS09034.T153714.RA000.GP4090V3.R0173132 )
STORCLAS (SCTEMP) MGMTCLAS ( ) DATACLAS ( )
VOL SER NOS= VIO |
These messages are saying your DD names are being dynamically allocated to VIO datasets. You need to get with your systems support people to find out how to abend instead of dynamically allocating files. |
|
Back to top |
|
|
Ajay Baghel
Active User
Joined: 25 Apr 2007 Posts: 206 Location: Bangalore
|
|
|
|
Hi Robert,
How can we decide/specify thru the cobol program in order to dynamically allocate vio datasets ?
I mean, looking at the below statement in OP's code
Code: |
SELECT GIISAP01 ASSIGN UT-S-SYS020 FILE STATUS GIISAP01-STAT.
SELECT GIISAP02 ASSIGN UT-S-SYS021 FILE STATUS GIISAP02-STAT. |
It looks same like we would code for allocating a normal dataset.
Thanks,
Ajay |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
This is not a COBOL issue. It is a systems issue which requires your systems support people to be involved. They need to tell you how to set up your DD statement to not automatically allocate a file if the DD name is missing. |
|
Back to top |
|
|
|