View previous topic :: View next topic
|
Author |
Message |
karz
New User
Joined: 04 Feb 2010 Posts: 39 Location: Mumbai
|
|
|
|
Hi all,
I am trying to execute a simple REXX usign Skeleton. Where i have the skeleton of a job card and skeleton of a Sort jcl. The ouput PDS opens but none of the skeleton gets inserted..
The code i used is as follows:
"ISPEXEC LIBDEF ISPSLIB DATASET ID('R992.SKELETON')"
"ALLOC FI(SORTJCL) DA(R992.FTAILOR(SORTJCL)') SHR REU"
SAY 'ENTER JOB NAME:'
PULL JOBNAME
SAY 'ENTER OLD DATASET'
PULL OLDSRC
SAY 'ENTER NEW DATASET'
PULL NEWSRC
"ISPEXEC FTINCL JOBSTMT"
"ISPEXEC FTINCL SYNCSORT"
"ISPEXEC FTCLOSE"
"ISPEXEC EDIT DATASET (R992.FTAILOR(SORTJCL)')"
EXIT |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
DO NOT stuff your problem at the end of an unrelated and dormant topic.
start your own topic.
Have you used the REXX trace facility.
Have you used the ISPF FT trace facility.
If not, suggest that you do. |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
I miss a FTOPEN for SORTJCL. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Good spot Peter. Go to the top of the class |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Expat, you make me blush all the time. |
|
Back to top |
|
|
karz
New User
Joined: 04 Feb 2010 Posts: 39 Location: Mumbai
|
|
|
|
Thanks Peter:)...FTOPEN was indeed missing..now its working as expected...the code being:
/*REXX*/
"ISPEXEC LIBDEF ISPSLIB DATASET ID('R992.SKELETON')"
"ISPEXEC LIBDEF ISPFILE DATASET ID('R992.FTAILOR(SORTJCL)')"
SAY 'ENTER JOB NAME:'
PULL JOBNAME
SAY 'ENTER OLD DATASET'
PULL OLDSRC
SAY 'ENTER NEW DATASET'
PULL NEWSRC
"ISPEXEC FTOPEN"
"ISPEXEC FTINCL JOBSTMT"
"ISPEXEC FTINCL SORTJCL"
"ISPEXEC FTINCL SYNCSORT"
"ISPEXEC FTCLOSE NAME(SORTJCL)"
"ISPEXEC EDIT DATASET ('R992.FTAILOR(SORTJCL)')"
EXIT |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
karz, good its working for you. I always used something like this :
Code: |
ISPEXEC FTOPEN TEMP
ISPEXEC FTINCL aaaaaaaa
ISPEXEC FTINCL bbbbbbbb
ISPEXEC FTCLOSE
ISPEXEC VGET (ZTEMPF)
ISPEXEC EDIT DATASET('&ZTEMPF')
SUB '&ZTEMPF'
|
|
|
Back to top |
|
|
Prasun De
New User
Joined: 17 Jan 2008 Posts: 28 Location: Kolkata, INDIA
|
|
|
|
Hi PeterHolland,
I was just going through this thread and tried your approach. But the ISPEXEC EDIT command is throwing ISPF dialog error and
telling that the ZTEMPF temporary file is not cataloged.
But without the EDIT if I use only SUBMIT ZTEMPF, it does submit the job.
I am not getting why the temporary file is getting uncataloged before the execution is complete.
Please help me understand... |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
the ZTEMPF dataset name returned is an ABSOLUTE dataset name...
( in other words the PREFIX/NOPREFIX process has already been done )
when using it the proper apostrophes should be used in order not to invoke again the PREFIX/NOPREFIX stuff
Code: |
Address ISPEXEC "EDIT DATASET('"ZTEMPF"') " |
also when You have a problem, good forum manners require to start a new topic
instead of piggybacking on an existing one, more than ever when the topic is 2 years old
forums are a community effort, what makes You think that Peter will interested in resurrecting a 2 years old topic |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Quote: |
forums are a community effort, what makes You think that Peter will interested in resurrecting a 2 years old topic
|
At my age its a problem to resurrect anything at all. |
|
Back to top |
|
|
Prasun De
New User
Joined: 17 Jan 2008 Posts: 28 Location: Kolkata, INDIA
|
|
|
|
sorry for replying on a old topic.
I'll start a new one on this.
Thank You very much for replying though. I appreaciate your reply. |
|
Back to top |
|
|
|