View previous topic :: View next topic
|
Author |
Message |
prabhu v
New User
Joined: 03 Feb 2008 Posts: 5 Location: mumbai
|
|
|
|
I have a job which executes a Cobol program in Step01. This is a simple cobol program which calculates a certain variable say "X".
Now in Step02 of the same job I want to use this variable "X" for certain other operations.
My question is, how can i pass the value of X from the cobol program to a step in the same job, without using a flat file. i.e. I have a restriction in using a flat file in the cobol program, where I can write the file with the value of X, and use this file in the next step.
So how can I pass a value calculated in a cobol program to a step in the same job, without using a flat file ? |
|
Back to top |
|
|
acevedo
Active User
Joined: 11 May 2005 Posts: 344 Location: Spain
|
|
|
|
So how can I pass a value calculated in a cobol program to a step in the same job, without using a flat file ?
using a db2 table? if db2 is not an option, I really don't know how. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
there are not many choices about where to store vaues to be passed between different steps...
files,
data base ( DB2,....) tables,
data base( IMS/DB) databases ,
data base ( other providers ) entities
for a simple parameter, it look very unreasonable, not to use a simple PS( flat ) file
think about the overhead of defining databases/tables, compilation and setup overhead, .... |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
prabhu v wrote: |
I have a restriction in using a flat file in the cobol program, where I can write the file with the value of X, and use this file in the next step. |
Silly restriction......
An MQ queue is not a 'flat file', a DB2 table is not a 'flat file', a keyed or relative record VSAM file is not a 'flat file', a PDS member is not a 'flat file'......
Actually, a temp flat file would be the simplest...... |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
It amazes me that the simplest solutions are for some reason disallowed.
Except for HOMEWORK questions I think. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Quote: |
It amazes me that the simplest solutions are for some reason disallowed. |
Think now much "fun" it would be to work on projects with that kind of management. . . .
d |
|
Back to top |
|
|
acevedo
Active User
Joined: 11 May 2005 Posts: 344 Location: Spain
|
|
|
|
yeap, much more funny than...eliminating duplicated records, sort file record by key...
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Quote: |
yeap, much more funny than...eliminating duplicated records, sort file record by key... |
How about duplicated programs ?
I spent six months converting REXX programs to SAS as they were deemed faster and more efficient.
My manager at that time, bless him, deemed it safe enough to delete the original REXX programs without backups once the project was completed.
Aaaaaaaaaaah, two weeks before the end of my contract, the bean counters decided that SAS was too expensive and was to be replaced by REXX. Still, it clocked up another six months to convert then back again
I think that those SAS programs are still about the most backed up entity in the history of IT ..............
But back to the main thread, maybe the OP could split the job into two jobs running in parallel using batch pipes, that won't use a flat file. |
|
Back to top |
|
|
acevedo
Active User
Joined: 11 May 2005 Posts: 344 Location: Spain
|
|
|
|
[quote="expat"]
Quote: |
But back to the main thread, maybe the OP could split the job into two jobs running in parallel using batch pipes, that won't use a flat file. |
that's why I underlined in the same job...
IMHO that's the key of this thread... (asumming VSAM/DB2 cannot be used). |
|
Back to top |
|
|
prabhu v
New User
Joined: 03 Feb 2008 Posts: 5 Location: mumbai
|
|
|
|
Hi Guys,
thanks for al you reply... i myself get furuated when the simplest solutions are not allowed.
Neways, i have convinced by PM for using simple flat files for my requirement.
One more solution for this problem, is by using Return codes, but by doing so, we can have predefined values only, that is passed from Cob to JCL.
thanks for your replies.
~Prabhu |
|
Back to top |
|
|
acevedo
Active User
Joined: 11 May 2005 Posts: 344 Location: Spain
|
|
|
|
well done! |
|
Back to top |
|
|
|