View previous topic :: View next topic
Author
Message
icetigerfan New User Joined: 08 Mar 2010Posts: 13 Location: Nuremberg, Germany
Hi,
I am just in despair.
I have a job in a job chain that sorts a previously created file. This file is then processed by various subsequent jobs.
Now the just created SORTOUT is deleted by SORT as soon as the input file does not contain any records. So the subsequent jobs abort. What can I do so that the empty SORTOUT is not deleted.
By the way, the job has run without problems for the last 20 years and has always created an empty SORTOUT if the SORTIN did not contain any records.
I attach the respective job step.
Code:
//STEP030 EXEC PROC=PGMLOAD,DBID=31,PROG=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=infile,DISP=(OLD,DELETE,KEEP)
//SORTOUT DD DSN=outfile,DISP=(NEW,CATLG,DELETE),
// DCB=(LRECL=32095,RECFM=VB),
// SPACE=(CYL,(20,40),RLSE)
SORT FIELDS=(9,3,A,30,6,A,36,26,A,62,48,A,113,4,A),FORMAT=CH
RECORD TYPE=V,LENGTH=32095
Back to top
Garry Carroll Senior Member Joined: 08 May 2006Posts: 1205 Location: Dublin, Ireland
What is the JCL in the PGMLOAD procedure?
Garry.
Back to top
icetigerfan New User Joined: 08 Mar 2010Posts: 13 Location: Nuremberg, Germany
A Cobol program that creates a list, but the list can be empty.
Code:
//*------------------------------------------------------------------***
//STEP020 EXEC PROC=PGMLOAD,DBID=31,PROG=COBPROG
//SYSPRINT DD SYSOUT=*
//MBSPRO DD SYSOUT=*
//QUELL2 DD DSN=input1,DISP=SHR
//PROTOK DD DSN=protdat,DISP=(MOD,KEEP)
//WORKFILE DD DSN=infile,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(20,40),RLSE),
// DCB=(LRECL=32095,RECFM=VB)
//STEUFI DD DUMMY
//VLKARTE DD *
E31
//*------------------------------------------------------------------***
//STEP030 EXEC PROC=PGMLOAD,DBID=31,PROG=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=infile,DISP=(OLD,DELETE,KEEP)
//SORTOUT DD DSN=outfile,DISP=(NEW,CATLG,DELETE),
// DCB=(LRECL=32095,RECFM=VB),
// SPACE=(CYL,(20,40),RLSE)
SORT FIELDS=(9,3,A,30,6,A,36,26,A,62,48,A,113,4,A),FORMAT=CH
RECORD TYPE=V,LENGTH=32095
Back to top
Joerg.Findeisen Senior Member Joined: 15 Aug 2015Posts: 1335 Location: Bamberg, Germany
Show the resolved PROC and also add the //SYSIN DD to the stream (it's missing).
Back to top
sergeyken Senior Member Joined: 29 Apr 2008Posts: 2141 Location: USA
Joerg.Findeisen wrote:
Show the resolved PROC and also add the //SYSIN DD to the stream (it's missing).
And also: include the part of SDSF log showing the point where your SORTOUT has been deleted!
Back to top
sergeyken Senior Member Joined: 29 Apr 2008Posts: 2141 Location: USA
One stupid question: where your abstract "DSN=infile" and "DSN=outfile" come from?
There is a chance that after "too smart" parameter substitution you are using the same name in both DSNAMEs?
P.S.
It is a very-very-very bad idea: asking abstract questions without giving any specific detail.
It is the same as the question: "I did everything right, but the result was wrong. Please, help!"
Back to top
sergeyken Senior Member Joined: 29 Apr 2008Posts: 2141 Location: USA
icetigerfan wrote:
A Cobol program that creates a list, but the list can be empty.
Code:
//*------------------------------------------------------------------***
//STEP020 EXEC PROC=PGMLOAD,DBID=31,PROG=COBPROG
//SYSPRINT DD SYSOUT=*
//MBSPRO DD SYSOUT=*
//QUELL2 DD DSN=input1,DISP=SHR
//PROTOK DD DSN=protdat,DISP=(MOD,KEEP)
//WORKFILE DD DSN=infile,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(20,40),RLSE),
// DCB=(LRECL=32095,RECFM=VB)
//STEUFI DD DUMMY
//VLKARTE DD *
E31
//*------------------------------------------------------------------***
//STEP030 EXEC PROC=PGMLOAD,DBID=31,PROG=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=infile,DISP=(OLD,DELETE,KEEP)
//SORTOUT DD DSN=outfile,DISP=(NEW,CATLG,DELETE),
// DCB=(LRECL=32095,RECFM=VB),
// SPACE=(CYL,(20,40),RLSE)
SORT FIELDS=(9,3,A,30,6,A,36,26,A,62,48,A,113,4,A),FORMAT=CH
RECORD TYPE=V,LENGTH=32095
Sorry for being so straightforward, but this reminds me ravings of lunatic: using THE SAME JCL PROC, while running ABSOLUTELY DIFFERENT PROGRAMS!!??
Such way of coding is the basic origin for "mysterious disappearing of datasets", and other "miracles".
To say nothing about the fact, that SORT has no physical ability to "delete datasets" (according to the Topic name).
Back to top
Willy Jensen Active Member Joined: 01 Sep 2015Posts: 734 Location: Denmark
Can we assume that the blank in front of
//STEP030 EXEC PROC=PGMLOAD,DBID=31,PROG=SORT
is a cut/paste error? If not then you essentially only have one step.
Like Segeyken I wonder what really is in that PGMLOAD proc since you seem to override most JCL.
Back to top
Willy Jensen Active Member Joined: 01 Sep 2015Posts: 734 Location: Denmark
And I too would like to see the SDSF listing.
Back to top
Please enable JavaScript!