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 amode(24)?
What is the default value(s) for an initialize? What keyword will allow for an override of the default?
How do get the result of your program directly on your pc?
What is rmode(any) ?
what is s000 u4087 error? please give the all error codes in cobol,jcl.
What is redefines clause in COBOL?
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
Why did you choose to work with ibm mainframe cobol programming?
Difference between array and sub-script ?
Can we change the password using ALTER? anyone tried and changed?
how do you reference the ksds vsam file formats from cobol programs
Whats the difference between search & search ALL?
What is the difference between Call and a Link?
Can a Search can be done on a table with or without Index?
What is cobol?