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



Instead of pre-fixing fields and reading/writing to I-spec DSs...

Read/Write to the qualified DS directly...

Now you can use eval-corr...

Charles


On Fri, Jan 20, 2017 at 6:07 AM, Danny Hayes <Danny_Hayes@xxxxxxxxx> wrote:

I have a program, actually 6 of them (around 5,000 lines each), that each
have multiple files that have field names in common across all of the files.

The programs write a header record for incoming EDI and then write detail
records for that header record.

The issue was that at the time the header record was processed and then
moved on to process the details another program began processing the
details before all had been written.

The decision was made to delay the writing of the header until all detail
records had been processed. To do this I created a flag to say header is
ready and instead of writing moved the

externally defined DS to a second one with a prefix on it so that no
values would be changed prior to when I actually do write the record, after
all details were processed.

Well, due to the commonly named fields the second external DS would not
rename its fields because they were already defined in the first DS.

To handle this I added QUALIFIED onto each of the External DS's, this
allowed everything to compile, almost.

Now the issue is the original design of the program counted on population
of all fields at one time. SO even if I qualify everywhere one of the
'commonly named fields' is used I then loose the populating of

every other iteration of that field name.

My objective is to not have to write subroutines/subprocedures to manually
move these hundred plus fields into a save area and then back out of the
same.

I know that someone out here has had to figure this out before, although
maybe not, I have never seen anything like this before, that I can recall,
but then some days I don't remember what I had for lunch yesterday.

Thanks & Regards,
Danny

This e-mail and any attachments, contain Genuine Parts Company
confidential information that is proprietary, privileged, and protected by
applicable laws. If you have received this message in error and are not the
intended recipient, you should not retain, distribute, disclose or use any
of this information and you should destroy this e-mail, any attachments or
copies therein forthwith. Please notify the sender immediately by e-mail if
you have received this e-mail in error.

"This e-mail and any attachments, contain Genuine Parts Company
confidential information that is proprietary, privileged, and protected by
applicable laws. If you have received this message in error and are not the
intended recipient, you should not retain, distribute, disclose or use any
of this information and you should destroy this e-mail, any attachments or
copies therein forthwith. Please notify the sender immediately by e-mail if
you have received this e-mail in error."
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD


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.