ADD Program in CICS-COBOL: ID DIVISION. PROGRAM-ID. AD12GM. DATA DIVISION...
ID DIVISION.
PROGRAM-ID. AD12GM.
DATA DIVISION.
WORKING-STORAGE SECTION.
COPY ADD001.
01 RES.
02 A PIC 9(3).
02 B PIC 9(3).
02 C PIC 9(4).
77 Z PIC X(80).
PROCEDURE DIVISION.
MOVE LOW-VALUES TO ADD1I.
MOVE LOW-VALUES TO ADD1O.
EXEC CICS
SEND MAP('ADD1') MAPSET('ADD001')
END-EXEC.
EXEC CICS
RECEIVE MAP('ADD1') MAPSET('ADD001')
END-EXEC.
MOVE NO1I TO A.
MOVE NO2I TO B.
COMPUTE C = A + B.
MOVE C TO RESO.
EXEC CICS
SEND MAP('ADD1') MAPSET('ADD001')
ERASE
END-EXEC.
EXEC CICS RETURN END-EXEC.
Map for Addtion:
ADD001 DFHMSD TYPE=&SYSPARM, X
MODE=INOUT, X
TIOAPFX=YES, X
STORAGE=AUTO, X
LANG=COBOL, X
CTRL=FREEKB
ADD01 DFHMDI SIZE=(24,80),LINE=1,COLUMN=1
DFHMDF INITIAL='ADD PGM',POS=(1,38),LENGTH=10,ATTRB=PROT
DFHMDF INITIAL='ENTER NO1:',POS=(05,11),LENGTH=10,ATTRB=PROT
NO1 DFHMDF POS=(05,22),LENGTH=3,ATTRB=(UNPROT,IC),PICIN='999', X
INITIAL='___'
DFHMDF POS=(05,26),LENGTH=1,ATTRB=ASKIP
DFHMDF INITIAL='ENTER NO2:',POS=(06,11),LENGTH=10,ATTRB=ASKIP
NO2 DFHMDF POS=(06,22),LENGTH=03,ATTRB=UNPROT,PICIN='999', X
INITIAL='___'
DFHMDF INITIAL='RESULT :',POS=(08,11), X
LENGTH=09,ATTRB=PROT
RES DFHMDF POS=(08,22),ATTRB=UNPROT, X
LENGTH=04,PICOUT='9999', X
INITIAL='____'
File Program's in COBOL:
- PS TO RRDS CLUSTER (WRITING)
- PS TO KSDS CLUSTER (WRITE)
- RUNJCL TO RRDS (WRITE)
- RUNJCL TO RRDS (WRITE)
- RUNJCL TO KSDS CLUSTER(WRITE)
- FETCH A RECORD BY USING RANDOM IN RRDS CLUSTER
- FETCH A RECORD BY USING RANDOM IN KSDS CLUSTER
- FETCHING RECORDS BY USING DYNAMIC IN RRDS CLUSTER
- FETCH RECORDS BY USIING DYNAMIC IN KSDS CLUSTER
- INSERT A RECORD IN RRDS CLUSTER
- INSERT A RECORD IN KSDS CLUSTER
- REWRITE A RECORD IN RRDS CLUSTER
- REWRITE A RECORD IN KSDS CLUSTER
- DELETE A RECORD IN RRDS CLUSTER
No comments
Post a Comment