Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum 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: 2427
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 Member


Joined: 29 Apr 2008
Posts: 803
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: 2427
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: 447
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 Identify the count from two diffrent ... UmashankarSubramani DFSORT/ICETOOL 8 Sat Jul 11, 2020 4:35 am
No new posts Problem while trying to manipulate re... amitc23 DFSORT/ICETOOL 3 Tue Jun 30, 2020 1:19 pm
No new posts VSAM Open During Copy-Excessive EXCP ... David Beckham JCL & VSAM 1 Sat Jun 27, 2020 5:23 pm
No new posts Want to check if trailer count is 0 a... rohanthengal JCL & VSAM 10 Fri Jun 26, 2020 10:47 am
No new posts Multiple rows within Cursor when Coun... iamdijkstra007 DB2 14 Mon Jun 08, 2020 12:53 am

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