How to Read a File CICS
IDENTIFICATIO DIVISION.
PROGRAM-ID. AD12GM.
DATA DIVISION.
WORKING-STORAGE SECTION.
COPY FILE01.
COPY FILE02.
01 COMMAREA.
02 VARS PIC X(4).
01 REC1.
02 EID2 PIC X(4).
02 FILLER PIC X.
02 ENAME2 PIC X(10).
02 FILLER PIC X.
02 ESAL2 PIC 9(5).
02 FILLER PIC X(59).
77 LENG PIC S9(4) COMP.
PROCEDURE DIVISION.
MOVE LOW-VALUES TO FILEI.
MOVE LOW-VALUES TO FILE1I.
MOVE LOW-VALUES TO FILEO.
MOVE LOW-VALUES TO FILE1O.
EXEC CICS SEND
MAP(‘FILE1’)
MAPSET(‘FILE02’)
ERASE
END-EXEC.
PERFORM READ-PARA.
EXEC CICS SEND
MAP(‘FILE’)
MAPSET(‘FILE01’)
END-EXEC.
EXEC CICS RETURN END-EXEC.
STOP RUN.
READ-PARA.
EXEC CICS RECEIVE
MAP(‘FILE1’)
MAPSET(‘FILE02’)
END-EXEC.
MOVE EID1I TO EID2.
EXEC CICS READ
FILE(‘FILE001’)
INTO(REC1)
RIDFLD(EID2)
LENGTH(LENGTH OF REC1)
END-EXEC.
MOVE EID2 TO EIDO.
MOVE ENAME2 TO ENAMEO.
MOVE ESAL2 TO ESALO.
Keep Reading
Latest from the Blog
FAANG-Style SQL Interview Traps (And How to Avoid Them)
SQL interviews at FAANG (Facebook/Meta, Amazon, Apple, Netflix, Google) are not about syntax. They are designed to test logical thinking, edge cases, execution order, and data correctness at scale. Many strong candidates fail—not because they don’t know SQL, but because they fall into subtle traps. In this blog, we’ll walk through real FAANG-style SQL traps,…
Common Databricks Pipeline Errors, How to Fix Them, and Where to Optimize
Introduction Databricks has become a premier platform for data engineering, especially with its robust integration of Apache Spark and Delta Lake. However, even experienced data engineers encounter challenges when building and maintaining pipelines. In this blog post, we’ll explore common Databricks pipeline errors, provide practical fixes, and discuss performance optimization strategies to ensure your data…
AWS Interview Q&A for Beginners (Must Watch!)
The content outlines essential AWS basics interview questions that every beginner should be familiar with. It serves as a resource for fresh candidates preparing for interviews in cloud computing. The link provided leads to additional multimedia content related to the topic.






