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 data from COBOL program to JCL(JOB)

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Gops

New User


Joined: 21 Jul 2005
Posts: 23

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

Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
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: 23

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: 1512
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: 23

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

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

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: 23

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: 4648
Location: Raleigh, 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: 10202
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: 4648
Location: Raleigh, 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: 23

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

Active Member


Joined: 06 Sep 2007
Posts: 785
Location: Chennai, 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: 68
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: 153
Location: USA

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

Site Director


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

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
jasorn

Active User


Joined: 12 Jul 2006
Posts: 153
Location: USA

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

I didn't mean to say it wasn't valid. Just that I personally wouldn't like it. In the same fashion, I hate to work in an environment where one person creates specs so detailed it got the code in it and all the programmer needs to do it cut and paste it icon_smile.gif
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Fri May 16, 2008 5:03 pm    Post subject: Reply to: Passing data from COBOL program to JCL(JOB)
Reply with quote

Dick pretty much summed up what I meant. Efficient enterprises where work is broken down into specialties, and the specialists perform the tasks that they do best.
Back to top
View user's profile Send private message
jaspal

New User


Joined: 22 May 2007
Posts: 68
Location: mumbai

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

Hi All,
Just an answer to Jasorn:
we should be expert in all languages ( i.e jcl , cobol ,sort db2 ) if you want to add value.

we do have different team to do different codes i,e jcl , cobol.
Although we should have a solution to any kind of requirement ....and have a positive and proffessional attitude.

and ability of solve it.....we can use any thing jcl along with component to satisfy a requirement.


i do have justification what i say.....


Regards,
Jaspal
91-9833814470
Back to top
View user's profile Send private message
jasorn

Active User


Joined: 12 Jul 2006
Posts: 153
Location: USA

PostPosted: Sat May 17, 2008 4:37 am    Post subject:
Reply with quote

Hi Jaspal,

Sorry for taking this off topic. I'll stop. I didn't mean to pass judgment and don't have an opinion on whether separating the jcl duties from the cobol is cost effective or not. I just meant to say that "I" personally wouldn't like those conditions. But I ask during the interview process about how the duties are separated so I wouldn't take the job.
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am
This topic is locked: you cannot edit posts or make replies. How to move a long alphanumeric data ... lind sh COBOL Programming 8 Mon Dec 05, 2016 7:51 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm


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