Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Passing data from COBOL program to JCL(JOB)
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL
Author Message
Gops

New User


Joined: 21 Jul 2005
Posts: 24

PostPosted: Fri Apr 11, 2008 6:08 pm    Post subject: Passing data from COBOL program to JCL(JOB)
Reply with quote

Hi Guys,

Please let me know if there any way to pass the data form COBOL program to JCL(JOB).

Cheers,
Gopal
Back to top
View user's profile Send private message
References
Bill Dennis

Senior Member


Joined: 17 Aug 2007
Posts: 333
Location: Iowa, USA

PostPosted: Fri Apr 11, 2008 6:33 pm    Post subject:
Reply with quote

You can set a step return code from 0 to 4095 to control what step runs next.

Please describe what you want to do.
Back to top
View user's profile Send private message
Gops

New User


Joined: 21 Jul 2005
Posts: 24

PostPosted: Fri Apr 11, 2008 8:47 pm    Post subject: Reply to: Passing data from COBOL program to JCL(JOB)
Reply with quote

Hi Bill,

Thanks for quick response.

Yes we can pass the return code to halt the process(programs) by passing return codes form 0 to 4095.

I have 2 qustions for u now.

1. How can we control which step runs next by passing return codes form 0 to 4095?

2. Other that return codes can we pass any other data(value) from cobol program to the JCL?

Cheers,
Gops
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1027
Location: Virginia, USA

PostPosted: Fri Apr 11, 2008 8:56 pm    Post subject:
Reply with quote

Both questions have been asked and answered many times before.
Back to top
View user's profile Send private message
Gops

New User


Joined: 21 Jul 2005
Posts: 24

PostPosted: Mon Apr 14, 2008 1:56 pm    Post subject:
Reply with quote

Craq,

So Kind of you, Could please give the link if they have been asked earlier,
So that I can refer them and find the answer for my question.

Cheers,
Gops icon_smile.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Senior Member


Joined: 20 Oct 2006
Posts: 1671
Location: germany

PostPosted: Mon Apr 14, 2008 3:05 pm    Post subject:
Reply with quote

Gops,

so lazy of you not to look.
Back to top
View user's profile Send private message
Gops

New User


Joined: 21 Jul 2005
Posts: 24

PostPosted: Mon Apr 14, 2008 6:55 pm    Post subject:
Reply with quote

Hi Dick,

Its not being lazy, I did search to find the answer for my queries and couldn't find the relevant link.

I some some can help me to get the link i would be graeat.. icon_rolleyes.gif


Thanks,

Gops
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 3380
Location: Charlotte,NC USA

PostPosted: Mon Apr 14, 2008 6:58 pm    Post subject: Re: Reply to: Passing data from COBOL program to JCL(JOB)
Reply with quote

Gops wrote:
1. How can we control which step runs next by passing return codes form 0 to 4095?


16.5 COND Parameter from the z/OS V1R9.0 MVS JCL Reference.

17.0 Chapter 17. IF/THEN/ELSE/ENDIF Statement Construct from the z/OS V1R9.0 MVS JCL Reference.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 3277
Location: italy

PostPosted: Mon Apr 14, 2008 6:59 pm    Post subject: Reply to: Passing data from COBOL program to JCL(JOB)
Reply with quote

Why not look t the source of the knowledge itself

click on the manual link at the top of the page

and go for the JCL reference and guide

or ..
http://www-03.ibm.com/systems/z/os/zos/bkserv/index.html#other_pubs

so You can choose the manuals related to Your exact os release
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 3380
Location: Charlotte,NC USA

PostPosted: Mon Apr 14, 2008 7:57 pm    Post subject: Reply to: Passing data from COBOL program to JCL(JOB)
Reply with quote

I was thinking about making a comment that, realistically, its up to the COBOL developer to code the proper RETURN-CODE values where necessary, and from there its up to the JCL coders/Production Support team to make the decisions as to what to do with them. Its really a moot point for the developer.
Back to top
View user's profile Send private message
Gops

New User


Joined: 21 Jul 2005
Posts: 24

PostPosted: Wed Apr 16, 2008 1:35 pm    Post subject:
Reply with quote

Guys,

Thanks a lot for flood of responses, but I would rather interested to know more about ---

As COBOL developer
2. Other than return codes can we pass any other data(value) from cobol program to the JCL?

Cheers,
Gops
Back to top
View user's profile Send private message
Gnanas N

Senior Member


Joined: 06 Sep 2007
Posts: 473
Location: India

PostPosted: Wed Apr 16, 2008 2:46 pm    Post subject:
Reply with quote

Gops,
Quote:
2. Other than return codes can we pass any other data(value) from cobol program to the JCL?

No !
Back to top
View user's profile Send private message
jaspal

New User


Joined: 22 May 2007
Posts: 49
Location: mumbai

PostPosted: Sat Apr 19, 2008 12:03 am    Post subject:
Reply with quote

Hi All,

I do have solution to pass value from one program to other step of job.

lets consider job1 : step010
step020
step030

IF you want to pass value from step010 then you need to change the
scheduling.
how...?

now if step010 had one program(M5DATPGM) which holds let us consider a sequence number which need to be passed to next step020
what can we do ......................?

we would create one datalib which holds job ( that would have Step020)
now program would read that datalib and create on GDG version file by replacing that '@@@' by sequence number.

M5JOb@@@ (U,DAT),'@@@'
time=1,user=jas@@@

now in stead of step020 of job1 you would load this GDG version in jobtrac
by multigen step .
and it should trigger other job ( step030 of job1) or you can add this step in datalib to create a job in GDG version.
Back to top
View user's profile Send private message
jasorn

Active User


Joined: 12 Jul 2006
Posts: 104

PostPosted: Fri May 16, 2008 10:41 am    Post subject: Re: Reply to: Passing data from COBOL program to JCL(JOB)
Reply with quote

superk wrote:
I was thinking about making a comment that, realistically, its up to the COBOL developer to code the proper RETURN-CODE values where necessary, and from there its up to the JCL coders/Production Support team to make the decisions as to what to do with them. Its really a moot point for the developer.

Does this mean you have separate people to code the programs and jcl? I'd hate that arrangement.
Back to top
View user's profile Send private message
dick scherrer

Global Moderator


Joined: 23 Nov 2006
Posts: 9187
Location: 221 B Baker St

PostPosted: Fri May 16, 2008 12:12 pm    Post subject:
Reply with quote

Hello,

Quote:
Does this mean you have separate people to code the programs and jcl? I'd hate that arrangement.
Many developers do not "like" this arrangement. That does not make it invalid.

I've seen this in larger organizations where developers are supposed to be experts in the use of the programming languages and implementing business rules. Programmers create the jcl needed to test jobstreams.

There is a separate staff that turns the test jcl into the production jcl. They become the jcl experts for the organization. They also tend to become the experts for the utilities used by the system (sort, ftp, etc). Most places, this group is part of Operations or Production Support and the function is often staffed whenever the production environment is running (often 24/7). If a batch job abends, they are the first called (rather than calling the deveolpers directly). If the problem is not code, it is resolved quickly with no outside calls.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL All times are GMT + 6 HoursGoto page 1, 2  Next
Page 1 of 2