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
 
LRECL in syncsort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
View previous topic :: :: View next topic  
Author Message
frozenblood87

New User


Joined: 27 Dec 2016
Posts: 5
Location: USA

PostPosted: Tue Feb 19, 2019 6:50 am    Post subject: LRECL in syncsort
Reply with quote

How does having LRECL for output file in syncsort create a difference ? I am seeing different results for below parameters. My shop is using SYNCSORT 2.1.6

Code:

//SORTOUT DD DSN=xyz,
//DISP=(,CATLG),UNIT=SYSALLDA,SPACE=(TRK,(10,5),),RLSE),
//DCB=(SYS2.GDG,RECFM=FB,LRECL=100,BLKSIZE=0,DSORG=PS)


Code:

//SORTOUT DD DSN=xyz,
//DISP=(,CATLG),UNIT=SYSALLDA,SPACE=(TRK,(10,5),),RLSE),
//DCB=(SYS2.GDG,RECFM=FB,BLKSIZE=0,DSORG=PS)

Code:
SYSIN

SORT FIELDS=(1,20,CH,A)
SUM FIELDS=NONE
Back to top
View user's profile Send private message

steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 734
Location: The Universe

PostPosted: Tue Feb 19, 2019 8:00 am    Post subject:
Reply with quote

The "JCL" you posted makes no sense. For example - SPACE=(TRK,(10,5),),RLSE) is completely invalid and will never get by JCL syntax check.

I'm not sure what will happen with DCB=SYS2.GDG,RECFM=FB,BLKSIZE=0,DSORG=PS). I think you will get LRECL = whatever the LRECL in SYS2.GDG

Just to check, I prepared and ran this JCL -
Code:
//A       EXEC PGM=IEFBR14                                   
//PATTERN  DD  DISP=(MOD,DELETE),UNIT=SYSALLDA,SPACE=(TRK,0),
//             DSN=&SYSUID..LISTDCB.PATTERN                   
//B       EXEC PGM=IEFBR14                                   
//PATTERN  DD  DISP=(,CATLG),UNIT=SYSDA,SPACE=(TRK,0),       
//             DCB=(RECFM=VBA,LRECL=125,DSORG=PS),           
//             DSN=*.A.PATTERN                               
//C       EXEC PGM=LISTDCB                                   
//STEPLIB  DD  DISP=SHR,DSN=&SYSUID..LISTDCB.LOAD             
//SYSPRINT DD  SYSOUT=*                                       
//DS01     DD  UNIT=SYSDA,SPACE=(TRK,(1,1)),                 
//             DCB=(RECFM=F,LRECL=80,BLKSIZE=80)             
//DS02     DD  UNIT=SYSDA,SPACE=(TRK,(1,1)),                 
//             DCB=&SYSUID..LISTDCB.PATTERN                   
//DS03     DD  UNIT=SYSDA,SPACE=(TRK,(1,1)),                 
//             DCB=(&SYSUID..LISTDCB.PATTERN,RECFM=F,LRECL=80)

The LISTDCB program just opens and lists the DCB attributes of data sets specified by DD statements that start with DS. I was afraid OPEN would ABEND opening DS03, but it it didn't. It produced this output.
Code:
DDNAME   RECFM LRECL BLKSIZE
DS01     F        80      80
DS02     VBA     125   27998
DS03     F        80   27998
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1315
Location: Israel

PostPosted: Tue Feb 19, 2019 6:15 pm    Post subject:
Reply with quote

By running a small sort with
Code:
//SORTIN   DD   *           
//SORTOUT  DD   SYSOUT=*   
I got the following SYSOUT messages:
Code:
WER108I  SORTIN   : RECFM=FB   ; LRECL=    80; BLKSIZE=    80 
WER073I  SORTIN   : DSNAME=HLQ.JOBNAME.J0083916.D0000101.?   
WER110I  SORTOUT  : RECFM=FB   ; LRECL=    80; BLKSIZE=    80 
WER074I  SORTOUT  : DSNAME=HLQ.JOBNAME.J0083916.D0000104.?   


By using
Code:
//SORTIN   DD   *                       
//SORTOUT  DD   SYSOUT=*,DCB=(LRECL=40)
I received the SYSOUT messages:
Code:
WER108I  SORTIN   : RECFM=FB   ; LRECL=    80; BLKSIZE=    80
WER073I  SORTIN   : DSNAME=HLQ.JOBNAME.J0084001.D0000101.?   
WER110I  SORTOUT  : RECFM=FB   ; LRECL=    40; BLKSIZE=    40
WER074I  SORTOUT  : DSNAME=HLQ.JOBNAME.J0084001.D0000104.?   
WER462I  OUTPUT LRECL DIFFERS FROM SORTOUT LRECL             

Message WER462I explains:
Quote:
Fixed-length records will be padded to the SORTOUT LRECL (SYSUT2 LRECL in a
SYNCGENR application) when the SORTOUT LRECL is greater than the SORTIN or
internally processed record length. Records will be truncated to the SORTOUT
LRECL (SYSUT2 LRECL in a SYNCGENR application) when the SORTOUT LRECL is less
than the SORTIN or internally processed record length.
Back to top
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 450
Location: Maryland

PostPosted: Wed Feb 20, 2019 2:04 am    Post subject: Re: LRECL in syncsort
Reply with quote

frozenblood87 wrote:
I am seeing different results for below parameters.


What exactly is the difference in results?? icon_rolleyes.gif

When seeing this message it is obvious that you need to reformat your record in accordance with the final DCB parameters taken from anywhere (doesn't matter where from).
Back to top
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 450
Location: Maryland

PostPosted: Thu Feb 21, 2019 1:42 am    Post subject:
Reply with quote

AFAIK, the GDG node referred by name in DCB= parameter does not include attributes like LRECL. That's why without explicit LRECL= the record length remains undefined, and SORT utility substitutes it from the calculated output record size.

Those DCB attributes are defined for every instance (or every generation) of GDG referred via (+N) parameter appended to GDG name. But I doubt if this format is accepted inside
DCB=(SYS2.GDG(+0))
and I'm lazy to verify this.
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 -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SYNCSORT keep MIN/MAX record Cloink SYNCSORT 16 Mon Sep 17, 2018 3:00 pm
No new posts Copy records with unknown LRECL oerdgie DFSORT/ICETOOL 8 Tue Jul 24, 2018 7:50 pm
No new posts Reformatting and adding additional fi... Badbeef SYNCSORT 6 Thu Apr 05, 2018 4:45 pm
No new posts Getting information (RECFM/LRECL/BLKS... Tim Van Holder COBOL Programming 3 Wed Mar 14, 2018 2:10 pm
No new posts Inefficient BUILD - VB records paddin... Daniel Prosser SYNCSORT 9 Thu Dec 14, 2017 3:52 pm

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