× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.






As they say, a picture is worth a thousand words.  So, let me share a small
enough section of code for executing the CRTCLPGM without making people
angry.  You are probably wondering why I defined the CRTCLPGM twice (once
as a command in a variable and another as a straight command.  Some people
like to submit compiles to batch.  So, the first definition of CRTCLPGM
defines the command and the other CRTCLPGM is never executed.  It is only
used to help define how the first command should look.  Then after the
COMPILE tag, if batch compile is set to "Y", the &CMD is executed in a
SBMJOB.  Otherwise, it is a parm to the QCMDEXC command.  It looks messy
but hopefully you would only have to define it once and never change it.

IF         COND(&SRCTYP = 'CLP') THEN(DO)
CHGVAR     VAR(&CMD) VALUE('?CRTCLPGM ??PGM(' *TCAT &OBJLIB *TCAT +
             '/' *TCAT &SRCMBR *TCAT ') SRCFILE(' *TCAT &SRCLIB +
             *TCAT '/' *TCAT &SRCFIL *TCAT ') SRCMBR(' *TCAT +
             &SRCMBR *TCAT ') ??OPTION(*SRCDBG) ??TGTRLS(' *TCAT +
             &TGTRLS *TCAT ')')
GOTO       CMDLBL(COMPILE)
?          CRTCLPGM ??PGM(&OBJLIB/&SRCMBR) +
             SRCFILE(&SRCLIB/&SRCFIL) SRCMBR(&SRCMBR) +
             ??OPTION(*SRCDBG) ??TGTRLS(&TGTRLS)
ENDDO

Craig

** Craig wrote:
I have already created my own PDM option for compiles "M" for compile ("C"
is call).  "14" is left as is.  This accepts library, file, member, and
type.  A CL program is called with all the compile commands defined.  If
SRCTYP='CLP', CRTCLPGM...., etc.  Target release, debug view, etc are
defined once so you should normally never have to prompt the "14" to
override things like target release and debug view.  Actually, target
release is kept in a data area.  All compile commands are prompted but you
shouldn't have to override normally.  The reason for doing this is to allow
the program to be submitted from a command line as a command and prompted.
Just type COMPILE and press F4 and fill in your library, member, compile in
batch, etc.  Okay, maybe you wouldn't want to compile straight from a
command line but this would take care of selecting the command based on
source type.  I can share this program if you wish.  Good luck!

Craig

** Vern wrote:
Right, Rick, and this goes with what others have said. But I was thinking,
in response to this, that the individual commands could be modified - the
ones he needs, and then PDM would call them instead. Messy, as you say, but
doable, I think. It's no different, is it, from putting copies above the
shipped commands with different defaults?

Vern

At 05:04 PM 10/9/2003 -0500, you wrote:

Vern,

at first, I was thinking he could do something like that, up until i
started thinking of all that option 14 does:  crtbndrpg, crtrpgpgm,
crtclpgm, crtpf, crtlf, crtdspf, crt??? depending on member type, the list
goes on and on....

that could get pretty hairy, doncha think?

rick

-----midrange-l-bounces@xxxxxxxxxxxx wrote: -----

Put a command above QSYS in the system portion of library list, same name
as what 14 calls, same parameters? That uses your program?

Was this possible before V5R2? I didn't know about it if it were.

HTH

Vern


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.