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
What is the default value(s) for an initialize and what keyword allows for an override of the default?
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...)
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 ?
What are the various section in data division and briefly explain them.
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.
What is difference between static and dynamic call in cobol?
What is redefines clause in COBOL?
What is the difference between binary search and sequential search?
What is the difference between PIC 9.99 and 9v99 in COBOL?
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.
What is the difference between comp and comp-3 usage?
What are the different rules of SORT operation?
Discuss about changing dataset name in proc.
How do define dynamic array in cobol.
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?