Solved

Compile RGP program to a different library

Posted on 2010-11-11
4
578 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
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

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
Each year, investment in cloud platforms grows more than 20% (https://www.immun.io/hubfs/Immunio_2016/Content/Marketing/Cloud-Security-Report-2016.pdf?submissionGuid=a8d80a00-6fee-4b85-81db-a4e28f681762) as an increasing number of companies begin to…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

778 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