This sample Program demonstrates on how to read a file and load it into an array and use that array to search reference data. Based on the data findings write it into the output file. Input Customer File – Customer Transactions file containing Customer Number, Name and Country code. Input Country code reference file –
This sample program explains how to define a PS(Physical Sequential) File in different divisions and the steps to access it in the procedure division. Steps: Environment Division –> Input-Output Section –> File-Control . Here COBOL File name is given to the PS file and a linking between the cobol program and PS file is established.
Sample RUN JCL for a COBOL Program – In Mainframes area any batch COBOL program needs to have its corresponding JCL to run it without which it can not be executed. As we know JCL is a JOb Control Language which is used to run and control the execution of the programs. So JOB written
COBOL Batch program(example) is a cobol program that runs in a bath mode. Unlike the Online programs, batch programs runs in background. To execute any Batch program a JOB written in JCL(Job Control Language) is required. This JOB is also used to specify any files that are used in that program. Generally Batch programs are