I have a variable account-number declared as comp-3, s9(10)
comp-3 in a file. How do i find a particular account number
say 123456 in that file?

Answer Posted / manoj

there are few ways for that
1. Write a cobol program
if com3field = 123456
display 'record'
2. Open the file in HEX ON mode and read records one by one :)
3. else use sort utility in jcl
OPTION COPY
INCLUDE COND=(1,8,PD,EQ,123456)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the default value(s) for an initialize and what keyword allows for an override of the default?

948


how can we apply for HSBC exam(Mainframe) in India??? i went to their site and was told to submit my CV ,. etc..( totally confusing...)

2135


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 ?

2084


What are the various section in data division and briefly explain them.

905


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.

1153


What is difference between static and dynamic call in cobol?

1013


What is redefines clause in COBOL?

1028


What is the difference between binary search and sequential search?

848


What is the difference between PIC 9.99 and 9v99 in COBOL?

967


if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.

6077


What is the difference between comp and comp-3 usage?

859


What are the different rules of SORT operation?

890


Discuss about changing dataset name in proc.

953


How do define dynamic array in cobol.

852


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?

1403