Q
Problem solve Get help with specific problems with your technologies, process and projects.

Using one ID for two application packages

I have two application packages that use different initial program entries, which creates a library list for that application, so now I have to setup and maintain different user IDs for each package. Is there a way to get around this problem and use only a single user ID for both applications?


Providing that you have access to the source of the initial programs and can change it, I?ll outline a technique that I?ve used to call one software package from another. Following is a program that gets the current library list, allows it to be changed and then changes it back to it?s original values before exiting the program. For example, say Software package A is your primary system where your users spend most of their time but they sometimes need to use Software package B. Add a menu option to Package A that will call package B. In the package B initial program, add the following lines of code. When they exit package B and return to package A, their library list is returned to the way package A needs it. This program only resets the library list. If both packages use the *LDA, you will want to add code to save and reset that as well.

PGM DCL VAR(&LIBL) TYPE(*CHAR) LEN(275)
DCL VAR(&CMD2) TYPE(*CHAR) LEN(512)
DCL VAR(&LEN) TYPE(*DEC) LEN(15 5) VALUE(256)

BEGIN:
/* KEEP ORIGINAL LIBRARY LIST */
RTVJOBA USRLIBL(&LIBL)

CHGLIBL:
/* CHANGE LIBRARY LIST AND CALL OTHER SOFTWARE PACKAGE */

ENDPGM:
/* CHANGE LIBRARY LIST BACK TO ORIGINAL VALUES */
CHGVAR VAR(&CMD2) VALUE('CHGLIBL LIBL(' *CAT &LIBL +
*TCAT ')')
CALL PGM(QCMDEXC) PARM(&CMD2 &LEN)
ENDPGM


Dig Deeper on Systems Management Tools

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close