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 

Avoid pressing F3 & CNTL keys while submitting jobs in b

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


Joined: 14 Apr 2006
Posts: 87
Topics: 33

PostPosted: Wed May 30, 2007 2:01 am    Post subject: Avoid pressing F3 & CNTL keys while submitting jobs in b Reply with quote

i have a requirement to change the input file and run the program no.of times.for that i have written a Rexx program the input to the program is the list of all the input files.i am reading the file changing the input file name in the jcl and submitting the job.

But after each submit i have enter a "Control key" after that i have to press "F3" how can i avoid this and when run the program automatic submission of the jobs to be done.

i am new to REXX please let me know what should be done

Regards,
Venkata Apparao Jajula
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 May 30, 2007 4:04 am    Post subject: Reply with quote

Let me get this clear - you are running the same job multiple times, each time with a different dataset name?

Q. Are the various dataset names the same from day to day?

If you are you can hold them in a stem variable, read through that stem and pass each dsn to an edit macro that will rad the parameter, change the name in the JCL , submit the job and cancel out of the job - no intervention required - just start the exec and it does everything.
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
jajularamesh
Beginner


Joined: 14 Apr 2006
Posts: 87
Topics: 33

PostPosted: Wed May 30, 2007 4:54 am    Post subject: Reply with quote

i am running the same job by simply replacing the input file.but the pronle is i need to enter a Control key and F3 at the time of submitting the job
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Wed May 30, 2007 5:01 am    Post subject: Reply with quote

jajularamesh,

Insert "ISREDIT END" before the RETURN statement in the edit macro.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jajularamesh
Beginner


Joined: 14 Apr 2006
Posts: 87
Topics: 33

PostPosted: Wed May 30, 2007 5:26 am    Post subject: Reply with quote

Kolusu,
I tried what you gave but its not working. Actually before the jcl getting submitted we are forced to enter F3 to close the JCL window and also some message i am getting to continue i have to press CONTROL
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 May 30, 2007 5:35 am    Post subject: Reply with quote

I am not aware of a CONTROL key on the mainframe keyboard. And JCL window?
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
jajularamesh
Beginner


Joined: 14 Apr 2006
Posts: 87
Topics: 33

PostPosted: Wed May 30, 2007 5:45 am    Post subject: Reply with quote

Actually i am opening(or viewing) my jcl where actually input file will be XXXXXXXXXX

i am changing XXXXXXXXXX to the actual input data set abd submitting the job where i am getting a message to further continue i am entering Control(Enter key)
then in my current window JCL with changed input dataset is still getiing displaced.

To make it run i am closing the Window by Pressing F3 key then window is getting closed and again the same process is continuing again
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 May 30, 2007 6:08 am    Post subject: Reply with quote

I take it that so far you are still doing this manually and not using Rexx?

Your first step will be create a macro along these lines:
Code:

ADDRESS "ISPEXEC" "CONTROL ERRORS RETURN" 
ADDRESS "ISREDIT"                         
"MACRO (PARMS) NOPROCESS"                 
"C xxxxxxxxxxxxx "parms
"SUB"
"CAN"


Now go into your jcl and enter the macroname and a dataset name. it will excute the commands and submit the jcl. However, in testing I would start without the SUB and CAN commands so that you can see the change and verify it. CAN will cancel the change after submission so that you still have XXXXXX as your dataset name for the next time.

Once you have this working, wrap the Rexx exec around it. Invoke EDIT with the IMACRO otion where the IMACRO name is the macro you have created.
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
jajularamesh
Beginner


Joined: 14 Apr 2006
Posts: 87
Topics: 33

PostPosted: Wed May 30, 2007 6:23 am    Post subject: Reply with quote

Please find the REXX code below


1) Main
Code:

ADDRESS "ISPEXEC" "CONTROL ERRORS RETURN"
 SAY 'ENTER DATASET NAME'                 
 PARSE UPPER PULL PSNAME                 
 PSNAME=STRIP(PSNAME)                     
 SAY PSNAME                               
 PSMSG = SYSDSN("'"PSNAME"'")             
    IF PSMSG <> 'OK' THEN DO             
       SAY "'"PDS"'   MESSAGE:" PSMSG     
       RETURN                             
    END                                   
 SAY PSNAME                               
 ADDRESS TSO                             
 "ALLOC DA('"PSNAME"') F(INDD) SHR REUSE"
 ADDRESS TSO                             
 "EXECIO * DISKR INDD (STEM VAR. FINIS"   
    DO I = 1 TO VAR.0                     
       MEMBER1 = VAR.I                   
       MEMBER1=SUBSTR(MEMBER1,1,40)   
       MEMBER1=STRIP(MEMBER1)                                 
       ADDRESS ISPEXEC                                         
       "VPUT (MEMBER1) SHARED"                                 
       "VIEW DATASET('TSO9314.JAJULA.DELIMIT.JCLS(TREXUNQ)')   
       MACRO(TREXCHG)"                                         
    END                                                       
 ADDRESS ISPEXEC                                               
 "VIEW DATASET('TSO9314.JAJULA.DELIMIT.JCLS(TREXSORT)')       
 MACRO(MYSUB)"                                                 

2) TREXCHG
/*REXX*/                                 
ADDRESS "ISPEXEC" "CONTROL ERRORS RETURN"
ISREDIT MACRO                           
"ISREDIT JC"                             
ISPEXEC VGET (MEMBER1) SHARED           
/*SAY 'HI'*/                             
/*SAY MEMBER1*/                         
ADDRESS TSO                             
"ISREDIT CHANGE ALL 'XXXXXXXXXX'" MEMBER1
"ISREDIT SUB"                           
CANCEL                                   
EXIT 0                                   

Hi NIC please let me know any problem with my code
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 May 30, 2007 7:15 am    Post subject: Reply with quote

1 -Address TSO is the default - you do not need to specify it until you change it by, for example ADDRESS ISPEXEC. ADDRESS xxx without a statement changes the default. ADDRESS xxxx with a statement changes the environemt FOR THAT STATEMENT ONLY
2 - Continuing over multiple lines - use a ',' at the end of line. You have a couple of cases of:
Code:

ADDRESS ISPEXEC                                               
 "VIEW DATASET('TSO9314.JAJULA.DELIMIT.JCLS(TREXSORT)')       
 MACRO(MYSUB)"                                                 

this should be either
Code:

ADDRESS ISPEXEC "VIEW DATASET('TSO9314.JAJULA.DELIMIT.JCLS(TREXSORT)') MACRO(MYSUB)"                                                 

or
Code:

ADDRESS ISPEXEC ,
 "VIEW DATASET('TSO9314.JAJULA.DELIMIT.JCLS(TREXSORT)') ,
 MACRO(MYSUB)"                                     

At the top you SAY PSNAME both before and after the check for its existence -you only need it once

I presume your execio reads in the set of dataset names you want to process.
You do not need to use SUBSTR - as long as there are no sequence numbers on your input file just use STRIP

No need to put the variable in the pool just pass it as a parameter - having said that I cannot confirm it or provide the coding of the parameter as my ISPF Edit manual has gone missing.

your CANCEL is an ISPF edit command so the suntax is 'ISREDIT CANCEL"
What is the ADDRESS TSO doing in you macro - no need for it espacially as you have not changed the default. If you code 'ADDRESS ISREDIT' then you will not need those other ISREDITs e.g. your 'isredit cancel' becomes "CANCEL"
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
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 May 30, 2007 7:55 am    Post subject: Reply with quote

OK - update - I've just had word from my ISPF guru - you cannot pass a parm to an initial macro - you do use VPUT/VGET as you have tried - you can also put stuff on the queue and pull it off in the macro.
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Wed May 30, 2007 9:12 am    Post subject: Reply with quote

jajularamesh,

Instead of the CANCEL statement try this

Code:

  "ISREDIT BUILTIN CANCEL"


Hope this helps,

Thanks,
Phantom
Back to top
View user's profile Send private message
jajularamesh
Beginner


Joined: 14 Apr 2006
Posts: 87
Topics: 33

PostPosted: Thu May 31, 2007 2:17 am    Post subject: Reply with quote

Thanks Nic and Phantom
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Thu May 31, 2007 2:54 am    Post subject: Reply with quote

you can pass a parm to a macro by setting a variable and using the parm() keyword. Something like
Code:

xyz = 'a bunch of parms'
address ispexec 'edit dataset(fried.chicken) parm(xyz)'


I haven't read this thread at all (just the last 2 posts) so I apologize if this is inappropriate.
Back to top
View user's profile Send private message Visit poster's website
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