1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
Identification Division.
PROGRAM-ID. COBHELLO.
*===============================================================
* Exemple d'appel programmes Enterprise COBOL imbriqués
* Envoi d'un message reçu en PARM
*===============================================================
Data Division.
Working-Storage Section.
*========================
01 WS-COBHELLO pic x(16) VALUE '* WSS COBHELLO'.
01 WS-PARM pic x(100).
*================
Linkage Section.
*================
* PARM reçu
01 LK-PARM.
05 LK-PARM-LG pic s9(4) Binary.
05 LK-PARM-DATA pic x(100).
*===================================
Procedure Division Using LK-PARM.
*===================================
DEBUT-PGM.
* Acquisition
Move LK-PARM-DATA(1:LK-PARM-LG) to WS-PARM
CALL 'COBMESS' using WS-PARM by content length of WS-PARM
* Retour
String 'Fin du Programme COBHELLO le : '
function current-date(1:16) '.' delimited by size
into WS-PARM
CALL 'COBMESS' using WS-PARM by content length of WS-PARM
Move zero to return-code
Goback.
Identification Division.
PROGRAM-ID. COBMESS.
*==============================================================*
* Gestion des messages *
*==============================================================*
Data Division.
Working-Storage Section.
Linkage Section.
*================
01 LMESSAG-PARM Pic x(256).
01 LMESSAG-PARM-LG Pic s9(8) Binary.
Procedure Division using LMESSAG-PARM LMESSAG-PARM-LG.
Display LMESSAG-PARM(1:LMESSAG-PARM-LG)
Goback.
End Program COBMESS.
End Program COBHELLO. |