Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Passing param from a Cobol prog to JCL without using files??
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10272
Location: italy

PostPosted: Mon Feb 18, 2008 6:16 pm    Post subject: Reply to: Passing param from a Cobol prog to JCL without usi
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: 3158
Location: Tucson AZ

PostPosted: Mon Feb 18, 2008 6:18 pm    Post subject: Re: Passing param from a Cobol prog to JCL without using fil
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: 8593
Location: Back in jolly old England

PostPosted: Mon Feb 18, 2008 7:30 pm    Post subject:
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

Site Director


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

PostPosted: Mon Feb 18, 2008 9:14 pm    Post subject: Reply to: Passing param from a Cobol prog to JCL without usi
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Tue Feb 19, 2008 12:51 pm    Post subject:
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    Post subject:
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    Post subject: Reply to: Passing param from a Cobol prog to JCL without usi
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
No new posts getting three output files out of JOI... migusd SYNCSORT 4 Mon Jun 05, 2017 11:30 pm
No new posts COBOL DB2 program - zIIP eligible vasanthz COBOL Programming 7 Wed May 31, 2017 5:12 am
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us