View previous topic :: View next topic
|
Author |
Message |
selvamsrinivasan85
New User
Joined: 09 Aug 2010 Posts: 33 Location: Chennai
|
|
|
|
Hi all,
I have a requirement to copy all the VB files from GDG base to a single FB file. when i check the files, each file is of different LRECL.
Say, 1st version file is VB/27994 and 2nd version file is 23472.
How can i convert to a FB file?.
I usually use OUTREC with CONVERT option. I would like to have like
Code: |
OUTREC FIELDS=(1:5,Maxlen),CONVERT |
Any suggestions would be helpful. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2141 Location: USA
|
|
|
|
Use maximum possible (LRECL-4) from VB to create FB
Quote: |
VLFILL can be used to allow processing of variable-length input records which are too short to contain all specified OUTREC or BUILD fields.
Whereas the FIELDS, BUILD, OVERLAY, FINDREP, and IFTHEN parameters of the OUTREC statement apply to all input records, the OUTREC, BUILD, OVERLAY, FINDREP, and IFTHEN parameters of the OUTFIL statement apply only to the OUTFIL input records for its OUTFIL group. In addition, the OUTREC
and BUILD parameters of the OUTFIL statement support the forward slash (/) separator for creating blank records and new records, whereas the FIELDS and BUILD parameters of the OUTREC statement do not.
• FTOV can be used to convert fixed-length input records to variable-length output records. FTOV can be used with or without OUTREC , BUILD, OVERLAY, FINDREP, or IFTHEN.
• VLTRIM can be used to remove the trailing bytes with a specified value, such as blanks, binary zeros or asterisks, from variable-length records. VLTRIM can be used with or without FTOV.
• VLTRAIL can be used to insert a character string or hexadecimal string at the end of variable-length records. VLTRAIL can be used with or without FTOV or VLTRIM. |
|
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1335 Location: Bamberg, Germany
|
|
|
|
Usually a SORT is best choice, but also IEBGENER, and even IEBDG can be used for conversion. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
Couple of questions ..
Why do you need to do that ? Can’t source be corrected at first place ?
Last , do you want one highest lrec db or each fb same as vb size ? |
|
Back to top |
|
|
selvamsrinivasan85
New User
Joined: 09 Aug 2010 Posts: 33 Location: Chennai
|
|
|
|
sergeyken wrote: |
Use maximum possible (LRECL-4) from VB to create FB |
Thanks Sergeyken, That's the best idea and I did the same. |
|
Back to top |
|
|
|