Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
SORT Trailer Count - LRECL Output controlled by Input (?)

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
amorante

New User


Joined: 29 Aug 2017
Posts: 2
Location: US

PostPosted: Tue Aug 29, 2017 8:57 pm    Post subject: SORT Trailer Count - LRECL Output controlled by Input (?)
Reply with quote

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
View user's profile Send private message

Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1788
Location: NY,USA

PostPosted: Tue Aug 29, 2017 10:07 pm    Post subject:
Reply with quote

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
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 175
Location: Maryland

PostPosted: Tue Aug 29, 2017 10:39 pm    Post subject: Re: SORT Trailer Count - LRECL Output controlled by Input (?)
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1788
Location: NY,USA

PostPosted: Wed Aug 30, 2017 12:56 am    Post subject:
Reply with quote

The one I posted above is already working fine with OUTREC.
Back to top
View user's profile Send private message
RahulG31

Active User


Joined: 20 Dec 2014
Posts: 397
Location: USA

PostPosted: Wed Aug 30, 2017 1:00 am    Post subject: Reply to: SORT Trailer Count - LRECL Output controlled by Input (?)
Reply with quote

amorante, Show the actual Job that you submitted (or want to modify) with DISP and DCB parameters for the output files.

.
Back to top
View user's profile Send private message
amorante

New User


Joined: 29 Aug 2017
Posts: 2
Location: US

PostPosted: Wed Aug 30, 2017 3:17 am    Post subject:
Reply with quote

Rohit approach is the correct one, thank you Rohit
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts it is possible output a SET value fro... Martylin JCL & VSAM 5 Fri Sep 22, 2017 7:08 am
No new posts column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us