|
View previous topic :: View next topic
|
| Author |
Message |
frozenblood87
New User

Joined: 27 Dec 2016 Posts: 5 Location: USA
|
|
|
|
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 |
|
 |
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
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 |
|
 |
Marso
REXX Moderator

Joined: 13 Mar 2006 Posts: 1356 Location: Israel
|
|
|
|
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 |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2288 Location: USA
|
|
|
|
| frozenblood87 wrote: |
| I am seeing different results for below parameters. |
What exactly is the difference in results??
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 |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2288 Location: USA
|
|
|
|
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 |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|