i need to copy data from 2 files of various lengths, into one file.
say one file has data of length 19 and the second one has length 2.
i need to copy both of these into one output file side by side.
i.e if the first file contains time and second file contains count, then
the output should be
TIME= (value from first file) COUNT=(value from second file)
where TIME and COUNT are strings included in the output file manually.
can some tell me whether this could be done using SORT pgm?
pls provide the syntax here.
IS IT POSSIBLE TO OBTAIN TIMESTAMP IN THE SORT ITSELF, BECAUSE THIS WILL SOLVE MY PROBLEM EASLIY. RIGHT NOW I M ABLE TO GET THE CURRENT DATE FROM THE SORT ITSELF BY THIS SYNTAX,
SORT FIELDS=COPY
OUTREC FIELDS=(C'START TIME= ',DATE,C' NUM REC IN FILE= ',1,16)
I WANT TO KNOW WHETHER ANY SUCH COMMAND IS PRESENT TO RETRIEVE TIME ALSO IN THIS WAY. THEN THER WILL BE NO NEED FOR ME TO COPY DATA FROM 2 FILES.
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
Ajai,
Good news, Bad news......You have Syncsort........Synsort does have date and time available in outrec (trailers?)..........In the listing given, it seems that it ran but with little or no input? No major errors pointing to the control statements......
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Ajai,
You can use TIME1 (or variations) to get the current time.
Note: I'm a DFSORT developer. DFSORT and Syncsort are competitive products. I'm happy to answer questions on DFSORT and DFSORT's ICETOOL, but I don't answer questions on Syncsort.
thanks for all the help. i was able to solve it finally using ICETOOL pgm itself. the way frank suggested . i get these 2 files from previous steps of the jcl. these 2 files always have one record only.. one containing timestamp and another oen the record count. If some one needs the syntax pls let me know.