Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
What is the RECFM and LRECL of the input file.
You show 5 fields in each input record. Does each input record always have 5 fields? Or can there be more or less fields in a record? If there can be more than 5 fields, what is the maximum number of fields you expect?
What is the maximum length of a single field?
Do you expect any blank fields, e.g. like the second field below:
Joined: 08 Sep 2003 Posts: 32 Location: Toronto <-> Bangalore
Frank,
My input file is a FB file with LRECL of 133. Here is my original record:
ALLOC DSNAME('XED#DD.BNSS.ZZ.EN2) NEW -&SPACE(99,99) TRACKS -&LRECL(80) RECFM(F,B) BLKSIZE(800)
ALLOC DSNAME('XED#DD.BNSS.ZZ.FR11') NEW -&SPACE(99,99) TRACKS -&LRECL(80) RECFM(F,B) BLKSIZE(800)
All the records in the file will be having same number of fields as indicated above. Only difference between records will be the length of final qualifier in dataset name. For example, in the first record, it is "EN2" (3 characters) and in the second record, it is "FR11" (4 characters). This may vary from 2 to 8. There will not be any blank fields. I want output like
ALLOC DSNAME('XED#DD.BNSS.ZZ.EN2) NEW -
&SPACE(99,99) TRACKS -
&LRECL(80) RECFM(F,B) BLKSIZE(800)
ALLOC DSNAME('XED#DD.BNSS.ZZ.FR11') NEW -
&SPACE(99,99) TRACKS -
&LRECL(80) RECFM(F,B) BLKSIZE(800)
Joined: 08 Sep 2003 Posts: 32 Location: Toronto <-> Bangalore
Murali,
Thanks, and this is what I want. Just for curiosity, if the input record contains many fields whose length is not consistent, (in my case, it is one field and is easy to code 6 IFs), what would be the solution?