i have a sequencial file contains multiple records, i want
to extract one row which contains various fields like order
number,date,warehouse,.ect.. in to the another file by
accepting the order number from jcl. how can i do it. pls
help me..
Answer Posted / sowjanya
let say ur input file is like below.
FD input-file.
01 input-record.
05 order-number pic x(5).
05 order-date pic x(10). etc.
the order number passed by the JCl willbe received in cobol
thru linkage section .let say that is LS-ORDER-NUMBER.
code like below in procedure division.
Procedure division.
Read input-file until EOF
at end move 'Y' to EOF.
if order-number = ls-order-number
write out-rec from input-record.
Here the out-rec contains only one record that has order
number equals to the order number received from JCL.
Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?
What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?
How to remove 2 duplicate records and copy only one using job control language?
INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?
What are the different rules to perform a Search?
what is difference between cobol and cobol/400
EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?
How do define dynamic array in cobol.
how can i see junk values in dclgen or in hostvariable of comp ?
What are various search techniques in cobol? Explain.
What is the difference between structured cobol programming and object alternativelyiented cobol programming?
What is perform what is varying?
System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..
how to access the file from prodution from changeman tool and to submit a file to production
In COBOL programming, what is PERFORM? What is VARYING?