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



Danny,

Check out the EVAL-CORR opcode. It moves fields with the same name from one DS to another. For the purpose of the operation of this opcode, the subfield qualification (due to the "qualified" keyword) is ignored. I assume that EVAL-CORR would not recognize "prefix"ed variables and know to restore the variable back to its original name.

-mark

On 1/20/2017 8:07 AM, Danny Hayes 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

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.