|
Scott: Here's a Q&D CL program that will do what you want: /**********************************************************/ /* Program: CHGSRCTYPE */ /* Date: 3/12/2003 */ /* Author: S. Landess */ /* */ /* Purpose: Change the source type of all members in */ /* a source file */ /* */ /*Parameters: Self-documenting */ /* */ /**********************************************************/ PGM PARM(&SRCFILE &SRCLIB &NEWSRCTYPE) DCL VAR(&SRCFILE) TYPE(*CHAR) LEN(10) DCL VAR(&SRCLIB) TYPE(*CHAR) LEN(10) DCL VAR(&NEWSRCTYPE) TYPE(*CHAR) LEN(10) DCL VAR(&JOB) TYPE(*CHAR) LEN(10) DCL VAR(&USER) TYPE(*CHAR) LEN(10) DCL VAR(&MESSAGE) TYPE(*CHAR) LEN(132) DCLF FILE(QAFDMBRL) RTVJOBA JOB(&JOB) USER(&USER) CHKOBJ OBJ(QSYS/&SRCLIB) OBJTYPE(*LIB) MONMSG MSGID(CPF0000) EXEC(DO) CHGVAR VAR(&MESSAGE) VALUE('Source library ' *CAT + &SRCLIB *TCAT ' does not exist or you are + not authorized') SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) + MSGDTA(&MESSAGE) MSGTYPE(*ESCAPE) ENDDO CHKOBJ OBJ(&SRCLIB/&SRCFILE) OBJTYPE(*LIB) MONMSG MSGID(CPF0000) EXEC(DO) CHGVAR VAR(&MESSAGE) VALUE('Source file ' *CAT + &SRCFILE *TCAT ' in library ' *CAT + &SRCLIB *TCAT ' does not exist or you are + not authorized') SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) + MSGDTA(&MESSAGE) MSGTYPE(*ESCAPE) ENDDO DLTF FILE(QTEMP/QAFDMBRL) MONMSG MSGID(CPF0000) DSPFD FILE(&SRCLIB/&SRCFILE) TYPE(*MBRLIST) + OUTPUT(*OUTFILE) OUTFILE(QTEMP/QAFDMBRL) OVRDBF FILE(QAFDMBRL) TOFILE(QTEMP/QAFDMBRL) STEP01: RCVF MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(STEP100)) CHGPFM FILE(&MLLIB/&MLFILE) MBR(&MLNAME) + SRCTYPE(&NEWSRCTYPE) MONMSG MSGID(CPF0000) EXEC(DO) CHGVAR VAR(&MESSAGE) VALUE('Error while changing + file: ' *CAT &MLLIB *TCAT '/' *CAT + &MLFILE *TCAT ' Member ' *CAT &MLNAME) SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) + MSGDTA(&MESSAGE) TOMSGQ(&USER) ENDDO GOTO CMDLBL(STEP01) STEP100: RCLRSC STEP999: ENDPGM /*****************************************************/ HTH Steve Landess Austin, Texas (512) 423-0935 ----- Original Message ----- From: <SCarter@xxxxxxxxxxx> To: "RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx> Sent: Wednesday, March 12, 2003 4:44 PM Subject: Activation Groups with CL > > My shop has all of th code converted to rpg IV syntax but still use the > DAG. What would it take to move a shop where just about ever RPG is called > by a CL that does overrides and compiled in the DAG. Would you use *new for > the CLs or *caller or just have to decide at compile time? > > Also, is there a way in PDM to change the default compile program for CLs > to be crtbndcl instead of crtclpgm? > > ____________________________________________________ > > J. Scott Carter > Programmer/Analyst > e-mail: Mailto:scarter@xxxxxxxxxxx > Phone: 214.583.0348 > > It's not the destination that counts in life it's the journey. The journey > with the people we love is all that really matters. Such a simple truth so > easily forgotten. > > > _______________________________________________ > This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list > To post a message email: RPG400-L@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/rpg400-l > or email: RPG400-L-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/rpg400-l. > >
As an Amazon Associate we earn from qualifying purchases.
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.