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

Passing data from COBOL program to JCL(JOB)


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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
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
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
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
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
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

Global Moderator


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

PostPosted: Mon Apr 14, 2008 6:58 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Apr 14, 2008 6:59 pm
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

Global Moderator


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

PostPosted: Mon Apr 14, 2008 7:57 pm
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
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: 792
Location: Chennai, India

PostPosted: Wed Apr 16, 2008 2:46 pm
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
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
Warnings : 1

Active User


Joined: 12 Jul 2006
Posts: 191
Location: USA

PostPosted: Fri May 16, 2008 10:41 am
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

Moderator Emeritus


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

PostPosted: Fri May 16, 2008 12:12 pm
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
Warnings : 1

Active User


Joined: 12 Jul 2006
Posts: 191
Location: USA

PostPosted: Fri May 16, 2008 3:20 pm
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

Global Moderator


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

PostPosted: Fri May 16, 2008 5:03 pm
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
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
Warnings : 1

Active User


Joined: 12 Jul 2006
Posts: 191
Location: USA

PostPosted: Sat May 17, 2008 4:37 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Store the data for fixed length COBOL Programming 1
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Using API Gateway from CICS program CICS 0
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
Search our Forums:

Back to Top