MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Updating Cobol File Content by looking-Up a DB2 table

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
sakreg
Beginner


Joined: 28 Feb 2005
Posts: 80
Topics: 26

PostPosted: Tue Mar 01, 2005 5:10 am    Post subject: Updating Cobol File Content by looking-Up a DB2 table Reply with quote

Hi,

My need is to write to a file. The program is already in place but requires a modification as below:

Th program as of now creates a blind dump of whatever is there from some 10+ tables and writes to a file.

The requirement now is, while fetching the rows from a table (T1) to write to a file, I need to check an attribute for a null date (0001-01-01). If this is there then I need to look-up another table (T2) read an attribute value from there and write with the new value in the file. NO values is updated in the table. Only while writing to the file, I need to fetch the value from T2 based on a key.

If I read from T1 data like below:

01
0001-01-01

From T2 I need to find out for 01:

01
2004-01-01

and while writing this in file for dump of T1 that should look like:
012004-01-01 instead of 010001-01-01

This is pretty straight forward but since I am to Mainframe from Unix, I am bit confused about how we defiine all the divisions, sections so on..

So if any of you Cobol Guys out there can helpout on this will be of great help. A sample cobol pgm for similar scenario would help. I can visualize what is required but not able to put together the bits and pieces Sad

Thanks
Back to top
View user's profile Send private message
sakreg
Beginner


Joined: 28 Feb 2005
Posts: 80
Topics: 26

PostPosted: Wed Mar 02, 2005 7:34 am    Post subject: Reply with quote

Thanks Ravi
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group