Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
I would think so, I do know that even though you have to pass the RDW forward (when rebuilding input recs to output recs), you do not have to specify the RDW value, the sort does that for you "auto-magically"....
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Quote:
How can I increase the length of each record by 1 dynamicaly???
Quote:
Record 1 : 20
Quote:
Record 1 : 21
I assume this means Record 1 is 20 bytes long and Record 1 is 21 bytes long, respectively.
To increase the length by 1, you have to add 1 byte to the record which will automatically increase the length in the RDW by 1. For example, if you wanted to insert a binary zero byte after the RDW in each record, you could use these DFSORT control statements:
But in this case the LRECL of the dataset is also increasing.
The requirement in LRECL should remain 50, but the length of the data and thus the RDW should increase.
However, when ever you are increasing the length of data using statement
OUTFIL OUTREC=(1,4,5,5,C'|',10,40)
( here | is inserted in data record )
in that case LRECL is also getting changed.
LRECL should remain same as 50, but only the datarecord and thus RDW should increase.
However this is not happening..any suggestions ??
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
mainframe_techie wrote:
The requirement in LRECL should remain 50, but the length of the data and thus the RDW should increase.
However, when ever you are increasing the length of data using statement
OUTFIL OUTREC=(1,4,5,5,C'|',10,40)
( here | is inserted in data record )
in that case LRECL is also getting changed.
LRECL should remain same as 50, but only the datarecord and thus RDW should increase.
However this is not happening..any suggestions ??
If you are referring to the maximum lrecl, it should only increase if you have a 50 byte record that you want to add a byte to - in that case, you will have to steal a byte from somewhere in the record....
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
mainframe_techie,
Look at the statement I posted:
Code:
OUTREC BUILD=(1,4,X'00',5)
Now compare it to the statement you posted:
Code:
OUTFIL OUTREC=(1,4,5,5,C'|',10,40)
Notice that I had a position (5) without a length for the last field whereas you have a position with a length (10,40).
When you give a position with a length as the last field, you get that fixed length field in every record making every record the same length. Because of that fixed length, if you add any bytes, the LRECL has to increase.
But when you give a position without a length as the last field, it tells DFSORT to take the bytes from that position to the end of the record, so you get variable length records. You can use LRECL=n on SORTOUT or a previously allocated data set with LRECL=n to keep LRECL=n. As long as the extra bytes don't increase the length of any record past the LRECL, you'll be ok.
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
mainframe_techie wrote:
The problem still persists:
After execution of this Job , the RDW is getting incremented, but again the LRECL of output file is also getting increased.
Please advise..
That seems perfectly sensible to me. What if there is a record that is already at the max length and you increase the RDW, what would you want done then, write it out with an invalid record length? Since you are making the records longer sort is just increasing the LRECL to prevent problems.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
mainframe_techie,
You're not paying attention to what people are telling you and you're not giving enough information for anyone to help you.
Show the messages you received in //SYSOUT.
Explain how you expect to increase the size of the records but keep the same LRECL if you have records that are the same length as the LRECL. Do you want to truncate bytes at the end of the record or what?
SYNCSORT FOR Z/OS 1.2.2.2R U.S. PATENTS: 4210961, 5117495 (C) 2005 SYNCSO
z/OS 1.7.0
PRODUCT LICENSED FOR CPU SERIAL NUMBER 17B8A, MODEL 2064 106 LICEN
PARMEXIT : SIZE=MAX-64K
SYSIN :
SORT FIELDS=COPY
OUTFIL OUTREC=(1,4,5,5,C'#',10)
WER108I SORTIN : RECFM=VB ; LRECL= 616; BLKSIZE= 6233
WER110I SORTOUT : RECFM=VB ; LRECL= 617; BLKSIZE= 6160
WER405I SORTOUT : DATA RECORDS OUT 3; TOTAL RECORDS OUT 3
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
WER054I RCD IN 3, OUT 3
WER169I RELEASE 1.2 BATCH 0461 TPF LEVEL 2.2
WER052I END SYNCSORT - STEP1,,DIAG=8600,51CE,AA80,0066,CE7E,69C2,2E88
Also, here is what i expect.
In my case there is no VB record equal to logical record length.
Hence, what I need is
I need to increase the length of the data by 1 byte in all the records, with out increasing the LRECL of the dataset.
If you specified LRECL=50 on SORTOUT, you WOULD NOT get LRECL=617 for SORTOUT. You would need to specify LRECL=616 on SORTOUT to get LRECL=616 rather than LRECL=617.
You posted this in the DFSORT Forum, but the WER messages indicate you're using Syncsort rather than DFSORT.
If you had posted consistent information and were using DFSORT, I could have helped you. But you're using Syncsort, so I can't.
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
Hello,
The sysout info you posted does not match the jcl and control info you posted.
Please start over and in one post copy/paste the jcl, the control statements, and the sysout info that are from the same run. Do not try to use any of the data previously posted. It would be best to run the test again and use that as your material to post here.
If you don't post the proper info, no one here will be able to help.