Home > Archive > Clarion > March 2006 > multiple record layout flat file to CSV ... EDI
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
multiple record layout flat file to CSV ... EDI
|
|
| Stanguru 2006-03-05, 3:55 am |
| EDI what a curse word
need some ideas
before i get a bunch of "try this million dollar package"...i know and
have dealt with packages, but this is very low volume...the customer
will read the data and make decisions and throw the data away, so its
not worth spending 5k on a mapping program
tryin to initially take the flat file(s) and turn them into CSV's (the
customer has no idea what they are looking for, so i need to get it
into xcel)
tryin not to hardcode record formats or create a bunch of work files
was initially wanting to create the record defs in a text file and suck
them into the program...that way i can change if need be without
program recompile (maybe i am thinkin too generic)
need some way to deal with multiple record formats within a file (hmm
the AS400 has that)
i know i can take TPS to CSV easily by doing record overlay, but i am
going to have to create multiple TPS's then multiple CSV's eventually
going to a straight ASCII
guess i am gonna have to do an array of the field lengths and just read
thru the string and insert commas (not too worried about quotes)...can
i insert into a string without having to cat everything???
signed...Lazy Programmer
| |
| bcarnaby@gmail.com 2006-03-05, 7:55 am |
| How about saving each record in a file with a UID, which type, and a
blob containing that record, then to process and address fields run
time, reading that blob into a record structure. I have done this
before.
How To;
Generic csv file is read in, and that record structure assigned to a
blob in a tps file. Also, identify what type of record it is and save
that and a UID. To then runtime access the records, assign that blob
to the appropriate record structure, and access the fields within that
record. Should be pretty easy and straight forward to then write out
basic format csv files based upon that record structure as well.
|
|
|
|
|