Solved

Compile RGP program to a different library

Posted on 2010-11-11
4
590 Views
Last Modified: 2012-05-10
Copied an RPG program to a different member/library (QRPGSRC/DLLSRC37). Now i want to compile that member to DLLOBJ37 (library for compiled object storage). Using STRPDM, I enter 14 in front of the member and press F4. Screen appears with the following. How can I tell the system to compile to DLLOBJ37 instead of DLLSRC37?
Program... APCKTFR
 Library..... DLLSRC37
Source.....  QRPGSRC
  Library....  DLLSRC37
Source Member.. APCKTFR
Generation Sec Level.. 9
Replace Program.. NO
F10 Additional Parameters
  Source listing options
  Generation options
  Source Listing indentation
0
Comment
Question by:rodneygray
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 2

Expert Comment

by:dcgrindle
ID: 34116941
Program... APCKTFR
 Library..... DLLOBJ37
Source.....  QRPGSRC
  Library....  DLLSRC37

The library name under the Program name tells the compiler where to place the object.  

Note:  You have to be sure all the objects the program references exist in your library list when you compile the program.
0
 
LVL 5

Expert Comment

by:stevebowdoin
ID: 34117677
You can do the 14/F4 each time you compile or...
F18 then key the target lib.
That is where all 14s will go.

Steve Bowdoin
0
 
LVL 14

Expert Comment

by:daveslater
ID: 34256950
Hi
what I do is in PDM is:
F18 -  change detauts

set the
Object library . . . . . . .   *CURLIB      

then in F16 (Work with User-Defined Options) i have and option CL  chgcurlib &l    

I simply use CL F4 and put the object library in the library name
then option 14 always compiles into the current library.


Dave
0
 
LVL 16

Accepted Solution

by:
theo kouwenhoven earned 500 total points
ID: 34367326
The problem of using F18 to set the library is, that if you forget to reset it to the default, all programs in the future will be stored there.

What you also can do is create your own compile option like e.g.  MC (My Compiler)  instead of option 14.
To do so, go to PDM and press F16 (Shift+F4), brows through the optiins to see if MC is not used already.

Press F6 to create a new function:
Type after Option:  MC   (or any other code you like to use)
Type as command :
CRTBNDRPG PGM(DLLOBJ37/&N) SRCFILE(&L/&F) AUT(*ALL)

Now if you put the new created option in front of a source it will start the compiler.
You also able to prompt it by F4 so that you see the values.

For an automatig prompt after enter, just place a questionmark infront of the command while creating the option, so
CRTBNDRPG PGM(DLLOBJ37/&N) SRCFILE(&L/&F)
can be changed into
?CRTBNDRPG PGM(DLLOBJ37/&N) SRCFILE(&L/&F)

If you need otheroptions for the compiler, just enter them while creating this PDM-option.


Good luck
Murph

0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
In previous parts of this Nano Server deployment series, we learned how to create, deploy and configure Nano Server as a Hyper-V host. In this part, we will look for a clustering option. We will create a Hyper-V cluster of 3 Nano Server host nodes w…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question