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


Please Help Members By Posting Answers For Below Questions

Write the code to count the sum of n natural numbers.

701


How arrays can be defined in COBOL?

664


) How do u handle errors in BMS macro

1512


Which is not true about evaluate statement

1587


What are the different rules of SORT operation?

700






State the various causes of s0c1, s0c5 and s0c7.

665


What is the use of intialize verb?

750


There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.

934


How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)

2723


In COBOL, what is the different between index and subscript?

761


how do you reference the variable block file formats from cobol programs

688


what is the use of outrecord?

1771


input 1 input2 ouput1 output2 output 3 1 re 300 1 re 200 1 re 300 3 rc 500 1 re 200 2 rr 400 1 re 300 2 rr 400 1 rc 400 3 rc 500 1 rc 400 2 rr 700 2 rr 700 5 tt 900 5 tt 900 2 inputs r in flat file and output 1 is matched records,ouptput2 is unmatched of input1,output3 is unmatched of input2! how vl u get the output files using sequential order and to check with each and every records! let me know the procedure division ?

1876


HOw can I get the negative sign while deduct high value from low value

1791


How to remove 2 duplicate records and copy only one using job control language?

754