Solved

Compile RGP program to a different library

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Moving applications to the cloud or switching services to cloud-based ones, is a stressful job.  Here's how you can make it easier.
A Short Story about the Best File Recovery Software – Acronis True Image 2017
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

747 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now