IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to retrieve data stored in a variable in another run?


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
guruji
Warnings : 1

New User


Joined: 13 Apr 2007
Posts: 59
Location: Chennai

PostPosted: Wed Jan 16, 2008 7:04 pm
Reply with quote

Hi all,

I have run a COBOl pgm, and a data is stored in a variable. I need the same data in the same variable in the consequent runs of the program. How is it possible? Can anyone help me on this?
Is there something like RESTORE?

Thanks,
lax
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Wed Jan 16, 2008 7:05 pm
Reply with quote

Lax,

Save the values in a file and read it in next run.
Back to top
View user's profile Send private message
guruji
Warnings : 1

New User


Joined: 13 Apr 2007
Posts: 59
Location: Chennai

PostPosted: Wed Jan 16, 2008 7:07 pm
Reply with quote

Hi murmohk,

But according to the standards and conventions specific to my requirement, i have some limitations for using additional files. Is there any other way?

Thanx,
lax
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Wed Jan 16, 2008 8:01 pm
Reply with quote

lax,
I had already answered your question. If you get other way, then let us know.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Jan 16, 2008 8:06 pm
Reply with quote

But where else would it be stored if not in an external file.
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Wed Jan 16, 2008 8:13 pm
Reply with quote

Expat,

Quote:
But where else would it be stored if not in an external file

Thats what I wanted to know from TS. If he comes up with an unusual (rahter unique) way.... we can learn from his experience.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Jan 16, 2008 8:14 pm
Reply with quote

I think the O/P needs to be more clearer when they mention "consequent runs of the program". In what type of environment are these occuring? Maybe the environment can hold the value(s).

Also, I don't know much about databases, but could a single data item be stored in a database table rather than in a dataset?
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Wed Jan 16, 2008 8:19 pm
Reply with quote

Kevin,

Quote:
I don't know much about databases, but could a single data item be stored in a database table rather than in a dataset?

I believe you are suggesting to store the values in a database as one record.

But TS second post says, 'limitation in using addl files'. I doubt he has the comfort of accessing database. That to for one record, a separate table needs to be created. Again pain ......
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Wed Jan 16, 2008 10:09 pm
Reply with quote

Why the additional file liimitation? If this is for a non-technical reason, then the wrong group is running the show. If technical, then it better be a good one.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jan 16, 2008 10:55 pm
Reply with quote

Hello,

Quote:
I have run a COBOl pgm, and a data is stored in a variable.
How did the data get into the variable?

Could the same method not be used for all of the other processes that need the same value?

It came from "somewhere" and i suspect that same "where" could be used multiple times.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts How to save SYSLOG as text data via P... All Other Mainframe Topics 4
No new posts Store the data for fixed length COBOL Programming 1
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
Search our Forums:

Back to Top