View previous topic :: View next topic |
Author |
Message |
shiv_swami Beginner

Joined: 29 Nov 2003 Posts: 68 Topics: 14
|
Posted: Tue Dec 28, 2004 1:42 pm Post subject: Rexx in Batch to submit job by changing a string in JCL |
|
|
Hi All,
I have JCL in a dataset. shiv.util(bkp)
JCL
Code: |
//JSTEP010 EXEC PGM=BKPDASD
//PROIN DD *
PMPPE0DU 001
/*
//SYSPCH DD DISP=SHR,DSN=SHIV.BKPDEC10(PMPPE0DU)
|
I want to submit the JCL by changing PMPPE0DU with another string.. This would ease by work of submitting the job 15 times everyweek by doing.
I execute following commands
Code: |
Chage all PMPPE0DU xxxxyyyy
submit
cancel
|
Could this be made as a batch job with xxxxyyyy as argument.[/code] _________________ Regards,
Shivprakash |
|
Back to top |
|
 |
superk Advanced

Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Tue Dec 28, 2004 8:40 pm Post subject: |
|
|
Personally, I have no idea what it is you wish to do, and what problem you are experiencing. |
|
Back to top |
|
 |
Phantom Data Mgmt Moderator

Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Wed Dec 29, 2004 1:09 am Post subject: |
|
|
Shiv,
Did u try File Tailoring Skeletons in REXX ? It can replace a string and also submit your job. Or you can write a small rexx to do the REPLACE operation, invoke it from jcl (IKJEFT1A) as the first step.
Does the replacing string 'xxxxyyyy' contain any date ? If so, you can even use SORT. There are many ways to do it. Could you pls give us more information so that we can suggest better alternatives.
Thanks,
Phantom |
|
Back to top |
|
 |
shiv_swami Beginner

Joined: 29 Nov 2003 Posts: 68 Topics: 14
|
Posted: Wed Dec 29, 2004 10:17 am Post subject: Rexx in Batch to submit job by changing a string in JCL |
|
|
Thanks Phantom,
I am trying to achieve this.
Code: |
Or you can write a small rexx to do the REPLACE operation, invoke it from jcl (IKJEFT1A) as the first step.
|
I wrote following rexx code
Code: |
XDSN = 'G1JR00AT.PPM.JCL(TEST)'
'ISPEXEC EDIT DATASET('XDSN')'
ADDRESS ISREDIT
ISREDIT "CHANGE ALL 'PMBKG4DC' 'XXXXYYYY'"
ISREDIT "SUB"
ISREDIT "CANCEL"
ISREDIT "END"
EXIT
|
But I am not sure if ISREDITs can be used in batch and if there is any other problem with this code. Once this stuff works I will make XDSN and strings as arguments. _________________ Regards,
Shivprakash |
|
Back to top |
|
 |
ofer71 Intermediate
Joined: 12 Feb 2003 Posts: 358 Topics: 4 Location: Israel
|
Posted: Wed Dec 29, 2004 11:24 am Post subject: |
|
|
What about this ?
Code: | /* REXX */
/* Use EXECIO to load an array, or just type it */
ITEM.1 = 'BLABLA1'
ITEM.2 = 'BLABLA2'
ITEM.3 = 'BLABLA3'
ITEM.4 = 'BLABLA4'
ITEM.5 = 'BLABLA5'
ITEM.6 = 'BLABLA6'
ITEM.7 = 'BLABLA7'
ITEM.8 = 'BLABLA8'
ITEM.9 = 'BLABLA9'
ITEMS = 9
DO I = 1 TO ITEMS
QUEUE "//JSTEP010 EXEC PGM=BKPDASD "
QUEUE "//PROIN DD * "
QUEUE " PMPPE0DU 001 "
QUEUE "/* "
QUEUE "//SYSPCH DD DISP=SHR,DSN=SHIV.BKPDEC10("ITEM.I")"
QUEUE
"SUBMIT *"
END
EXIT
|
O.
________
List of Subaru transmissions history
Last edited by ofer71 on Sat Feb 05, 2011 11:20 am; edited 1 time in total |
|
Back to top |
|
 |
shiv_swami Beginner

Joined: 29 Nov 2003 Posts: 68 Topics: 14
|
Posted: Wed Dec 29, 2004 12:14 pm Post subject: |
|
|
Thanks very much O.
This is Just what the doctor ordered for me . With the above solution I execute rexx code to submit jobs iteratively whereas my earlier posts were looking at a solution which would be a JCL to execute a REXX code and REXX code in turn will pull dataset name and the "string to be replace." _________________ Regards,
Shivprakash |
|
Back to top |
|
 |
Phantom Data Mgmt Moderator

Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Thu Dec 30, 2004 2:06 am Post subject: |
|
|
Shiv,
ISPF commands (ISPEXEC) will work in batch mode but thatz NOT so Easy. You need to allocate ISPPLIB (Panel Lib), ISPMLIB (Message Lib), ISPTLIB (Table Lib), SYSEXEC, SYSPROC and other ISPF related libraries to do this.
But Don't worry. The following link contains a REXX macro called BATCHPDF. Download this code into your mainframe system and store it in your REXX libraries. Then, Open a empty member and invoke BATCHPDF from the command line. It will create you a JCL which has the ability to call a REXX program with ISPF references.
Batchpdf code:
http://www.sillysot.com/ftp/batchpdf.txt
For more details on invoking REXX from JCL see my posts in this link.
http://www.mvsforums.com/helpboards/viewtopic.php?t=271&highlight=batchpdf
Hope this helps,
Thanks,
Phantom |
|
Back to top |
|
 |
Prasam Beginner

Joined: 20 May 2004 Posts: 26 Topics: 7 Location: Illinois,USA
|
Posted: Wed Jan 12, 2005 9:26 pm Post subject: |
|
|
Phantom,
I tried running the JCL generated by the macro BATCHPDF specified by you.But on my system,the job is failing and iam getting the following message.
Quote: |
ISPP330 BDISPMAX exceeded -/-100 displays exceeded in batch mode on panel A
|
There is no looping in my routine.I tried increasing BDISPMAX value,but no use.
Could you please help.
Thanks,
Prasanth. _________________ The struggle alone pleases us, not the victory. -Pascal,Blaise- 1623-1662, French Scientist |
|
Back to top |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Wed Jan 12, 2005 11:22 pm Post subject: |
|
|
It means that you are not exiting ISPF cleanly or are getting an error message screen displayed in batch. Most likely you are not getting out of the editor completely. Remember that in batch mode, ISPF just presses enter on every screen so it is easy to get into a loop. |
|
Back to top |
|
 |
|
|