|
View previous topic :: View next topic
|
| Author |
Message |
amorante
New User
Joined: 29 Aug 2017 Posts: 2 Location: US
|
|
|
|
I have a Sort improvement I would like to make ,
Requirement: Input (25 bytes) SORTOF3 (80 bytes)
//STEP0A2 EXEC PGM=SORT
//SORTIN DD dsn=filename ( lrecl=25)
//SORTOUT DD DSN=fileout (lrecl=25)
//SORTOF2 DD DSN=fileof2 (lrecl=25)
//SORTOF3 DD DSN=fileof3 ( need this to be 80 )
//SYSIN DD *
SORT FIELDS=(1,25,CH,A)
SUM FIELDS=NONE
OUTFIL FILES=(OUT)
OUTFIL FILES=(2)
OUTFIL FILES=(3),REMOVECC,NODETAIL,
TRAILER1=(1:'I000000002000000001000',COUNT=(M11,LENGTH=15),43C' ')
This fails with :
ICE222A 0 25 BYTE FIXED RECORD LENGTH IS NOT EQUAL TO 80 BYTE LRECL FOR SORTOF3
How can I convert :
OUTFIL FILES=(3),REMOVECC,NODETAIL,
TRAILER1=(1:'I000000002000000001000',COUNT=(M11,LENGTH=15),43C' ')
To:
OUTFIL FILES=(3),REMOVECC,NODETAIL,
Replacing the trailer1 with a statement
USING Outrec or Build so the output LRECL = 80
Why:
All I need Is to count the number of record in sortin…. Output format as shown, question is can I do it in the same step or do I have to add another step and then
I could alter the input using INREC to go up to 80 and then use trailer1 for sortof3,
( this changes sortof2 and sortout to be 80 which is no good, that is why I would have to add another step, seriously ?) |
|
| Back to top |
|
 |
Rohit Umarjikar
Global Moderator

Joined: 21 Sep 2010 Posts: 3112 Location: NYC,USA
|
|
|
|
Welcome!!
Please make a use of code tags.
| Code: |
//STEP0A2 EXEC PGM=SORT
//SORTIN DD dsn=filename ( lrecl=25)
//SORTOUT DD DSN=fileout (lrecl=25)
//SORTOF2 DD DSN=fileof2 (lrecl=25)
//SORTOF3 DD DSN=fileof3 ( need this to be 80 )
//SYSIN DD *
SORT FIELDS=(1,25,CH,A)
SUM FIELDS=NONE
OUTFIL FILES=(OUT)
OUTFIL FILES=(2)
OUTFIL FILES=(3),REMOVECC,NODETAIL,OUTREC=(80X),
TRAILER1=(1:'I000000002000000001000',COUNT=(M11,LENGTH=15))
|
|
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2288 Location: USA
|
|
|
|
| amorante wrote: |
| All I need Is to count the number of record in sortin…. Output format as shown, question is can I do it in the same step or do I have to add another step and then I could alter the input using INREC to go up to 80 and then use trailer1 for sortof3, (this changes sortof2 and sortout to be 80 which is no good, that is why I would have to add another step, seriously ?) |
What prevents you from doing this in one step??
I do not see any reason for that yet.
Did you get any error, or what? |
|
| Back to top |
|
 |
Rohit Umarjikar
Global Moderator

Joined: 21 Sep 2010 Posts: 3112 Location: NYC,USA
|
|
|
|
| The one I posted above is already working fine with OUTREC. |
|
| Back to top |
|
 |
RahulG31
Active User
Joined: 20 Dec 2014 Posts: 446 Location: USA
|
|
|
|
amorante, Show the actual Job that you submitted (or want to modify) with DISP and DCB parameters for the output files.
. |
|
| Back to top |
|
 |
amorante
New User
Joined: 29 Aug 2017 Posts: 2 Location: US
|
|
|
|
| Rohit approach is the correct one, thank you Rohit |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|