Thanks.. can we use both OUTREC and OVERLAY statements together? I tried but I am getting error. Here is the original control statements.
Code:
SORT FIELDS=(270,004,CH,A,
112,004,CH,A)
SUM FIELDS=NONE
OUTFIL OUTREC=(12:SEQNUM,5,ZD,START=1,INCR=1, SEQUENCE NUMBER
024:270,004, T NUMBER
039:112,004, D ZONE
045:088C' ',/), '/' PRINTS A NEW LINE
HEADER1....
HEADER2
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
Quote:
can we use both OUTREC and OVERLAY statements together?
In a single OUTFIL, I think it is a NO.
AFAIK, the SEQNUM can be generated only as BI,ZD or PD. But you can modify it on your own if it is really required. And the SEQNUM STARTs from 1 and INCRements by 1 by default, so you don't really need the START and INCR subparameters here. I am away from office now and can't run a test. I can show you a possible way of achieving the same which is worth a try.
Code:
SORT FIELDS=(270,004,CH,A,
112,004,CH,A)
SUM FIELDS=NONE
OUTREC OVERLAY=(12:SEQNUM,5,ZD,12:12,5,ZD,M10,LENGTH=5)
OUTFIL OUTREC=(012:12,5, SEQUENCE NUMBER
024:270,004, T NUMBER
039:112,004, D ZONE
045:088C' ',/), '/' PRINTS A NEW LINE
......
.... rest of your control statements
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
SyncSort_for_zOS_1.3.2_PG wrote:
SEQNUM
Use SEQNUM to create a sequence number field within the output record. The length of the field can be from 1 to 16 bytes and can be represented in either BI, PD, or ZD formats.
DFSORT/ICETOOL Programming Guide wrote:
seqnum
specifies that a sequence number is to appear in the reformatted input record. The sequence numbers are assigned in the order in which the records are received for INREC processing. You can create BI, PD, ZD, CSF, or FS sequence numbers and control their lengths, starting values and increment values
Frank,
I ran a test and found that generating a sequence number in FS format works for my Syncsort version as well. I guess they missed it in their documentation whereas you have mentioned it clearly in the DFSORT manual.
May be Alissa could throw some light on why this is missing in the Syncsort PG 1.3.2.
SEQNUM
Use SEQNUM to create a sequence number field within the output record. The length of the field can be from 1 to 16 bytes and can be represented in either BI, PD, or ZD formats.
DFSORT/ICETOOL Programming Guide wrote:
seqnum
specifies that a sequence number is to appear in the reformatted input record. The sequence numbers are assigned in the order in which the records are received for INREC processing. You can create BI, PD, ZD, CSF, or FS sequence numbers and control their lengths, starting values and increment values
Frank,
I ran a test and found that generating a sequence number in FS format works for my Syncsort version as well. I guess they missed it in their documentation whereas you have mentioned it clearly in the DFSORT manual.
May be Alissa could throw some light on why this is missing in the Syncsort PG 1.3.2.
What format is FS. What is the fullform? I was looking for a solution to remove leading zeros from seqnum and found this. And it worked for me!! Thanks alot!
But this is new to me. Could you please explain or provide reference link.