|
>>> "James W. Kilgore" <qappdsn@attglobal.net> 03/21 12:51 >>> File 1 has a variable format string of data. Sort of like a data queue. It's just a character string of varying length. Within the string (like the first few positions) is there a code that let's you know what the string identifier or format is? Exactly it is. >>>Is this a CGI application where each an every variable can have different >lengths or is it a fixed format? No, this is EDI aplication. And fixed format of variable/message is given in format file. >>>Now when you talk about file 2, is it a list of from-to positions so you can >walk down the character string of file 1 and parse out the data or is file 2 >an externally defined file that you can use in your program as a data >structure and parse by a simple MOVE command or is it a list of keyword/value >pairs to assist you in parsing? No, we know the data separator "+" and with this we can tokenize string. File 2 contains description of each subsequent token. I will paste simplified format of this file again: Tag Element Type .. Destination File Destination Field HDR 1 Num .. LOGFILE FLD1 HDR 2 Char .. LOGFILE FLD2 SND 1 Num .. ORDERS FLD1 SND 2 Num .. ORDERS FLD2 . . SND N Date .. ORDERS FLDN ADD 1 Num .. DETAILS FLD1 . . ADD N Char .. DETAILS FLDN EOD 1 Num .. LOGFILE FLD3 The goal is to write data from message to files/fields specified in this file 2 Than You James ! ! +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.