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

ACCEPT JOBNAME IN COBOL


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
i.see.the.truth

New User


Joined: 21 Sep 2007
Posts: 8
Location: CHENNAI

PostPosted: Tue Jun 22, 2010 7:56 pm
Reply with quote

How do we the get the jobname of JCL running the cobol program? Is it possible through the ACCEPT statement ?

Thanks & Regards
Soumen
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Jun 22, 2010 8:07 pm
Reply with quote

It is possible to find out what you want. I did it by using the Search button at the top of any page.

There are good examples just waiting for you when you use the search button.
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Tue Jun 22, 2010 8:12 pm
Reply with quote

You could certainly use the symbol translator utility EZACFSM1 and translate the &JOBNAME system variable into the actual jobname, and write the output to a dataset, which you can then read in from your program (ACCEPT or READ, your call).
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Tue Jun 22, 2010 8:36 pm
Reply with quote

The below link might work for you -

www.ibmmainframes.com/viewtopic.php?p=167434&highlight=#167434

Bill
Back to top
View user's profile Send private message
i.see.the.truth

New User


Joined: 21 Sep 2007
Posts: 8
Location: CHENNAI

PostPosted: Tue Jun 22, 2010 9:48 pm
Reply with quote

can this be done inside a cobol program, i wanted to get the jobname inside a cobol program not using any subprogram
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Tue Jun 22, 2010 9:52 pm
Reply with quote

How about Sample COBOL program to retrieve and display job-related information.
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 Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top