I am trying to extract specific fields from an VB file. I am sure, my file has some short control fields with is creating problem while pulling out the records. Is there a way to eliminate those records. i.e. (records having short control fields). Or else is there any other way to resolve this issue.
Please find my code below.
INCLUDE COND=(122,9,ZD,EQ,600021134,OR,
122,9,ZD,EQ,600000206)
INREC FIELDS=(1,4,5,17,46,40,122,9,132,17,149,17,276,3,366,17)
OPTION VLSHRT
SORT FIELDS=COPY
I tried the same using OUTREC statement.
INCLUDE COND=(122,9,ZD,EQ,600021134,OR,
122,9,ZD,EQ,600000206)
OPTION VLSHRT
SORT FIELDS=COPY
OUTREC FIELDS=(1,4,5,17,46,40,122,9,132,17,149,17,276,3,366,17)
I am getting the same error message for both as specified below.
ICE218A 6 91 BYTE VARIABLE RECORD IS SHORTER THAN 130 BYTE MINIMUM FOR FIELDS
I can able to traceout the issue. But I cannot able to resolve this issue as i dont have much knowledge all DFSORT options.
Can anyone please help me out to resolve this issue.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Ashok,
You have a couple of problems here. Since you're using INREC (or OUTREC), VLSHRT is ignored resulting in short records for the INCLUDE statement. You can fix that by using VLSCMP instead of VLSHRT. That will remove the records that don't contain your INCLUDE field.
But your INREC statement specifies a maximum field of 382 bytes so any record you INCLUDE that is shorter than 382 bytes will also result in an ICE218A message. Thus, if any of the records to be included is shorter than 382 bytes, you'll need to explain what you want to do about those records (remove them? pad them with blanks? something else?).