View previous topic :: View next topic
|
Author |
Message |
Sandip Mallick
New User
Joined: 02 Jun 2022 Posts: 5 Location: India
|
|
|
|
I have a file of variable length from where I want to fetch a particular field for each record after a specific field. How can I achieve this using Cobol Program.
For example : the two records in a VB file looks like
POL :123456 CLIENT NAME : ROB PARKER PREMIUM DUE DATE: FEB, 13, 23
POL :678844 CLIENT NAME : S PETER PREMIUM DUE DATE: JAN, 04, 23
My requirement is to fetch the date for rec1 FEB, 13, 23 & for rec2 JAN, 04,23 after the constant field name PREMIUM DUE DATE.
How to achieve this in a COBOL program. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2141 Location: USA
|
|
|
|
Sandip Mallick wrote: |
How to achieve this in a COBOL program. |
Required steps are as follows:
1. Read a number of manuals and guides on COBOL
2. Train yourself with multiple examples on data processing using COBOL
3. Learn something about Joining Records algorithms
4. Write a code in COBOL to perform record joining specific to your case
5. Debug your code using test input data
6. Bingo! Your job is done!
P.S.
Much more simple solution would be: using DFSORT/SYNCSORT utility for this routine task |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
Moved to Beginners section, please refer the manuals or sample existing programs in your shop. |
|
Back to top |
|
|
|