× 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.



Buck Calabro wrote:
> 
> I have an EDI-like flat file where I have standard data elements which occur
> in different places depending on the record type.  The fields are all
> packed.  The existing implementation simply maps them all into one set of I
> specs in RPG III, and has IGNDECERR(*YES) set.
> 
> Iflatfile  NS  02   22 C
> I          OR  01
> ...
> I                             P   31   31 0SEA500
> I                             P   40   40 0SEA625
> I                             P   46   46 0SEA364
> I                             P   30   30 0SEAUSF
> ...
> 
> There are dozens of fields on each record type.  I'm doing maintenance and
> want to make this RPG IV so I can use reasonable names, etc.  Unfortunately,
> I need to use FIXNBR(*ZONED *INPUTPACKED) in order for it to run as-is.
> This generates tens of thousands of messages in the job log as each
> 'invalid' number is 'fixed'.  Understand that for a 500 record type, the
> program only references the 500 fields.
> 

Buck, how about defining the I spec fields as character, and defining
them as data structures with the packed field as a subfield.

I                             A   40   40  SEA_DS

I                             A   46   46  SEA_DS

D SEA_DS              DS
D   SEA                           1   1P 0

Then use SEA in the calcs.


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.