>> Hi there Kolusu, I messed up my format, and should have had colons instead
>> of commas.
Billy,
Apart from usage of Colons, did you realize that you have OVERLAPPING data?
At position 82 you wanted to write 82:C'This is my data field 3', and then at
position 102 you wanted to write this 102:C'AZ',
The length of the text at 82 is 23 bytes long.
----+----1----+----2----
THIS IS MY DATA FIELD 3
You want to write 23 bytes into a 20-byte length which is NOT possible.
>> I checked the APG, and could not find a way to use only the timestamp.
Not every user requirement in the world can be documented. You get the
timestamp and strip of the values and get the desired value.
btw I hope you do realize that TIMESTAMP is got ONCE and since you are writing
1500 records, every record will have the SAME exact timestamp. The Timestamp
is NOT changed for every record.
For example, this is the time stamp
----+----1----+----2----+---
yyyy-mm-dd-hh.mm.ss.nnnnnn
2024-01-31-11.05.40.559424
Now you want to remove the separators and have the time as 110540559424.
That value will remain the SAME value for all the 1500 records.
If you want the same time for all the records, then here is the JCL that would
get you the desired results ( I fixed the overlapping fields )
2 lines(see the lines in bold) is what is required to get the time without
separators.
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
ABC
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC BUILD=(DATE5)
OUTFIL REPEAT=1500,
BUILD=(01:C'TLX1',
05:12,15,UFF,M11,LENGTH=12,
17:SEQNUM,5,ZD,START=10001,INCR=3,
22:C'THIS IS MY DATA FIELD 1',
52:C'THIS IS MY DATA FIELD 2',
82:C'THIS IS MY DATA FIELD 3',
112:C'AZ',
114:C'111110000')
/*
Thanks,
Kolusu
DFSORT Development
IBM Corporation
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN