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
What is comp-1 and comp-2?
what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.
What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?
how do you reference the ksds vsam file formats from cobol programs
How do we get current date from system with century in COBOL?
How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that
i want a program using by if, evaluate , string, unstring, perform, occurs?
When is inspect verb is used in cobol?
Name some of the examples of COBOl 11?
how do you reference the printer file formats from cobol programs
Difference between cobol and cobol-ii?
What is the utilization of copybook in cobol? Could we utilize a similar copybook?
can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech
1.Is it possible to move the data from 99.99 to 99v99? 2.What is the CICS-vsam Compilation process? 3.In My GDG 5 generation will be there GDG3 got an abend what will happen? 4.In my GDG first generation is +1 And I want to add the new generation what will happen previous generation? 5.How can you give the PIC clause below conditions A). s9 (reddy), B). s9 (5) occurs 5 times? 6.How override the proc from a particular step? and what is symbolic and override Procs?
If you are current on the owner of a set, what is the difference between obtain next and obtain first?