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

Can we redefine the field of x(200) to less than 200?

955


Why occurs cannot be used in 01 level in COBOL?

808


Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?

812


How to know whether the module is dynamical or statistical?

750


what is s000 u4087 error? please give the all error codes in cobol,jcl.

17284






how to move the records from file to array table. give with code example

2315


What is the Purpose of Pointer in the string?

721


How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?

2129


How you can characterize tables in cobol?

817


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

831


What are INPUT PROCEDURE and OUTPUT PROCEDURE?

806


input= ,,,, mainframe training ,,, hyderabad .... location.... output1=$ mainframe training in hyderabad location$ output2=**** mainframe training in hyderabad location ****. In this pgn when we give input considering the spaces the output is displayed in this format.Like in the place of ,,,, $ should be displayed likewise.So please helpmeout.

1863


Write the code implementing the perform … varying.

722


What is a scope terminator give example?

735


In COBOL programming, what is PERFORM? What is VARYING?

755