× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: Odp: Re: Data mapping
  • From: "James W. Kilgore" <qappdsn@xxxxxxxxxxxxx>
  • Date: Wed, 21 Mar 2001 05:12:36 -0800
  • Organization: Progressive Data Systems, Inc.

Marcin,

I'm going to make a guess that you are writing this in RPG. Since you state 
that the incoming data is a fixed format defined by a format file with a 
leading format id, you would include each format as an externally defined data 
structure and within your program, once you determine the format id, do a MOVE 
of the variable data portion of the incoming string to the proper data 
structure.

Or, you can buy an EDI package today that already does this or spend the next 
year or so trying to get it right.  That year or so has the cost of lost 
opportunity above a beyond the cost of your wages, machine time, desk space, 
erasers, etc.

Marcin Sagan wrote:

> >>> "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
> +---

+---
| 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 thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.