I have the file which is having the extension no as records.
sample file will look like below.
2310
3410
3256
4350
3781
5408
I need to replace the record which is starting with 3 to 5
(i.e) 3410 to 5410. How can we do it through cobol
and cobol-db2 program? I need the possible logic?
Answer Posted / santy
You can solve this problem using the Referencial Intigrity.
Let consider these extension no. in WS section.
01 WS-EXTN PIC X(4).
IF WS-EXTN(1,1)='3'
ISPECT WS-EXTN replacng first '3' by '5'
END-IF.
read the next record.
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
Write the code to count the sum of n natural numbers.
How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?
System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..
What is the default value(s) for an initialize? What keyword will allow for an override of the default?
A table has two indexes defined. Which one will be used by the SEARCH?
What happens when we move a comp-3 field to an edited (say z (9). Zz-)?
Why would you use find and get rather than to obtain?
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 ?
IF I mention stop run in CICS what happens?
Explain how you can characterize tables in cobol?
I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?
What is link edit in cobol?
Discuss about changing dataset name in proc.
Write a program to explain size error.
How do define dynamic array in cobol. how do you define single dimensional array and multidimensional array in your cobol?