[RPG]specifying Library

Please do not use to report errors- use your regional help desk.
Please mark posts as being for RPG or RDMLX (LANSA) developer.
To subscribe by email, display this forum, scroll to the end and select ‘Subscribe Forum’.
Post Reply
MegumiSawada
Posts: 268
Joined: Tue Feb 19, 2013 5:18 pm

[RPG]specifying Library

Post by MegumiSawada »

Hi,

In RPG(not for LongRange) you can specify a library name for a file which read/write in the program by using OVRDBF command.

Is it possible to specify the library name for a file in RPG program for LongRange as well?
We can set the libraries in the initial library list of JOB description.
However, there is a case that the user would like to switch the files(whose name is the same) in several libraries.
Is there no way to do so except using different users which has different initial library lists?

I appreciate your kind advice.

Best Regards,
Megumi Sawada
MarkDuignan
Posts: 346
Joined: Wed Apr 18, 2012 10:33 am

Re: [RPG]specifying Library

Post by MarkDuignan »

They can quite easily put an OVRDBF CL command into the RPG program(s) that use the file by using IBM's QCMDEXC program.

I assume they know that already and don’t want to do that …. so try this method instead.

The source code for all parts of LongRange for RPG are supplied and can be customized.

In this case the customer should copy CL program LRNGLOGON from file LRNG_SOFT/LRNGSOURCE into their own CL source file in some non-LRNG library. Modify the code to include the required OVRDBF command. The OVRDBF command should then exist for as long as the user is logged on.

Then either,
(1) replace CL program LRNG_SOFT/LRNGLOGON with the modified version.

Or,
(2) compile it as another program named SOMELIBRARY/CUSTLOGON (for example).


Please note:
If option (1) is used the customer would need repeat the replacement process when upgrading or reinstalling LongRange.

If option (2) is used then SOMELIBRARY needs to be in the user’s library list and CUSTLOGON needs to be specified as the user’s initial program (INLPGM) instead of program LRNGLOGON.
MegumiSawada
Posts: 268
Joined: Tue Feb 19, 2013 5:18 pm

Re: [RPG]specifying Library

Post by MegumiSawada »

Hi Mark,

Thank you for your advice!
I'll tell this to the customer.

Best Regards,
Megumi Sawada
Post Reply