View previous topic :: View next topic
|
Author |
Message |
ppandey07
New User
Joined: 27 Nov 2008 Posts: 51 Location: Delhi, India
|
|
|
|
How can I get jobid of a submitted job in a test file? Is there any way to do that? |
|
Back to top |
|
|
Soumik Das
New User
Joined: 06 Aug 2011 Posts: 25 Location: India
|
|
|
|
I guess you should give us a little more detail.
Have you already submitted the job and want to pickup its details in a test file or are you trying to submit a job and simultaneosuly trying to put the job id in the test file? |
|
Back to top |
|
|
ppandey07
New User
Joined: 27 Nov 2008 Posts: 51 Location: Delhi, India
|
|
|
|
Soumik Das wrote: |
I guess you should give us a little more detail.
Have you already submitted the job and want to pickup its details in a test file or are you trying to submit a job and simultaneosuly trying to put the job id in the test file? |
I am trying to submit a job and simultaneosuly trying to put the job id in the test file?
I would also like to know the way of getting already submitted job's details(if there is any way) |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Pankaj,
How about some spool programming? |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Companions to the TSO SUBMIT command are the STATUS and OUTPUT commands. Maybe one, or both of those, will suit your needs? |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Why a "test file" rather than a "file"?
What about pen-and-old-listing and just write it down?
Copy/paste from your emulator?
You're not, perhaps, considering writing "A Tool" are you? Search the TSO/rexx forum for a fairly recent discussion that could help you if you are. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
The easiest way (that i know of) to do what you want while the job is running is to "chase control blocks". There are multiple prior topics about this (search for things like "control blocks", "data areas", jfcb) or try this link that has some sample code:
gsf-soft.com/Freeware/COB2JOB.shtml |
|
Back to top |
|
|
ppandey07
New User
Joined: 27 Nov 2008 Posts: 51 Location: Delhi, India
|
|
|
|
dick scherrer wrote: |
Hello,
The easiest way (that i know of) to do what you want while the job is running is to "chase control blocks". There are multiple prior topics about this (search for things like "control blocks", "data areas", jfcb) or try this link that has some sample code:
gsf-soft.com/Freeware/COB2JOB.shtml |
Can you please explain "chase control blocks". |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
Don't pay attention to me, I just want to watch this topic... |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
ppandey07,
Code the following DFSORT Step at the end of your job and it will print the jobname
Code: |
//STEP0100 EXEC PGM=SORT,PARM='JP1"&JOBNAME"'
//SYSOUT DD SYSOUT=*
//SORTIN DD *
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL REMOVECC,HEADER1=('THE JOBNAME IS : ',JP1)
//* |
|
|
Back to top |
|
|
ppandey07
New User
Joined: 27 Nov 2008 Posts: 51 Location: Delhi, India
|
|
|
|
Skolusu wrote: |
ppandey07,
Code the following DFSORT Step at the end of your job and it will print the jobname
Code: |
//STEP0100 EXEC PGM=SORT,PARM='JP1"&JOBNAME"'
//SYSOUT DD SYSOUT=*
//SORTIN DD *
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL REMOVECC,HEADER1=('THE JOBNAME IS : ',JP1)
//* |
|
Thanks for your suggestions. However I need JOBID not JOBNAME in my file. Please advise if that could be done via DFSORT |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
ppandey07 wrote: |
Skolusu wrote: |
ppandey07,
Code the following DFSORT Step at the end of your job and it will print the jobname
Code: |
//STEP0100 EXEC PGM=SORT,PARM='JP1"&JOBNAME"'
//SYSOUT DD SYSOUT=*
//SORTIN DD *
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL REMOVECC,HEADER1=('THE JOBNAME IS : ',JP1)
//* |
|
Thanks for your suggestions. However I need JOBID not JOBNAME in my file. Please advise if that could be done via DFSORT |
Pankaj,
Why don't you go to a DFSORT manual, links abound, look up what Kolusu has already done, and see if there is anything in the environs which suits your...
still unknown requirement! |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Can you please explain "chase control blocks". |
The connection between various control blocks (or data areas) is the heart of the operating system. These can be navigated by code. The GSF link i posted shows a bit of this code - which would provide the result i thought you want.
I may have been mistaken. . . I understood that you wanted job name however, you later say:
Quote: |
I need JOBID not JOBNAME in my file. |
|
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
You can CALL this sub-program from a Main Caller, passing a 16-Byte parmarea. It will return the Job-Name and Job-Nbr (Job-Id) as two 8-byte fields -
Code: |
*PROCESS RENT PROGRAM IS RE-ENTRANT
PRINT GEN ACTIVATE MACRO EXPANSION
PRMDSECT DSECT PARMAREA (R7)
USING *,R7 INFORM ASSEMBLER
PRMJOBNM DS CL8 PARM-JOBNM (XXXXXXXX)
PRMJOBID DS CL8 PARM-JOBID (FMT=JOB00000)
STGDSECT DSECT DYNAMIC-STG (R9)
USING *,R9 INFORM ASSEMBLER
STGAREA DS 0XL80 BEGIN STG-AREA
DWORD DS D DOUBLEWORD-WORKAREA
REGSAVEA DS XL72 REGISTER-SAVEAREA
GETJINFO CSECT CSECT-BASE (R3)
USING *,R3 INFORM ASSEMBLER
SAVE (14,12) SAVE REGISTERS
LA R3,0(,R15) CSECT-ADDRESSABILITY
L R7,0(,R1) PARMAREA-ADDRESSABILITY
LA R0,L'STGAREA DYNAMIC-STG LGTH
STORAGE OBTAIN,LENGTH=(R0),ADDR=(R1),COND=YES
LTR R15,R15 GOOD RETURN-CODE?
BNZ RTN2CLLR NO, RETURN TO CALLER
LR R9,R1 DYNAMIC-STG BASE-REGISTER
XC STGAREA,STGAREA ENSURE X'00'S
LA R15,REGSAVEA POINT TO OUR 'RSA'
ST R13,4(,R15) BACKWORD-CHAIN
ST R15,8(,R13) FORWARD-CHAIN
LR R13,R15 POINT TO OUR 'RSA'
LA R10,DWORD POINT TO 1ST-WORD
EXTRACT (R10),'S',FIELDS=TIOT
L R10,DWORD GET ADDRESSABILITY
MVC PRMJOBNM,0(R10) POPULATE 'JOBNAME'
L R10,540 CURRENT 'TCB'
L R10,180(,R10) POINT TO 'JFCB'
L R10,316(,R10) POINT TO 'SSID'
LA R10,12(,R10) OK, WE'RE HERE
MVC PRMJOBID,0(R10) POPULATE AS C'JOB00000'
L R13,4(,R13) RESTORE CALLER'S R13
LA R0,L'STGAREA DYNAMIC-STG LGTH
LR R1,R9 LOAD STG-ADDRESS
STORAGE RELEASE,LENGTH=(R0),ADDR=(R1),COND=NO
XR R15,R15 ENSURE X'00'S
RTN2CLLR EQU *
RETURN (14,12),RC=(15) RETURN TO CALLER
LTORG ,
GETJINFO AMODE 31
GETJINFO RMODE ANY
YREGS , REGISTER-EQUATE MACRO
END , END 'GETJINFO'
|
Bill |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
danke bill, aber SORT klingt ein bisschen einfacher
oder
danke bill, aber mit SORT ein bisschen einfacher klingt |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Dick,
Was this overkill?
I know it works....
Bill |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
no, it works. provides the same info as Saint-Flour's cob2job.
and since it is assembler, probably faster than cobol.
problem is, getting it compiled in sites which rigidly control what programming languages are used.
I was tired and wanted to say something about the sort solution.
what gets me is that I have never worked at a site - 20 some,
that needed to have a special routine within a job to generate a notation of jobname, jobid... maybe smf data is too tough for the people who are spending more time collecting statistics than writting good application code.
spent years working with gdg's,
never had to have the date of a file as part of the file name,
always was able to recall the proper file.
why build something new, when the old
- if you bother to understand it -
works just great.
but then again, maybe it is due to companies hiring people
who don't know dogshit, are untrainable, and do all this
pc stuff in an effort to get around the incompetence.
sorry, did not mean to offend you at all.
but, if my comments above offended anyone at a site that employess such stuff: |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
or to my friends in the bar: |
|
Back to top |
|
|
Soumik Das
New User
Joined: 06 Aug 2011 Posts: 25 Location: India
|
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
OK, weather in Chamonix is excellent, so maybe this will run and run.
I'm joining Marso. Can you move over a little, fine, thanks. Fancy a tea? I brought a Thermos. Biscuit? Nice view from up here. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
OK, weather in Chamonix is excellent, |
lets say that it was possible to walk around
pretty cold anyway, at 2500 meters after 2 pm drops of rain or something even colder
here the link to chamonix meteo com
chamonix-meteo.com/bul/metPreMatFr.php
the period of sunshine close to 60%. was more really about 20%
( and I do not usually complain too much, useless after You have started walking )
lurking waiting for the laundry to dry |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
ppandey07 wrote: |
I am trying to submit a job and simultaneosuly trying to put the job id in the test file? |
All this SORT and Assembler and COBOL and REXX stuff is very nice and useful, but I think Pankaj needs something else.
Maybe something like:
Code: |
Call OUTTRAP('Lst.')
"SUBMIT 'hlq.SPF.CNTL(IEFBR14)'"
Call OUTTRAP("OFF")
Do iX = 1 To Lst.0
If Word(Lst.iX,1) = 'IKJ56250I' Then Do
Parse Var Lst.iX . '(' JobID ')' .
Say 'JobID is 'JobID
Leave
End
End |
1. I assumed TSO PROF MSGID to get the IKJ message ID.
2. "SUBMIT *" generates two messages, so I used a loop, just to be on the safe side. |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
Sorry Bill,
I couldn't keep quiet...
But tea and biscuits is fine, although a nice cold beer would be nice too
(when the weather man say 'tomorrow will be colder' he means temperature will drop from 32C (89.6F) to 30C (86F)) |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Marso,
Good idea. Same sort of thing here, at the moment a touch hotter. Nice at 5am when sometimes below 20 degrees. I'm jealous of enrico's mountain climate holiday. For a few days, at least. Now, beer... Super Bock or Sagres? |
|
Back to top |
|
|
|