Sample Cobol Program With Copybook
Mainframe COBOL 2 File MatchMerge sample code IDENTIFICATION DIVISION. PROGRAM ID. SAMPMTCH. DATE COMPILED. THIS PROGRAM COMPARES THE CAP INFO AGAINS THE ELIG INFO AND CREATES A FILE OF MATCHED PROVIDER, PERSON, RATE INFO. THE NEW RATE FILE IS TAB DELIMITED FOR DOWNLOAD AND USE The coding workspace comprises columns 271, and is completely freeform. Column 1 is reserved for printer control. Programs start and end as shown above YOURNAME is. WITH A WIN BASED SYSTEM. THIS CODE IS A STRIPPED DOWN VERSION OF AN ACTUAL PRODUCTION PROGRAM NEARLY ALL OF THE BUSINESS RULES LOGIC HAS BEEN REMOVED TO MAKE THE EXAMPLE EASIER TO READ. IF YOU CHOOSE TO USE THIS MODEL, PLEASE MAKE SURE YOU THOROUGHLY TEST YOUR VERSION BEFORE USING FOR SOME BUSINESS REQUIREMENT. ENVIRONMENT DIVISION. CONFIGURATION SECTION. Sample Cobol Program With Copybook' title='Sample Cobol Program With Copybook' />INPUT OUTPUT SECTION. SELECT COMP CAP ASSIGN TO UT S CAP. SELECT COMP ELG ASSIGN TO UT S ELIG. SELECT NEW RATE ASSIGN TO UT S NEWRATE. DATA DIVISION. LABEL RECORDS ARE STANDARD. RECORDING MODE IS F. BLOCK CONTAINS 0 RECORDS. COMP CAP REC. 0. CCR PROV PIC X9. CCR FILL PIC X. CCR RATE PIC X5. FILLER PIC X6. RECORDING MODE IS F. BLOCK CONTAINS 0 RECORDS. LABEL RECORDS ARE STANDARD. COMP ELG REC. 0. COBOL Data Layout Learn Cobol in simple and easy steps starting from basic to advanced concepts with examples including Overview, Environment Setup, Program. JCL VSAM wrote a cobol program and i am able to compile it and when i tried to run it i got a SOC7. IDCAMS Create and delete GDG base using JCL. IDCAMS Utility can be used to create a GDG base, as well as deleting an existing base. Define a GDG base. CER PRSN PIC X1. FILLER PIC X. CER PROV PIC X9. FILLER PIC X5. FD NEW RATE. RECORDING MODE IS F. BLOCK CONTAINS 0 RECORDS. LABEL RECORDS ARE STANDARD. NEW RATE REC PIC X8. WORKING STORAGE SECTION. WKS MESSAGE PIC X2. VALUE. WORKING STORAGE SECTION. CAP READ PIC 97 COMP 3 VALUE 0. ELG READ PIC 97 COMP 3 VALUE 0. NEW RATE RECS PIC 97 COMP 3 VALUE 0. RATE ZEROED PIC 97 COMP 3 VALUE 0. TOT MONEY PIC 97V9. COMP 3 VALUE 0. 0. MATCH FILES. 0. 5 NEED CAP PIC X VALUE Y. NEED ELG PIC X VALUE Y. EOF CAP PIC X VALUE N. EOF ELG PIC X VALUE N. COMP CAPP PIC 99 VALUE ZEROS. COMP ELIG PIC 99 VALUE ZEROS. NEW RATE REC WORK. NRR PROV PIC X9. FILLER PIC X VALUE X0. NRR PRSN PIC X1. FILLER PIC X VALUE X0. NRR RATE PIC X5. FILLER REDEFINES NRR RATE. FILLER PIC X. NRR DLR PIC 9. FILLER PIC X. NRR CENTS PIC 9. FILLER PIC X5. WORK MONEY PIC 9. V9. 9. 0. 1 WORK MONEY R REDEFINES WORK MONEY. WM DLR PIC 9. WM CENTS PIC 9. PROCEDURE DIVISION. OPEN FILES. OPEN INPUT COMP CAP. OUTPUT NEW RATE. READ CAP RECORDS. IF EOF CAP Y OR. NEED CAP N. GO TO 0. READ ELG. READ COMP CAP AT END. MOVE Y TO EOF CAP. MOVE N TO NEED CAP. MOVE 9. 99. 99. 99. TO COMP CAPP. MOVE ALL Z TO COMP CAP REC. GO TO 0. 30 READ ELG. IF CCR PROV NOT NUMERIC. DISPLAY CAP PROVIDER NOT NUMERIC SKIPPED. GO TO 0. 20 READ CAP RECORDS. MOVE CCR PROV TO COMP CAPP. ADD 1 TO CAP READ. MOVE N TO NEED CAP. IF EOF ELG Y OR. NEED ELG N. GO TO 0. MATCH FILES. READ COMP ELG AT END. MOVE Y TO EOF ELG. MOVE N TO NEED ELG. MOVE 9. 99. 99. 99. TO COMP ELIG. MOVE ALL Z TO COMP ELG REC. GO TO 0. 40 MATCH FILES. IF CER PROV NOT NUMERIC. DISPLAY ELG PROVIDER NOT NUMERIc SKIPPED. GO TO 0. 30 READ ELG. MOVE CER PROV TO COMP ELIG. ADD 1 TO ELG READ. MOVE N TO NEED ELG. MATCH FILES. IF EOF CAP Y AND. GO TO 9. 90 PUBLISH STATS. IF COMP CAPP COMP ELIG GO TO 1. CAP ELIG MATCH. IF COMP CAPP lt COMP ELIG GO TO 1. CAP NOT USED. IF COMP CAPP lt COMP ELIG. MOVE Y TO NEED CAP. GO TO 0. 20 READ CAP RECORDS. IF COMP CAPP COMP ELIG GO TO 1. GET RATE. IF COMP CAPP COMP ELIG. Crack Hardware Fingerprint Changer. MOVE Y TO NEED ELG. DISPLAY MISSING CLAIM DATA. GO TO 0. 20 READ CAP RECORDS. WE SHOULD NOT BE ABLE TO GET HERE. DISPLAY 0. 40 MATCH FILES FATAL ERROR. DISPLAY CAP CCR PROV ELIG CER PROV. DISPLAY RUN TERMINATED. CAP ELIG MATCH. MOVE Y TO NEED CAP, NEED ELG. MOVE Y TO NEED ELG. MOVE CER PROV TO NRR PROV. MOVE CER PRSN TO NRR PRSN. MOVE CCR RATE TO NRR RATE. MOVE NRR DLR TO WM DLR. MOVE NRR CENTS TO WM CENTS. COMPUTE TOT MONEY TOT MONEY WORK MONEY. WRITE NEW RATE REC FROM NEW RATE REC WORK. COMPUTE NEW RATE RECS NEW RATE RECS 1. GO TO 0. 20 READ CAP RECORDS. CAP NOT USED. MOVE Y TO NEED CAP. DISPLAY CAP RECORD NOT USED COMP CAP REC. MOVE CER PROV TO NRR PROV. MOVE CER PRSN TO NRR PRSN. MOVE CCR RATE TO NRR RATE. WRITE NEW RATE REC FROM NEW RATE REC WORK. COMPUTE NEW RATE RECS NEW RATE RECS 1. GO TO 0. 20 READ CAP RECORDS. MOVE Y TO NEED ELG. MOVE CER PROV TO NRR PROV. MOVE CER PRSN TO NRR PRSN. MOVE 0. 0. 0 TO NRR RATE. WRITE NEW RATE REC FROM NEW RATE REC WORK. COMPUTE NEW RATE RECS NEW RATE RECS 1. COMPUTE RATE ZEROED RATE ZEROED 1. GO TO 0. 20 READ CAP RECORDS. PUBLISH STATS. DISPLAY CAP RECS READ CAP READ. DISPLAY ELG RECS READ ELG READ. DISPLAY NEW RECS NEW RATE RECS. DISPLAY ZEROED RATES RATE ZEROED. DISPLAY TOTAL MONEY TOT MONEY. CLOSE COMP CAP COMP ELG NEW RATE.