|
View previous topic :: View next topic
|
| Author |
Message |
farnear Currently Banned New User
Joined: 27 Nov 2008 Posts: 20 Location: India
|
|
|
|
Hi
Could any one please tell me, whether we can get the running job name using REXX. |
|
| Back to top |
|
 |
expat
Global Moderator

Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
| Yes and Yes |
|
| Back to top |
|
 |
farnear Currently Banned New User
Joined: 27 Nov 2008 Posts: 20 Location: India
|
|
|
|
| Could you please let me know how to get it? |
|
| Back to top |
|
 |
farnear Currently Banned New User
Joined: 27 Nov 2008 Posts: 20 Location: India
|
|
|
|
expat
could u please tell me how to get the job name ?
Thanks,
~farnear~ |
|
| Back to top |
|
 |
ofer71
Global Moderator

Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Try this:
| Code: |
/* REXX */
/* Get JOBNAME from TCB */
cvt = storage(10,4) /* FLCCVT-PSA data area*/
tcbp = storage(d2x(c2d(cvt)),4) /* CVTTCBP */
tcb = storage(d2x(c2d(tcbp)+4),4)
tiot = storage(d2x(c2d(tcb)+12),4) /* TCBTIO */
JOBN = strip(storage(d2x(c2d(tiot)),8)) /* TIOCNJOB */
SAY JOBN
/* RETURN JOBN */
EXIT |
O. |
|
| Back to top |
|
 |
superk
Global Moderator

Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Well, &JOBNAME is one of the available system symbolic values. You can just use the symbol translator program thus:
| Code: |
/* REXX */
"CALL *(EZACFSM1)"
"EXECIO 1 DISKR SYSOUT"
PARSE PULL JOBNAME .
SAY 'THE JOBNAME IS:'JOBNAME
"EXECIO 0 DISKR SYSOUT (FINIS"
EXIT 0
|
where the SYSIN DD contains the one record:
//SYSIN DD *
&JOBNAME
/*
and the SYSOUT DD is just a temporary dataset allocated with RECFM=FB and LRECL=80.
Or use the MVSVAR function in a similar manner:
| Code: |
/* REXX */
jobname = MVSVAR('SYMDEF','JOBNAME')
Say 'The Jobname is:'jobname
|
or by addressing the control blocks:
| Code: |
/* REXX */
ascb = C2D(Storage(224,4))
assb = C2D(Storage(D2X(ascb+336),4))
jsab = C2D(Storage(D2X(assb+168),4))
jbnm = Storage(D2X(jsab+28),8)
jbid = Storage(D2X(jsab+20),8)
usid = Storage(D2X(jsab+44),8)
Say 'JOBNAME='jbnm' JOBID='jbid' USERID='usid
|
|
|
| Back to top |
|
 |
farnear Currently Banned New User
Joined: 27 Nov 2008 Posts: 20 Location: India
|
|
|
|
Hi superk & ofer71,
Thanks for the worthful info. It is working fine for my requirement.
~FARNEAR~ |
|
| Back to top |
|
 |
farnear Currently Banned New User
Joined: 27 Nov 2008 Posts: 20 Location: India
|
|
|
|
hi superk,
Could you please explain me the below mentioned commands so that i can understand it for better...
assb = C2D(Storage(D2X(ascb+336),4))
What the following commands represents C2D, Storage & D2X ?
~farnear~ |
|
| Back to top |
|
 |
ofer71
Global Moderator

Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
| Back to top |
|
 |
Elixir
Active User

Joined: 08 Feb 2009 Posts: 116 Location: CHENNAI/NEW JERSEY - INDIA/USA
|
|
|
|
| Is it possible to get the details of the jobs that have finished executing from the output queue? |
|
| Back to top |
|
 |
enrico-sorichetti
Superior Member

Joined: 14 Mar 2007 Posts: 10900 Location: italy
|
|
|
|
after 2 years of hanging around You should know that it is better to start a new topic for new questions.
anyway the answer to Your question is YES.
if You dislike YES/NO answers we dislike YES/NO questions
but that' s what You asked for
and good manners dictate not to double post the same question  |
|
| Back to top |
|
 |
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
Yes - most places I have been use SDSF. Does a marvellous job and has a Rexx interface. All documented.
(Enrico - this is a completely different topic - why has it not been split (yet)!) |
|
| Back to top |
|
 |
enrico-sorichetti
Superior Member

Joined: 14 Mar 2007 Posts: 10900 Location: italy
|
|
| Back to top |
|
 |
|
|