Page 1 of 1

[RPG]specifying Library

Posted: Mon May 01, 2017 3:57 pm
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

Re: [RPG]specifying Library

Posted: Mon May 01, 2017 4:25 pm
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.

Re: [RPG]specifying Library

Posted: Mon May 01, 2017 6:32 pm
by MegumiSawada
Hi Mark,

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

Best Regards,
Megumi Sawada