Solved

Compile RGP program to a different library

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The conference as a whole was very interesting, although if one has to make a choice between this one and some others, you may want to check out the others.  This conference is aimed mainly at government agencies.  So it addresses the various compli…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

690 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