Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 10327
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 IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
No new posts Comparing 2 Files using Current time arunsoods SYNCSORT 9 Fri Sep 22, 2017 6:00 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us