Joined: 02 Dec 2002 Posts: 625 Topics: 175 Location: Stockholm, Sweden
Posted: Tue Oct 25, 2016 7:15 am Post subject: ICETOOL to convert VB file to FB
For various in-house reasons, I have to use ICETOOL rather than DFSORT.
My input file file is VB 1000, my output one should be FB 1000. The input file is already sorted so that doesn't need to be done.
The "real" data from the input file is in position 37 onwards (pos 37 is the offset including the RDW). I need to insert some hard-coded text on each output record.
This is what I've got so far using DFSORT
Code:
OPTION COPY
OUTFIL FNAMES=SORTOUT,
VTOF, $ CONVERT VB TO FB
OUTREC=(1:C'10M23+00300', $ 1: TAG BORT RDW, KOLLA MANUAL
37,8,C' ', $ GRAB FROM POS 37 8 CHARS, THEN 2 BLANKS
45,955,1000:X), $ GRAB FROM POS 45, 955 POS FORWARD, 1000:X ???
VLFILL=C' '
What I would like to do with the above is the following:-
a) convert this to ICETOOL instead
b) include a date record as the first output record, preferably (if possible) including the actual hard-coded record within the ICETOOL commands.
We recommend that SORTCNTL, SORTIN, SORTOUT, SORTINnn, and xxxxINnn (where xxxx is specified in a USING operand) should not be used as ddnames in ICETOOL operators nor supplied as DD statements.
misi01 wrote:
b) include a date record as the first output record, preferably (if possible) including the actual hard-coded record within the ICETOOL commands.
Use HEADER1 with &Date to get the current date in MM/DD/YY format. If you need another format then look up &DATE=(abcd) in the application programming guide.
So based on your control cards, here is a Untested ICETOOL job that will give you the desired results.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum