IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Issue with File skeleton JCLs


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Pragati Soni

New User


Joined: 18 Jan 2008
Posts: 47
Location: India

PostPosted: Tue May 05, 2009 12:22 pm
Reply with quote

I need to provide an option on the panel such that if the option is "Y" then the output of the skeleton JCL gets opened for editing. If the option is "N" then JCL gets edited in the background(the '&' variable names get replaced or so) and gets submitted.

The code I am using is
/*REXX*/
"ISPEXEC LIBDEF ISPSLIB DATASET ID('PRD.Y00205.REXX.QHTOOL.PRACTICE')"
"ALLOC FI(TMPJCL) DA('PRD.Y00205.REXX.QHTOOL.SKEL') SHR"
"ISPEXEC FTOPEN TEMP" /*FILE TAILORING*/
"ISPEXEC FTINCL RUNJCL02" /*FILE TAILORING*/
"ISPEXEC FTCLOSE" /*FILE TAILORING*/
"ISPEXEC VGET (ZTEMPN)"
"ISPEXEC EDIT DATASET ('"PRD.Y00205.REXX.QHTOOL.SKEL"("TMPJCL")')"
"EXECIO * DISKR "ZTEMPN" (FINIS STEM SKEL."
/*"EXECIO * DISKW TMPJCL (FINIS STEM SKEL."*/
"EXECIO * DISKW "PRD.Y00205.REXX.QHTOOL.SKEL("TMPJCL")" +
(FINIS STEM SKEL."
"FREE FI(TMPJCL)"
SAY RC


Here, on submittion the output JCL gets opened everytime. My requirement is it should get edited everytime but it should get open only when I give the option 'Y' in EDIT JCL.

Could u please guide me.

Thanks in advance
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue May 05, 2009 12:42 pm
Reply with quote

Are you sure that you want to edit the source skeleton file, or the tailored output ?
Back to top
View user's profile Send private message
Pragati Soni

New User


Joined: 18 Jan 2008
Posts: 47
Location: India

PostPosted: Tue May 05, 2009 2:41 pm
Reply with quote

I want to edit the tailored output file.
Could u guide me for my query?

expat wrote:
Are you sure that you want to edit the source skeleton file, or the tailored output ?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue May 05, 2009 2:52 pm
Reply with quote

From my reply to your previous thread

Quote:

Having reread the thread and seen a little deeper .......................

If you want to edit the output file - why not use
Code:

"ISPEXEC VGET (ZTEMPF)"
"ISPEXEC EDIT DATASET('"ZTEMPF"')"


rather than copying it to another file.
Back to top
View user's profile Send private message
Pragati Soni

New User


Joined: 18 Jan 2008
Posts: 47
Location: India

PostPosted: Tue May 05, 2009 3:58 pm
Reply with quote

Thanks...

I have modified the code like below.

/*REXX*/
"ISPEXEC LIBDEF ISPSLIB DATASET ID('PRD.Y00205.REXX.QHTOOL.PRACTICE')"
"ISPEXEC LIBDEF ISPSLIB DATASET ID('PRD.Y00205.REXX.QHTOOL.SKEL')"
"ALLOC DA('PRD.Y00205.REXX.QHTOOL.SKEL') FI(ZTEMPF) SHR "
"ISPEXEC FTOPEN TEMP" /*FILE TAILORING*/
"ISPEXEC FTINCL RUNJCL02" /*FILE TAILORING*/
"ISPEXEC FTCLOSE" /*FILE TAILORING*/
"ISPEXEC VGET (ZTEMPF)"
"ISPEXEC EDIT DATASET('"ZTEMPF"')"
"EXECIO * DISKR ZTEMPF (FINIS STEM SKEL."
"EXECIO * DISKW ZTEMPF (FINIS STEM SKEL."


It is giving error. Though I am digging into it but if something is cleary visible to u please let me know.

Thanks,
Pragati

expat wrote:
From my reply to your previous thread

Quote:

Having reread the thread and seen a little deeper .......................

If you want to edit the output file - why not use
Code:

"ISPEXEC VGET (ZTEMPF)"
"ISPEXEC EDIT DATASET('"ZTEMPF"')"


rather than copying it to another file.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue May 05, 2009 4:08 pm
Reply with quote

Quote:
It is giving error. Though I am digging into it but if something is cleary visible to u please let me know.

Without you posting what the error is how can I possibly see anything.

Psychic day is Friday this week I believe.
Back to top
View user's profile Send private message
Pragati Soni

New User


Joined: 18 Jan 2008
Posts: 47
Location: India

PostPosted: Tue May 05, 2009 4:28 pm
Reply with quote

Oh sorry.

Actually the error is concerning declaring a member.

The input or output file ZTEMPF is associated with a partitioned data set. A member name must be specified.
EXECIO error while trying to GET or PUT a record.
***


I was getting almost the same error before but then I declared the the member manually. Here I need it to be created.

I really need it.

expat wrote:
Quote:
It is giving error. Though I am digging into it but if something is cleary visible to u please let me know.

Without you posting what the error is how can I possibly see anything.

Psychic day is Friday this week I believe.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue May 05, 2009 4:32 pm
Reply with quote

So where does the error occur - in the file tailoring or in the attempt to edit the output dataset.
Back to top
View user's profile Send private message
genesis786

Active User


Joined: 28 Sep 2005
Posts: 210
Location: St Katherine's Dock London

PostPosted: Tue May 05, 2009 5:07 pm
Reply with quote

u have aleady opened the dataset in edit mode and then u are writing it..

Code:

"ISPEXEC VGET (ZTEMPN)"
"ISPEXEC EDIT DATASET ('"PRD.Y00205.REXX.QHTOOL.SKEL"("TMPJCL")')"
"EXECIO * DISKR "ZTEMPN" (FINIS STEM SKEL."
/*"EXECIO * DISKW TMPJCL (FINIS STEM SKEL."*/
"EXECIO * DISKW "PRD.Y00205.REXX.QHTOOL.SKEL("TMPJCL")" +
(FINIS STEM SKEL."


instead, can u try:

Code:

"ISPEXEC VGET (ZTEMPN)"
"EXECIO * DISKR "ZTEMPN" (FINIS STEM SKEL."
"EXECIO * DISKW TMPJCL (FINIS STEM SKEL."
/* or "EXECIO * DISKW "PRD.Y00205.REXX.QHTOOL.SKEL("TMPJCL")" +
(FINIS STEM SKEL."  */
IF ZOPT = "Y" THEN DO
"ISPEXEC EDIT DATASET ('"PRD.Y00205.REXX.QHTOOL.SKEL"("TMPJCL")')"
END
Back to top
View user's profile Send private message
Pragati Soni

New User


Joined: 18 Jan 2008
Posts: 47
Location: India

PostPosted: Tue May 05, 2009 6:06 pm
Reply with quote

The error is coming here (I did TRACE I)

7 *-* "ISPEXEC VGET (ZTEMPF)"
>L> "ISPEXEC VGET (ZTEMPF)"
8 *-* "EXECIO * DISKR ZTEMPF (FINIS STEM SKEL."
>L> "EXECIO * DISKR ZTEMPF (FINIS STEM SKEL."
The input or output file ZTEMPF is associated with a partitioned data set. A me
mber name must be specified.
EXECIO error while trying to GET or PUT a record.
+++ RC(20) +++


It seems the issue is in reading the temp file.

expat wrote:
So where does the error occur - in the file tailoring or in the attempt to edit the output dataset.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue May 05, 2009 6:11 pm
Reply with quote

The syntax for EXECIO is
"EXECIO * DISKR DDNAME ( FINIS STEM SKEL."

ZTEMPF is a dataset name not a DDNAME
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue May 05, 2009 6:21 pm
Reply with quote

Fifty times this has been brought to your attention:
Quote:
"ALLOC DA('PRD.Y00205.REXX.QHTOOL.SKEL') FI(ZTEMPF) SHR "


you are not allocating a PDS member with this alloc,
why don't you try what has been previously been suggested:
Quote:
"ALLOC DA('PRD.Y00205.REXX.QHTOOL.SKEL.(MEMBERNAME)') FI(ZTEMPF) SHR "
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue May 05, 2009 6:51 pm
Reply with quote

Please post the FTCLOSE statement from the part that worked.
Back to top
View user's profile Send private message
Pragati Soni

New User


Joined: 18 Jan 2008
Posts: 47
Location: India

PostPosted: Tue May 05, 2009 6:51 pm
Reply with quote

Again giving error: I tried using ALLOC command too. (I have a doubt regarding Ztempf, I doubt if it can be used as a DDname).


4 *-* "ALLOC DA('PRD.Y00205.REXX.QHTOOL.SKEL(SKELJCL)') FI(ZTEMPF) SHR REU
SE"
>L> "ALLOC DA('PRD.Y00205.REXX.QHTOOL.SKEL(SKELJCL)') FI(ZTEMPF) SHR R
EUSE"
5 *-* "ISPEXEC FTOPEN TEMP" /*FILE TAILORING*/
>L> "ISPEXEC FTOPEN TEMP"
6 *-* "ISPEXEC FTINCL RUNJCL02" /*FILE TAILORING*/
>L> "ISPEXEC FTINCL RUNJCL02"
7 *-* "ISPEXEC FTCLOSE" /*FILE TAILORING*/
>L> "ISPEXEC FTCLOSE"
8 *-* "ISPEXEC VGET (ZTEMPF)"
>L> "ISPEXEC VGET (ZTEMPF)"
9 *-* "EXECIO * DISKR ZTEMPF (FINIS STEM SKEL."
>L> "EXECIO * DISKR ZTEMPF (FINIS STEM SKEL."
System abend code 013, reason code 00000024.
Abend in host command EXECIO or address environment routine TSO.
EXECIO error while trying to GET or PUT a record.
+++ RC(20) +++
10 *-* "EXECIO * DISKW ZTEMPF (FINIS STEM SKEL."
>L> "EXECIO * DISKW ZTEMPF (FINIS STEM SKEL."
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue May 05, 2009 6:53 pm
Reply with quote

expat wrote:
The syntax for EXECIO is
"EXECIO * DISKR DDNAME ( FINIS STEM SKEL."

ZTEMPF is a dataset name not a DDNAME


Try
Code:
"EXECIO * DISKR "ZTEMPN" (FINIS STEM SKEL."
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue May 05, 2009 6:58 pm
Reply with quote

Sorry, I am just a stupid programmer,
why
Code:
"ISPEXEC VGET (ZTEMPF)"

the variable access?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue May 05, 2009 7:16 pm
Reply with quote

My original use of ZTEMPF was to get the dataset name to allow the OP to edit the file tailoring output file. It appears that the OP wants to copy it.

It may come in handy if the file tailoring output is a PDS, which I believe it may be, but because of the confusing manner in which data is posted and additional comments are tagged on, I'm probably as lost as anyone else.

If the FT out is a PS, then my previous suggestion of using ZTEMPN will suffice for reading the file.

If it's a PDS, the the OP will need to allocate the dataset name (ZTEMPF) and the member name to an alternative DD to read the tailored JCL into a stem. (not sure if you can update the DSN for TEMP FT files)

Dick, it's no wonder you're confused ......... Join the club icon_rolleyes.gif
Or better still ............ pass the cognac icon_lol.gif
Back to top
View user's profile Send private message
Pragati Soni

New User


Joined: 18 Jan 2008
Posts: 47
Location: India

PostPosted: Tue May 05, 2009 7:24 pm
Reply with quote

Giving errors

4 *-* "ALLOC DA('PRD.Y00205.REXX.QHTOOL.SKEL(SKELJCL)') FI(ZTEMPF) SHR REU
SE"
>L> "ALLOC DA('PRD.Y00205.REXX.QHTOOL.SKEL(SKELJCL)') FI(ZTEMPF) SHR R
EUSE"
5 *-* "ISPEXEC FTOPEN TEMP" /*FILE TAILORING*/
>L> "ISPEXEC FTOPEN TEMP"
6 *-* "ISPEXEC FTINCL RUNJCL02" /*FILE TAILORING*/
>L> "ISPEXEC FTINCL RUNJCL02"
7 *-* "ISPEXEC FTCLOSE" /*FILE TAILORING*/
>L> "ISPEXEC FTCLOSE"
8 *-* "ISPEXEC VGET (ZTEMPF)"
>L> "ISPEXEC VGET (ZTEMPF)"
9 *-* "EXECIO * DISKR "ZTEMPF" (FINIS STEM SKEL."
>L> "EXECIO * DISKR "
>V> "PRD.Y00205.SYSFSG2.SPFTEMP1.CNTL"
>O> "EXECIO * DISKR PRD.Y00205.SYSFSG2.SPFTEMP1.CNTL"
>L> " (FINIS STEM SKEL."
>O> "EXECIO * DISKR PRD.Y00205.SYSFSG2.SPFTEMP1.CNTL (FINIS STEM SKEL.
"
EXECIO "ddname" positional parameter is not valid.
+++ RC(20) +++
10 *-* "EXECIO * DISKW "ZTEMPF" (FINIS STEM SKEL."
>L> "EXECIO * DISKW "
***
>V> "PRD.Y00205.SYSFSG2.SPFTEMP1.CNTL"
>O> "EXECIO * DISKW PRD.Y00205.SYSFSG2.SPFTEMP1.CNTL"
>L> " (FINIS STEM SKEL."
>O> "EXECIO * DISKW PRD.Y00205.SYSFSG2.SPFTEMP1.CNTL (FINIS STEM SKEL.
"
EXECIO "ddname" positional parameter is not valid.
+++ RC(20) +++


Thanks in advance for guidance

expat wrote:
expat wrote:
The syntax for EXECIO is
"EXECIO * DISKR DDNAME ( FINIS STEM SKEL."

ZTEMPF is a dataset name not a DDNAME


Try
Code:
"EXECIO * DISKR "ZTEMPN" (FINIS STEM SKEL."
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue May 05, 2009 7:35 pm
Reply with quote

In my post I used

ZTEMPN

What did YOU use.

Also, reading your code, why are you reading from a file only to write the same data back to the same file.

Can you please explain the rational behind this.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue May 05, 2009 7:57 pm
Reply with quote

Pragati Soni

Going through your code once again it appears to me that you have not bothered to read the manual that I linked to yesterday. Is it really worth me continuing in this thread ?

Again above, I post something using one reference yet you use a completely different one.

Please read the manual I linked to yesterday, in particular the three points that I suggested that you pay close attention to in yesterdays postings. In fact another point I had made yesterday appears to have been completly igored too.

Until you have done that, and shown proof of doing so I shall withdraw from further participation in this topic. This could easily have been resolved yesterday had you done as requested.

And if you are still unwilling to follow this course, and/or listen to experience, I can only ask that if your chosen vocation within IT is the correct one.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Tue May 05, 2009 9:32 pm
Reply with quote

Looking at your code, it looks like you are trying to do three different functions:
1. file tailoring
2. copying
3. editing

Since you are a beginner, I think it is too complex of a program for you. I suggest you write three different rexx programs, each doing one of the functions. AFTER you have gotten each one to work, then merge all functions into one program.

You posted:
Quote:
EXECIO "ddname" positional parameter is not valid.
+++ RC(20) +++

What part of the message do you not understand?

I suggest you add this early in your program:
Code:
Address TSO "PROFILE MSGID"

The 'parameter is not valid' message will include a message id, which you should be able to lookup.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Wed May 06, 2009 2:52 am
Reply with quote

What's going on here?



Pragati Soni wrote:
I need to provide an option on the panel such that if the option is "Y" then the output of the skeleton JCL gets opened for editing. If the option is "N" then JCL gets edited in the background(the '&' variable names get replaced or so) and gets submitted.

The code I am using is
/*REXX*/
"ISPEXEC LIBDEF ISPSLIB DATASET ID('PRD.Y00205.REXX.QHTOOL.PRACTICE')"
"ALLOC FI(TMPJCL) DA('PRD.Y00205.REXX.QHTOOL.SKEL') SHR"
"ISPEXEC FTOPEN TEMP" /*FILE TAILORING*/
"ISPEXEC FTINCL RUNJCL02" /*FILE TAILORING*/
"ISPEXEC FTCLOSE" /*FILE TAILORING*/
"ISPEXEC VGET (ZTEMPN)"
"ISPEXEC EDIT DATASET ('"PRD.Y00205.REXX.QHTOOL.SKEL"("TMPJCL")')"
"EXECIO * DISKR "ZTEMPN" (FINIS STEM SKEL."
/*"EXECIO * DISKW TMPJCL (FINIS STEM SKEL."*/
"EXECIO * DISKW "PRD.Y00205.REXX.QHTOOL.SKEL("TMPJCL")" +
(FINIS STEM SKEL."
"FREE FI(TMPJCL)"
SAY RC

Here, on submittion the output JCL gets opened everytime. My requirement is it should get edited everytime but it should get open only when I give the option 'Y' in EDIT JCL.

Could u please guide me.

Thanks in advance


  1. There is no question in your post. Where exactly is your problem ?
  2. In your code snippet there is nothing about the panel. Is that your problem ?
  3. You wrote: "My requirement is it should get edited everytime but it should get open only when I give the option 'Y' in EDIT JCL".
    Do you fully understand yourself ?
  4. If I understand the point of the EXECIOs in your program, you want to copy the temporary file to a permanent location.
    So, why do you use a temporary file in the first place ?
    Why not make the File Tailoring straight into a library member or a sequential file ?
    Then it is easy to EDIT or SUBMIT (yes this is your requirement, I think).
  5. But then again, maybe you do not need to keep the submitted JCL. Who knows ?
  6. The answer to your problem is: use an IF statement (secret weapon)
    If EDITOPT = 'Y' then "EDIT ..." Else "SUBMIT ..."
    (Assuming EDITOPT is the variable that contains the answer to the EDIT JCL question).
  7. expat advised you to use ZTEMPF instead of some file in the EDIT statement.
    That is because that file is not part of the process. It may certainly be empty.
    And you changed both the EDIT line and the EXECIO lines !
Just looking at the piece of code makes me quite depressed suddenly.
There is a mistake almost on each line icon_cry.gif
I think I'll logoff for today.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top