Joined: 12 Apr 2012 Posts: 28 Location: LA, California
I'm trying to find out the delta changes between two files that is created today and the previous day.
The two input files are 25 bytes in LRECL. I have got the output as expected with respect to the Delta changes.
in the sortout i did not code the LRECL, Format and the Blocksize for the file and left it with the sort to create it with the best suited LRECL.
When i executed the job, the SORTOUT was created , but the LRECL of the SORTOUT file was 50 bytes.
I expected the SORTOUT to be 26 bytes. Since in my outrec build I write the Single Character I/U/D and then 25 bytes of field, either from F1 or from F2.
So i tried to give the LRECL=26, BLKSIZE=0 for the SORTOUT and but the SORT step abended and the SYSOUT pointed that the LRECL 26 is incompatible with SORTOUT.
Can some one tell why 50 byte file is created and if there is a way to create a SORTOUT file with just 26 bytes as LRECL.
Joined: 12 Apr 2012 Posts: 28 Location: LA, California
Hi Pandora
I have already posted both the SYSOUT in my previous post. Posting here a small version for clarity. Please refer the previous post for the complete SYSOUT details.
The First SYSOUT I have posted is when I coded the DCB in the SORTOUT. Job abended, ABEND=S000 U0016.
Code:
WER481I JOINKEYS REFORMAT RECORD LENGTH= 50, TYPE = F
WER237I OUTREC RECORD LENGTH = 50
WER110I SORTOUT : RECFM=FB ; LRECL= 26; BLKSIZE= 27976
WER074I SORTOUT : DSNAME=TEST.WORK.TEMP.IUDEXTR
WER247A SORTOUT HAS INCOMPATIBLE LRECL
The Second SYSOUT correponds to the JCL where I did not code the DCB for the SORTOUT. The Job ran fine.
Code:
WER481I JOINKEYS REFORMAT RECORD LENGTH= 50, TYPE = F
WER237I OUTREC RECORD LENGTH = 50
WER110I SORTOUT : RECFM=FB ; LRECL= 50; BLKSIZE= 27950
WER074I SORTOUT : DSNAME=TEST.WORK.TEMP.IUDEXTR
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
I'd have used
Code:
BUILD=(C'I',1,25)),
and had them on INREC.
It is doing the processing, and then using 50 (the copy of length from input (REFORMAT here) to output is normal, unless data adjusted in length), even "padding" with spaces from the 26, Sort "knows" the records are 26, but also, somehow, "knows" you want a record-length of 50 (which you don't).
The IFOUTLEN can be used to set the length of the output from IFTHEN statements. It is not always possible for Sort to "keep track" of values across all IFTHENs. I can at the moment only think that the columns were "confusing" the issue.
Yes this gives the LRECL 10 but though without IFOUTLEN we dont get the error
Quote:
IFOUTLEN
IFOUTLEN=n
INREC Control Statement
Overrides the INREC LRECL (or reformatted record length if the INREC record
is further modified) determined by DFSORT from your INREC IFTHEN
clauses. DFSORT sets an appropriate LRECL for the output records based on
the build, overlay, find/replace and group operation items specified by the
IFTHEN clauses. However, DFSORT does not analyze the possible results of
WHEN=(logexp) conditions when determining an appropriate INREC LRECL.
When you use INREC IFTHEN clauses, you can override the INREC LRECL
determined by DFSORT with the INREC IFOUTLEN parameter.
Fixed-length records longer than the IFOUTLEN length are truncated to the
IFOUTLEN length. Fixed-length records shorter than the IFOUTLEN are
padded with blanks to the IFOUTLEN length. Variable-length records longer
than the IFOUTLEN length are truncated to the IFOUTLEN length.
n specifies the length to use for the INREC LRECL (or for the reformatted
record length if the INREC record is further modified) . The value for n
must be between 1 and 32767, but must not be larger than the maximum
LRECL allowed for the RECFM, and must not conflict with the specified or
retrieved LRECL for the fixed-length output data set.