View previous topic :: View next topic |
Author |
Message |
jim haire Beginner
Joined: 30 Dec 2002 Posts: 140 Topics: 40
|
Posted: Wed Nov 04, 2009 1:12 pm Post subject: Submitting a job that has been changed through edit macro |
|
|
I have searched through this forum and seen similar questions, but not sure if i saw an answer to this.
I have a REXX command which prompts for a number of values. These values are then passed to an edit macro which makes changes in a set of skeleton JCL.
I would like to submit the JCL after the changes are made without saving the JCL. I would like to then "CANCEL" the changes so that the skeleton JCL would be ready for the next peron who uses the REXX command.
Is there a way to do this? My attempts have not worked. If I try to just issue a "SUBMIT", I get an error saying that no dataset name has been supplied. If I supply the dataset name, It runs the skeleton JCL as if no changes had been applied. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
kolusu Site Admin
![Site Admin Site Admin](images/ranks/adminpic.jpg)
Joined: 26 Nov 2002 Posts: 12370 Topics: 75 Location: San Jose
|
Posted: Wed Nov 04, 2009 1:41 pm Post subject: |
|
|
jim haire,
cant you submit via intrdr?
Code: |
Address TSO "ALLOC FI(INTRDR) SYSOUT(A) WRITER(INTRDR) REUSE"
Address TSO "EXECIO * DISKW INTRDR (FINIS STEM JOB."
Address TSO "FREE FI(INTRDR)"
|
Kolusu |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Wed Nov 04, 2009 2:20 pm Post subject: |
|
|
why don't you submit during the edit macro?
and to avoid the cancel problem (saving the new member)
use VIEW with edit macro instead of EDIT. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
jim haire Beginner
Joined: 30 Dec 2002 Posts: 140 Topics: 40
|
Posted: Wed Nov 04, 2009 3:00 pm Post subject: |
|
|
I thought about the internal reader, however I think they want to be able to track where the job was being submitted from for audit purposes. Still this might be a possible solution.
DBZ: I did try executing the "SUBMIT" during the edit macro, although in "EDIT" mode. I understand why you said to try "VIEW" mode to avoid the cancel. However, I don't know how the SUBMIT would act any differently in "VIEW" vs. "EDIT". IN my REXX program I have the statement:
Code: | "EDIT DATASET('Z025386.UTILJCL.PDS($ADDJCL)') MACRO(JOBMAC)" |
My JOBMAC macro below:
Code: | ADDRESS ISREDIT
"MACRO"
UID = USERID()
UIDWQ = "'" || USERID() || "'"
ENDDSET = "'" || UID || .NED.ONETIME.JCL || "'"
ADDRESS ISPEXEC
"VGET (TMT$MBR) PROFILE"
MBR = TMT$MBR
ADDRESS ISREDIT
"CHANGE "'userid'" &UIDWQ ALL"
"CHANGE "'work.lib'" &ENDDSET ALL"
"CHANGE "'mbrname'" &MBR ALL"
ADDRESS TSO
"SUBMIT 'Z025386.UTILJCL.PDS($ADDJCL)'"
ADDRESS ISREDIT
"CANCEL"
"END" |
The macro is called from my REXX program. Userid is taken from the system. The ENDDSET and MBR are parsed from the PDS(MEMBER) name provided as a response to a prompt from the REXX program.
The $ADDJCL is a batch Endevor job which takes the PDS(MEMBER) which I have provided and stores it in Endevor source repository.
As I mentioned before, if I execute the macro as shown, the SUBMIT statement gets the JCL as if no changes were made. I want the changes to be made and submit the JCL as if the changes took place, but then "CANCEL" the changes so I have the skeleton JCL as it was.
If I leave the dataset name off of the "SUBMIT" statement, I get an error saying that the dataset name must be provided.
Is there a form of the submit statement that would submit the changed JCL without saving it?
I hope this explains the scenario a little better...
Thanks for your responses! |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Wed Nov 04, 2009 3:12 pm Post subject: |
|
|
How about using file tailoring services? _________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Wed Nov 04, 2009 3:38 pm Post subject: |
|
|
somewhere, someplace in this forum is an example of loading the lines for jcl into the stack, then the submit - submits from the stack.
if you can't find an example, then
in your macro, REPLACE newjcl - that will replace another member -
Z025386.UTILJCL.PDS(newjcl)
which you can then submit as Z025386.UTILJCL.PDS(newjcl)
and again using VIEW instead of EDIT, you don't have to worry about changing the original Z025386.UTILJCL.PDS($ADDJCL). _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Wed Nov 04, 2009 3:42 pm Post subject: |
|
|
i have always EXCIO'd my skeleton jcl into a stem, made the changes in the stem
and submitted from the stem. Thus i did not need an edit macro.
by the way, the replace command syntax would be REPLACE NEWJCL .zf .zl _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
prino Banned
Joined: 01 Feb 2007 Posts: 45 Topics: 5 Location: Oostende
|
Posted: Wed Nov 04, 2009 4:42 pm Post subject: |
|
|
Why not simply replace
Code: | ADDRESS TSO
"SUBMIT 'Z025386.UTILJCL.PDS($ADDJCL)'" | with
?
And it will work on any member... |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Wed Nov 04, 2009 5:43 pm Post subject: |
|
|
prino,
good eyes!
Quote: | And it will work on any member... |
meaning the workspace version of the member being viewed/edited. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
jim haire Beginner
Joined: 30 Dec 2002 Posts: 140 Topics: 40
|
Posted: Thu Nov 05, 2009 12:05 pm Post subject: |
|
|
I tried Prino's suggestion and it worked! When I had the "SUBMIT" statement standing alone, it must have been in the REXX program and not the edit macro, so it ran the "SUBMIT" from the TSO address space.
Dick,
I also found the suggestion you made for putting the JCL to the queue and submitting in that manner. I believe this would have worked as well.
Thanks for the help on this. This was my solution below, should anyone need to do something similar.
Code: |
ADDRESS ISREDIT
"MACRO"
UID = USERID()
UIDWQ = "'" || USERID() || "'"
ENDDSET = "'" || UID || .NED.ONETIME.JCL || "'"
ADDRESS ISPEXEC
"VGET (TMT$MBR) PROFILE"
MBR = TMT$MBR
ADDRESS ISREDIT
"CHANGE "'userid'" &UIDWQ ALL"
"CHANGE "'work.lib'" &ENDDSET ALL"
"CHANGE "'mbrname'" &MBR ALL"
"SUBMIT"
"CANCEL"
"END"
|
|
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Thu Nov 05, 2009 1:21 pm Post subject: |
|
|
Jim,
your solution is great. few line of code and you are out!
my suggestion takes a lot more code and resources. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
|
|