Skip to content

Commit

Permalink
Remise en place des intructions du précompilateur STRPREPRC.
Browse files Browse the repository at this point in the history
  • Loading branch information
ibmiiste committed Jul 6, 2021
1 parent 0fd718f commit c3484b2
Show file tree
Hide file tree
Showing 4 changed files with 563 additions and 533 deletions.
60 changes: 35 additions & 25 deletions QCLSRC/CPYOBJ.CLLE
Original file line number Diff line number Diff line change
@@ -1,25 +1,35 @@
PGM PARM(&BIBORI &OBJORI &TYPOBJ &BIBDST)

DCL VAR(&BIBORI) TYPE(*CHAR) LEN(10)
DCL VAR(&OBJORI) TYPE(*CHAR) LEN(10)
DCL VAR(&TYPOBJ) TYPE(*CHAR) LEN(10)
DCL VAR(&BIBDST) TYPE(*CHAR) LEN(10)
DCLPRCOPT ALWRTVSRC(*YES) TEXT('Copie d''un objet +
d''une bib � une autre') BNDDIR(I_BUILDER)

MONMSG MSGID(CPF0000) EXEC(GOTO CMDLBL(ERREUR))

CHKOBJ OBJ(&BIBDST/&OBJORI) OBJTYPE(&TYPOBJ)
MONMSG MSGID(CPF9801) EXEC(GOTO CMDLBL(COPYOBJ))
DLTOBJ OBJ(&BIBDST/&OBJORI) OBJTYPE(&TYPOBJ)
COPYOBJ: CRTDUPOBJ OBJ(&OBJORI) FROMLIB(&BIBORI) +
OBJTYPE(&TYPOBJ) TOLIB(&BIBDST)
GOTO CMDLBL(FIN)

ERREUR: DMPCLPGM
CALLPRC PRC(GEST_ERREUR)


FIN: RETURN
ENDPGM

/* >>PRE-COMPILER<< */
/* >>CRTCMD<< CRTCLMOD MODULE(&LI/&OB) SRCFILE(&SL/&SF) + */
/* SRCMBR(&SM); */
/* >>IMPORTANT<< */
/* >>PARM<< OPTION(*EVENTF); */
/* >>PARM<< DBGVIEW(*LIST); */
/* >>END-IMPORTANT<< */
/* >>EXECUTE<< */
/* >>END-PRE-COMPILER<< */

PGM PARM(&BIBORI &OBJORI &TYPOBJ &BIBDST)

DCL VAR(&BIBORI) TYPE(*CHAR) LEN(10)
DCL VAR(&OBJORI) TYPE(*CHAR) LEN(10)
DCL VAR(&TYPOBJ) TYPE(*CHAR) LEN(10)
DCL VAR(&BIBDST) TYPE(*CHAR) LEN(10)
DCLPRCOPT ALWRTVSRC(*YES) TEXT('Copie d''un objet +
d''une bib � une autre') BNDDIR(I_BUILDER)

MONMSG MSGID(CPF0000) EXEC(GOTO CMDLBL(ERREUR))

CHKOBJ OBJ(&BIBDST/&OBJORI) OBJTYPE(&TYPOBJ)
MONMSG MSGID(CPF9801) EXEC(GOTO CMDLBL(COPYOBJ))
DLTOBJ OBJ(&BIBDST/&OBJORI) OBJTYPE(&TYPOBJ)
COPYOBJ: CRTDUPOBJ OBJ(&OBJORI) FROMLIB(&BIBORI) +
OBJTYPE(&TYPOBJ) TOLIB(&BIBDST)
GOTO CMDLBL(FIN)

ERREUR: DMPCLPGM
CALLPRC PRC(GEST_ERREUR)


FIN: RETURN
ENDPGM

Loading

0 comments on commit c3484b2

Please sign in to comment.