View previous topic :: View next topic
|
Author |
Message |
dejunzhu
Active User
Joined: 08 May 2008 Posts: 390 Location: China
|
|
|
|
I tried to use a dataset as input parameter of SORT, as below:
Code: |
//STEP6 EXEC PGM=SORT
//SYSOUT DD SYSOUT=A
//SORTIN DD DISP=(OLD,DELETE),DSN=&&TMP
//SORTOUT DD DSN=&&NUM,
// DISP=(,PASS),DCB=(LRECL=72,RECFM=FB,BLKSIZE=0),
// SPACE=(CYL,(1,1)),UNIT=SYSDA
//SYSIN DD *
OUTREC FIELDS=(C' SORT FIELDS=COPY')
SORT FIELDS=COPY
/*
//*************************************************
//*
//STEP7 EXEC PGM=SORT
//SYSOUT DD SYSOUT=A
//SORTIN DD DISP=SHR,DSN=DS.LD@RATE.TEST
//SORTOUT DD DUMMY
//*SORTOUT DD SYSOUT=*
//OUTPUT DD DISP=OLD,DSN=DS.TEST
//SYSIN DD DISP=(OLD,DELETE),DSN=&&NUM
// |
but SORT program abended with below error message:
Code: |
********************************* TOP OF DATA **********************************
1ICE751I 2 C5-K76982 C6-K90026 DA-K69255
0ICE805I 1 JOBNAME: CBD0000J , STEPNAME: STEP7
ICE802I 0 BLOCKSET TECHNIQUE IN CONTROL
ICE185A 0 AN S001 ABEND WAS ISSUED BY DFSORT, ANOTHER PROGRAM OR AN EXIT (PHASE 0)
******************************** BOTTOM OF DATA ******************************** |
I cannot understand why this happen,
Can somebody please help me on this ?
Thanks. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
First, there is no need to supply an LRECL for SORTOUT. SORT will do that for you.
Second, why specify an LRECL of 72? It should be 80.
Third why not post the full sysout (rhetorical for now)?
To get the data to LRECL 80, specify a blank for column 80. This will "pad" the intervening bytes from the previous that you specify with the fill character, a blank.
I assume that you only have one record on your input file. This example also gives you a choice: a Control Card which will always work; failure in the event of multiple inputs. Choose the best match for your task.
Code: |
//STEP6 EXEC PGM=SORT
//SYSOUT DD SYSOUT=A
//SORTIN DD DISP=(OLD,DELETE),DSN=&&TMP
//SORTOUT DD DSN=&&NUM,
// DISP=(,PASS),DCB=(LRECL=72,RECFM=FB,BLKSIZE=0),
// SPACE=(CYL,(1,1)),UNIT=SYSDA
//SYSIN DD *
OPTION COPY,STOPAFT=1
INREC BUILD=(C' SORT FIELDS=COPY',80:X)
|
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Do you not need to specify the RECFM and LRECL for a DD DUMMY output
And why bother running the sort step if the output is DUMMY ??? |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
RECFM and LRECL will be supplied by SORT. |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
Back to top |
|
|
dejunzhu
Active User
Joined: 08 May 2008 Posts: 390 Location: China
|
|
|
|
thanks, bill.
I changed according to your suggestion, it works fine. |
|
Back to top |
|
|
|