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



Well, I'm obviously doing something wrong. I looked at the code supplied by
Mihael and Brian, and thought I had it licked. But no joy in Mudville when
testing.

The relevant code at V7.3 is:

D EOMClose DS DtaAra(DSName)
D Contents 30a
D ap 1a Overlay(EOMClose)
D cr 1a Overlay(EOMClose:*Next)
D ar 1a Overlay(EOMClose:*Next)

D Prefix S 1a
D DSName S 21a
D FLib S 10a

rtvflib(flib);
getprefix(prefix);
DSName = %trim(flib) + '/' + prefix + '.EOM';

IN EOMClose;

When I run the test I get CPG1015 - Data area DSNAME in *LIBL not found.
Under debug the value of DSNAME = 'TSTQS36F/D.EOM ' where TSTQS36F is my
test library and D.EOM is the name of the data area. To double-check I ran
wrkobj command after canceling, and the data area, of course, showed up.

I'm sure that it is just some little thing that is sliding by me, but if
another pair of eyes can spot the issue, I would appreciate.

Thanks.

Jerry C. Adams
Experience is simply the name we give our mistakes. -Oscar Wilde
IBM i Programmer/Analyst
--
NMM&D
615-832-2730


-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxxxxxxxx] On Behalf Of
Barbara Morris
Sent: Friday, February 08, 2019 12:32 PM
To: rpg400-l@xxxxxxxxxxxxxxxxxx
Subject: Re: External Data Areas - Multiple Companies, One Program

On 2019-02-08 9:55 AM, Justin Taylor wrote:
You can use a variable for the data area, but that variable must be before
the program starts. An input parameter would work.

Another option would be to use *LIBL to determine the data area used.


But the variable only needs to be set before the program starts if it's a
data-area data structure (UDS in fixed form, DTAARA(*AUTO) in free-form).

If it's being handled with IN and OUT opcodes, the variable just has to be
set before the IN opcode.

--
Barbara

--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://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:
https://amazon.midrange.com


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.