|
You should use an EDI software to do this. ;-) I guess that the fields have always the same size for the same kind of records. (ADD, SND, ...) You can create a dictonnary file with the description for each records. Then, when you want to read your data message, you read the lines (one by one) in a buffer and you can seperate each datas by reading your dictionnary file. That's easy, no ? Jean-Christophe Fargette Internet itbamsag@bh.com.pl on 20/03/2001 15:40 Veuillez répondre à RPG400-L@midrange.com Pour : RPG400-L cc : ccc : Jean-Christophe Fargette Objet : Odp: Re: Data mapping ___________________________________________________________ This message and any attachments (the "message") are intended solely for the addressees and are confidential. If you receive this message in error, please delete it and immediately notify the sender. Any use not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval. The internet can not guarantee the integrity of this message. BNP PARIBAS (and its subsidiaries) shall (will) not therefore be liable for the message if modified. -------------------------------------------------- Ce message et toutes les pieces jointes (ci-apres le "message") sont etablis a l'intention exclusive de ses destinataires et sint confidentiels. Si vous recevez ce message par erreur, merci de le detruire et d'en avertir immediatement l'expediteur. Toute utilisation de ce message non conforme a sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. L'internet ne permettant pas d'assurer l'integrite de ce message, BNP PARIBAS (et ses filiales) decline(nt) toute responsabilite au titre de ce message, dans l'hypothese ou il aurait ete modifie. ___________________________________________________________
message file - this is flat text file, plus sign is data separator HDR+SomeData1+SomeData2 SND+SenderInfo1+SenderInfo2+SenderInfo3+..+SenderInfoN ADD+AdditionalInfo1+AdditionalInfo2+..+AdditionalInfoN . . EOM+ControlNumber Format of message file 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 I want to read the message file search for tag in format file and write data to apropiate fields in files LOGFILE, ORDES, DETAILS Regards Marcin >>> <rob@dekko.com> 03/20 2:51 >>> Could you paste some sample records? And a sample usage? Rob Berendt ================== Remember the Cole! Marcin Sagan <itbamsag@bh.com. To: RPG400-L@midrange.com pl> cc: Sent by: Subject: Data mapping owner-rpg400-l@mi drange.com 03/20/01 04:29 AM Please respond to RPG400-L Hi all I need to do some sort of data mapping i.e. in file 1 I have message from other system in file 2 I have format of this message and names of files and fields where this information should be stored in my shop (Because format of message can be changed I would like to separate code from this format) How to write data to files/fields given as a parameter? Is there any way except SQL? Any API? Any ideas? Thanks in advice Marcin ! ! +--- | 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 +--- +--- | 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 +--- ! ! ! ! ! ! ! ! ! ! +--- | 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.