I am facing issues while parsing a delimited VB file and writing it to a FB file. Details of the file are as below
1) The data is of variable length fields containing a delimiter of comma (,)
2) Total file length is 850
2) We are not really sure of the length of the last field, we do not have problems if the last field gets truncated also (temporarily a length of 50 has been thought of)
3) The final FB output can also have the same record length as the input
I really dont know what 'Code'd' means and how did that get populated in my post (haven't observed it) - Please excuse my ignorance and let me know what that is ?
Secondly, I did have a field number %06 for the last field earlier, using which I had no luck or use as I was getting the same error - I remember trying in many ways. I am sure that I had the BUILD as a separate statement in one of my trials. Sorry I couldn't post my trials.
But I always had a question as to how the last field can be handled when we dont know the end of record for each individual record. Your help would give me a better insight on to how such situations can be handled.
Let me know if any extra information has to be furnished.
I really dont know what 'Code'd' means and how did that get populated in my post (haven't observed it) - Please excuse my ignorance and let me know what that is ?
did You look at Your post before and after
after 4 years of being on the forum You should have noticed by now
the font used for text is a variable(proportional) font
text surrounded by the code tags is displayed with a fixed font to make code easier to read
normal
12345678901234567890
1234567890abcdef
coded
Code:
12345678901234567890
1234567890abcdef
a moderator took the time to edit Your post in order to make easier for other people to understand You sort cards and Your data
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
mambopras wrote:
[...]
But I always had a question as to how the last field can be handled when we dont know the end of record for each individual record. Your help would give me a better insight on to how such situations can be handled.
[...]
Each of your six fields has a logical maximum length, relating to the business requirement. That is the length you use on each respective FIXLEN.
Each parse field will be filled with data, stopping either as it has been told to do (ENDBEFR, etc) or when the length of that FIXLEN is exhausted or when the last byte of the record has been processed.
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
I just noticed that your input is VB file so you need the RDW in the BUILD statement or else you would get ICE251A for missing RDW.
If you want FB file then you need to use VTOF. The total length of your FIXLEN is (10+8+1+10+5 =34) , that is what you need to use on your OUTFIL BUILD.
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
mambopras,
I've just noticed your SYSOUT does not match the control cards which you showed. This has lead to some confusion in my and Kolusu's replies. If you let me know the correct FIXLENs I can make the replies consistent. Also whether you want that 6th field or not, please.