View previous topic :: View next topic
|
Author |
Message |
senmainframe Currently Banned New User
Joined: 09 Oct 2007 Posts: 30 Location: USA
|
|
|
|
Hi,
got the solution from my friend. The problem was simply renum issue. I renumbered and this got solved.
thak you verymuch |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
Quote: |
The problem was simply renum issue. I renumbered and this got solved. |
Now I am getting curious, what did You renumber ???
I would rather say that You should have "unnumbered" something
at least the rexx exec
Nothing in Your posts was implying anything about number on/off
I would suggest that as last qualifier for the panels dataset You use "PANELS"
it is one of the standard last qualifiers recognized by the "model" command |
|
Back to top |
|
|
PeD
Active User
Joined: 26 Nov 2005 Posts: 459 Location: Belgium
|
|
|
|
Quote: |
Nothing to the right ??
|
That gave you the idea to check?
Pierre |
|
Back to top |
|
|
senmainframe Currently Banned New User
Joined: 09 Oct 2007 Posts: 30 Location: USA
|
|
|
|
E.S & Pierre,
Thank you verymuch for your valuable inputs in this.
Sorry. I didnt renum. I unnumbered "NUM ON; UNNUM; NUM OFF; REC ON; RES; SAVE;"
Could you please explain little bit more about "MODEL" command. Really I am unaware of this.
for just confirming, If I named my panel datasets last qualifier as PANELS.
This problem wouldnot come. Is it right? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
The model command is an ISPF programming aid/tool...
just open an empty member and in the command line type "MODEL",
it will give You a list of model classes for the invocation of different ispf services
classes of ispf models are related to profiles...
profiles are based on the last qualifiers...
if You from tyhe first panel after the model command navigate the help
You will find the last qualifier implied for different model classes
not an error but a lost chance of saving a few keystrokes |
|
Back to top |
|
|
senmainframe Currently Banned New User
Joined: 09 Oct 2007 Posts: 30 Location: USA
|
|
|
|
Thank you verymcuh E.S.
One more help. In my following code, I am not able to get jobid. It is just displaying "jobid". I will give my code.
Code: |
SUB_JCL:
DO onq = 1 to index
QUEUE IN.onq
END
QUEUE "$$"
CALL OUTTRAP 'out.'
ADDRESS TSO "SUBMIT * END($$)"
CALL OUTTRAP 'OFF'
SAY 'Output from SUBMIT cmd...'
DO i = 1 TO out.0
SAY i out.i
END i
DO i = 1 TO out.0
PARSE VAR out.i . 'JOB ' . '(' jobid ')'
IF jobid <> '' THEN LEAVE
END i
IF jobid = ''
THEN SAY 'Job submission failed, rc='rc
ELSE SAY 'Job submitted successfully, job number is: 'jobid
RETURN 0
EXIT:
EXIT 0 |
After executing this, I am getting
Code: |
Output from SUBMIT cmd...
Job submitted successfully, job number is: JOBID
Output from SUBMIT cmd...
Job submitted successfully, job number is: JOBID
*** |
why it is not giving exaxt jobid. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
I would rather code ( tested )
Code: |
if out.i <> 1 then do
/* system/logic error */
say "expected 1 ouput line, received " || out.0 || "lines "
do i = 1 to out.0
say "==>" out.i
end
exit 16
end
parse var out.1 . "(" jobid ")" .
|
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
just another curiosity,
why troubling displaying the submit message when TSO does it for YOU ?? |
|
Back to top |
|
|
senmainframe Currently Banned New User
Joined: 09 Oct 2007 Posts: 30 Location: USA
|
|
|
|
Hi E.S,
Here my requirement is for captruing each jobids separately, once first job is executed successfully, then only next job should run. other wise it shoud come out. In this reason, if first job is submitted, I am getting its jobid and status. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
Ok , my glitch, I was not supposing that You could have in the "data"
you were submitting more than one job..
still the good parse statement is what I posted ,
but for the sake of completeness I would
Address TSO PROFILE MSGID
check for the message id "IKJ56250I"
which is the only one to be processed for a good submit
here is the code sketch
Code: |
call OUTTRAP "OUT."
Address TSO "PROFILE MSGID"
Address TSO " SUBMIT....
Address TSO "PROFILE NOMSGID"
call OUTTRAP "OFF"
do i = 1 to out.0
tmp = strip(out.i)
msg = strip(word(tmp,1))
if msg = "IKJ56250I" then do
parse var tmp . "(" jobid ")" .
....... process your jobid
end
else do
.... submit error
say out.i
end
end
|
|
|
Back to top |
|
|
senmainframe Currently Banned New User
Joined: 09 Oct 2007 Posts: 30 Location: USA
|
|
|
|
Great and thanks E.S. It worked fine. Finally it came to an end with fruitful solution because of your great help.
One more help (I am not sure, whether it is a right question).
I have two LPARS (different TSO system, but same mainframe). When I am submitting more than one job, 2nd job should be submitted from other TSO system. Is is possible? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
Sure !
jn the jcl guide/reference check the :
"/* ROUTE XEQ nodename"
"/*XEQ nodename"
one should be for NJE connected JES2,
the other for MAS ( multi_access/shared spool )
at this exact moment I do not remember which is which,
You have two options: check the manual, try both alternatives,
1) try and afterwards check
2) check and afterward test |
|
Back to top |
|
|
senmainframe Currently Banned New User
Joined: 09 Oct 2007 Posts: 30 Location: USA
|
|
|
|
E.S,
You are excellent. Thank you. Now I will try to get the node name of my other TSO system and I will edit the jcl and try to submit from my REXX. I will keep you update |
|
Back to top |
|
|
senmainframe Currently Banned New User
Joined: 09 Oct 2007 Posts: 30 Location: USA
|
|
|
|
E.S,
You are excellent.
Next doubt. When I am submitting series of jobs in the REXX, I am reading the line one by one and changing some common characters and I am submitting. In the same way I am reading next member for next jcl and I am submitting. I feel this way is not good way. So I want to submit a job one by one using INTRDR without editing my permenant jcl, so when first jcl edited I need to add threemore line at the end of the job for executing next job Could you please let me know the code for this. I know this concept only. I am not able to convert this in REXX
The two line is
//stepn exec pgm=iefbr14
//sysut1 dd dsn=caa1035.rexx.jcl(jcl"jclnum")
//Sysut2 dd sysout=Intrdr |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
Quote: |
reading next member for next jcl and I am submitting |
if You need to customize each jcl then You cannot use the iebgener as the last step approach. |
|
Back to top |
|
|
senmainframe Currently Banned New User
Joined: 09 Oct 2007 Posts: 30 Location: USA
|
|
|
|
You meant to say, if my customized jcl has iebgenr as the last step, I cant use INTRDR?.. Is it so? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
I mean that You will need two pds one for the unmodified jcl
the second for the customized jcl
the logic would then be
copy using rexx from the first pds to the second pds
customizing to your need and
adding ( but it could be already there ) the iebgener step
submit the first job of the chain..
at this point You would not need to retrieve the job number,
I do not see any need for it
But I have a question/doubt
are You trying to build a small scheduler ??
for a little chain of a few jobs ( less then 5 I would say ) it would not be a problem
but when the chain gets longer, constraint and alternate execution paths will spring out
and then You will be in trouble..
Evaluate if it is not safer to use a standard scheduler with its job customization facility |
|
Back to top |
|
|
senmainframe Currently Banned New User
Joined: 09 Oct 2007 Posts: 30 Location: USA
|
|
|
|
here I have one queestion, if I submit series of jobs with same job card (JOBID, CLASS, priority) for all jobs, it will execute one by one, once it over next one will start as an order (if it is 100% sure, no performance issue or no other issues in this), I would not got for INTRDR or other scheduer concept, but I heard that that will depend on JES system, sometime JES will take random jobs to run in the queue. Please confirm this?..
If this scanario works out, my next dooubt is how I will capture the RC code of the each job if return code > or equal 8 of any job, from next jobs in the queue will be automatically cancelled. Any simpe solution for this? I tried to use TSO STATUS, but I am not able to achieve (beacuse of lack of my REXX knowledge). Also I tried to OFF TSO message and tried to capture my customized message.
Now I request your valuable comments and sample code for this
Thank you in advance. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
From Your description the simplest logic would be the iebgener as the last step approach
Where would You execute the REXX with the TO STATUS Approach ?
the coding would be much more difficult, also to cancel jobs waiting the execution would imply very strict timings..
Using the iebgener approach with the conditioncode checking will achieve what You want in the simplest way...
Remeber that Your concept of jobnumber,class is not correct..
You will know the job number only after You submit it
For your need it is enough the jobname, which for the iebgener aproach
would be best if it were equal to the member name |
|
Back to top |
|
|
senmainframe Currently Banned New User
Joined: 09 Oct 2007 Posts: 30 Location: USA
|
|
|
|
Please correct me, if i am wrong. The following is the requirement.
I have totally 38 jobs. After changing the common characer (OC12) with new character, All jobs should be executed one by one. If any jobs get abended, other jobs should nt run.
Approach ( I am coding so far)
1)All 38 jobs have in the same PDS (CAA1035.REXX.JCL). member names are as folows
jcl1
jcl2
jcl3 (it should execute different LPAR)
jcl4
jcl5
jcl6
jcl7
..
..
..
jcl38
The all jcls have same jobcard.
thru my REXX, if I submit all these jobs one by one. Will it execute one by one (one jobs is completed, next one will start, because all jobs are in same queue) - If this approach is right, why would I go for IEBGENR approach with INTRDR concept. when one job over I will know the status. After this I dono how to stop execute other jobs in the input queue.
2) Lets come to IEBGENR approach, when I am editing jcl using the following code, where I will temproarily add IEBGENR/IEFBR14 step to execute the next job using INTRDR. Can you guide this.
Code: |
EDIT_JCL:
"ALLOC DD(INDD) DA('CAA1035.REXX.JCL(JCL"JCLNUM")') SHR
REU"
"EXECIO * DISKR INDD (STEM IN. FINI"
index = IN.0
DO record = 1 to index
IF POS('OC12',IN.record) > 0 THEN DO
POS1 = POS('OC12',IN.record)
SAY POS1
IN.record = OVERLAY(NEWBLK,IN.record,POS1,4)
SAY IN.record
END
IF POS('DATASET(',IN.record) > 0 THEN
DO
TEMP = "DATASET("DSNPROF")"
IN.record = OVERLAY(TEMP,IN.record,1,80)
SAY IN.record
END
END
"FREE FILE(INDD)"
RETURN 0 |
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
Quote: |
when one job over I will know the status. After this I dono how to stop execute other jobs in the input queue. |
That' s exactly my point, it cannot be done!
that' s why You need in each job a last step to decide if submit or not the next one |
|
Back to top |
|
|
|