MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Submitting a job that has been changed through edit macro

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
jim haire
Beginner


Joined: 30 Dec 2002
Posts: 140
Topics: 40

PostPosted: Wed Nov 04, 2009 1:12 pm    Post subject: Submitting a job that has been changed through edit macro Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12370
Topics: 75
Location: San Jose

PostPosted: Wed Nov 04, 2009 1:41 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Wed Nov 04, 2009 2:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
jim haire
Beginner


Joined: 30 Dec 2002
Posts: 140
Topics: 40

PostPosted: Wed Nov 04, 2009 3:00 pm    Post subject: Reply with quote

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
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Wed Nov 04, 2009 3:12 pm    Post subject: Reply with quote

How about using file tailoring services?
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Wed Nov 04, 2009 3:38 pm    Post subject: Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Wed Nov 04, 2009 3:42 pm    Post subject: Reply with quote

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
View user's profile Send private message
prino
Banned


Joined: 01 Feb 2007
Posts: 45
Topics: 5
Location: Oostende

PostPosted: Wed Nov 04, 2009 4:42 pm    Post subject: Reply with quote

Why not simply replace

Code:
ADDRESS TSO
"SUBMIT 'Z025386.UTILJCL.PDS($ADDJCL)'"
with
Code:
"isredit submit"
?

And it will work on any member...
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Wed Nov 04, 2009 5:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
jim haire
Beginner


Joined: 30 Dec 2002
Posts: 140
Topics: 40

PostPosted: Thu Nov 05, 2009 12:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Thu Nov 05, 2009 1:21 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group