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

Passing param from a Cobol prog to JCL without using files??


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
prabhu v

New User


Joined: 03 Feb 2008
Posts: 5
Location: mumbai

PostPosted: Mon Feb 18, 2008 6:03 pm
Reply with quote

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
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Mon Feb 18, 2008 6:15 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Feb 18, 2008 6:16 pm
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon Feb 18, 2008 6:18 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Mon Feb 18, 2008 7:30 pm
Reply with quote

It amazes me that the simplest solutions are for some reason disallowed.

Except for HOMEWORK questions I think.
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: Mon Feb 18, 2008 9:14 pm
Reply with quote

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
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Mon Feb 18, 2008 9:55 pm
Reply with quote

yeap, much more funny than...eliminating duplicated records, sort file record by key...

icon_biggrin.gif
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Tue Feb 19, 2008 12:51 pm
Reply with quote

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 icon_biggrin.gif

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
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Tue Feb 19, 2008 2:06 pm
Reply with quote

[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
View user's profile Send private message
prabhu v

New User


Joined: 03 Feb 2008
Posts: 5
Location: mumbai

PostPosted: Tue Feb 19, 2008 4:13 pm
Reply with quote

Hi Guys,

thanks for al you reply... icon_biggrin.gif 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
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Tue Feb 19, 2008 6:00 pm
Reply with quote

well done!
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts Write line by line from two files DFSORT/ICETOOL 7
Search our Forums:

Back to Top