Plex 2E

  • 1.  How to change C2RVC2R to be compiled as RPGLE ?

    Posted Sep 15, 2017 04:52 PM

    Is there a setting to change how  C2RVC2R  get compiled when we rebuild Condition's ?

    Right now it is been compile as RPG and we need it to be RPGLE.

    we want do not wan it  running in activation group *DFTACTGRP.

    thanks

     John Slanina



  • 2.  Re: How to change C2RVC2R to be compiled as RPGLE ?

    Posted Sep 18, 2017 10:44 PM

    G'day John,

     

    I have converted all the shipped programs to RPGIV modules using CVTRPGSRC command. The shipped source should be in Y2SYSRC library in file QRPGSRC. The member name is Y2RVC2R - YCVTCNDVAL will duplicate it and rename to have your model system prefix.

     

    I then change the pre-compile overrides to be RPGIV specific:

     

    Y* ADDBNDDIRE BNDDIR(YBNDDIR) OBJ((xxxxxxxxxx *MODULE))
    *
    Z* CRTRPGMOD
    Z* DBGVIEW(*SOURCE) CVTOPT(*DATETIME)

     

    Replace xxxxxxxxxx with the name of the shipped program name.

     

    I then use an EXCUSRSRC function to call a routine to change the generated source to use runtime modules:

     

    >> Y* CALL HBJDUPC (#*MBR #*FILE #*LIB #*TYPE)
    >> * Use Runtime Modules

     

    The source for the program to convert to CALLB is:

     

    PGM: PGM PARM(&SRCMBR &SRCF &SRCFLIB &SRCTYP)
    DCL VAR(&SRCMBR) TYPE(*CHAR) LEN(10)
    DCL VAR(&SRCMBR) TYPE(*CHAR) LEN(10)
    DCL VAR(&SRCF) TYPE(*CHAR) LEN(10)
    DCL VAR(&SRCFLIB) TYPE(*CHAR) LEN(10)
    DCL VAR(&SRCTYP) TYPE(*CHAR) LEN(10)
    DCL VAR(&#ERROR) TYPE(*CHAR) LEN(1) VALUE('0')
    DCL VAR(&##MSGID) TYPE(*CHAR) LEN(7)
    DCL VAR(&##MSGF) TYPE(*CHAR) LEN(10)
    DCL VAR(&##MSGFLIB) TYPE(*CHAR) LEN(10)
    DCL VAR(&##MSGDTA) TYPE(*CHAR) LEN(256)
    MONMSG MSGID(CPF0000) EXEC(GOTO CMDLBL(#ERROR))
    START:
    IF COND(&SRCTYP *EQ '*RP4') THEN(DO)
    Y2CPMSC: YSCNRPLSRC SRCFILE(&SRCFLIB/&SRCF) SRCMBR(&SRCMBR) +
    SCNVAL(' C +
    CALL ''Y2CPMSC''') RPLVAL('>> +
    C CALLB +
    ''Y2CPMSC''') CMPEXP(*NO) UPDCHGDTE(*YES)

    Y2RVMGC: YSCNRPLSRC SRCFILE(&SRCFLIB/&SRCF) SRCMBR(&SRCMBR) +
    SCNVAL(' C +
    CALL ''Y2RVMGC''') RPLVAL('>> +
    C CALLB +
    ''Y2RVMGC''') CMPEXP(*NO) UPDCHGDTE(*YES)
    Y2SNMGC: YSCNRPLSRC SRCFILE(&SRCFLIB/&SRCF) SRCMBR(&SRCMBR) +
    SCNVAL(' C +
    CALL ''Y2SNMGC''') RPLVAL('>> +
    C CALLB +
    ''Y2SNMGC''') CMPEXP(*NO) UPDCHGDTE(*YES)
    Y2RTJCR: YSCNRPLSRC SRCFILE(&SRCFLIB/&SRCF) SRCMBR(&SRCMBR) +
    SCNVAL(' C +
    CALL ''Y2RTJCR''') RPLVAL('>> +
    C CALLB +
    ''Y2RTJCR''') CMPEXP(*NO) UPDCHGDTE(*YES)
    Y2QLVNR: YSCNRPLSRC SRCFILE(&SRCFLIB/&SRCF) SRCMBR(&SRCMBR) +
    SCNVAL(' C +
    CALL ''Y2QLVNR''') RPLVAL('>> +
    C CALLB +
    ''Y2QLVNR''') CMPEXP(*NO) UPDCHGDTE(*YES)

    ENDDO
    END:
    GOTO CMDLBL(ENDPGM)
    #ERROR:
    IF COND(&#ERROR *EQ '1') THEN(GOTO CMDLBL(ENDPGM))
    CHGVAR VAR(&#ERROR) VALUE('1')
    ##ERROR:
    RCVMSG MSGDTA(&##MSGDTA) MSGID(&##MSGID) +
    MSGF(&##MSGF) MSGFLIB(&##MSGFLIB)
    IF COND(&##MSGID *NE ' ') THEN(DO)
    SNDPGMMSG MSGID(&##MSGID) MSGF(&##MSGFLIB/&##MSGF) +
    MSGDTA(&##MSGDTA) MSGTYPE(*DIAG)
    GOTO CMDLBL(##ERROR)
    ENDDO
    SNDPGMMSG MSGID(CPF9899) MSGF(QSYS/QCPFMSG) +
    MSGTYPE(*COMP)
    ENDPGM:
    RETURN

     

    You will need to add the runtime modules that you need - I don't think I included support for Y2RVC2R.

     

    HTH,

     

    Darryl



  • 3.  Re: How to change C2RVC2R to be compiled as RPGLE ?

    Posted Sep 19, 2017 08:25 AM

    Thats it...

      Thanks for the help.

     

    John slanina