Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Need help with ISPF File Tailoring.

720 views
Skip to first unread message

Ed. Benoit

unread,
Jul 14, 2009, 12:13:51 PM7/14/09
to

Hello All,
I am send this to ISPF and REXX list.
I need help creating a skel pds member with a data set.
I can edit the data but I have attempted creating a member in my skel pds
but I am having problems
so I need an example. The code below work.

ADDRESS ISPEXEC "VGET (ZTEMPF) SHARED"
ADDRESS TSO
"ALLOC F("TMP1") DATASET('"ZTEMPF"')"
ABOVE CODE WORK FINE
"EXECIO 0 DISKW "TMP1""
ABOVE CODE WORK FINE
/* WRITE THE QUEUED STATEMENTS TO THE TEMP DATASET */
ZX=QUEUED()
"EXECIO "ZX" DISKW "TMP1" (FINIS"
ABOVE CODE WORK FINE
ADDRESS ISPEXEC "EDIT DATASET('&ZTEMPF') PANEL(ISREFR01)"
ABOVE CODE WORK FINE
I can edit the file, but I would like it in a pds skel member.
Question: How can I use file tailoring to put this data as a pds member.
Example: What vget, ftopen, ftincl and ftclose name(xxxxxx)
I have attempted several combination.
I need code to accomplished this task.

Ed.


____________________________________
Can love help you live longer? _Find out now_
(http://personals.aol.com/articles/2009/02/18/longer-lives-through-relationships/?ncid=emlweuslove0000000
1) .


Ed. Benoit
Recovery Knowledge
DB2 Automation Is Our Only Business
562-436-3660
**************Can love help you live longer? Find out now.
(http://personals.aol.com/articles/2009/02/18/longer-lives-through-relationships/?ncid=emlweu
slove00000001)

Lizette Koehler

unread,
Jul 14, 2009, 12:38:34 PM7/14/09
to
One way I do this, is to include IEBGENER to copy from SYSUT1 to SYSUT2 when saving this file.

ALLOC DD(SYSUT1) DSN(&ZTEMPF) ...
ALLOC DD(SYSUT2) DSN(my.output.file(memb) ...

CALL IEBGENER

You could also create an ISPF EDIT MACRO that does a create process to a new file.


I have left out a lot of the process. This is just an skeleton of how IEBGENER could be added to the process.

Lizette

Hardee, Charles H

unread,
Jul 14, 2009, 1:15:05 PM7/14/09
to
Ed,

The thing to remember about file tailoring is that you have to allocate
a "work" file for the FTxxxx commands to work with.
If this "work" file is a previously allocated PDS and the DSN in the
ALLOCATE is a fully qualified (by that I mean with a member name) file,
then when you FTOPEN it and subsequently "build" your JCL stream with
the FTINCLs, etc, you will be creating a job stream in the member in the
PDS. When you FTCLOSE it, there's nothing magic, the DD is simply
closed. It is up to you to subsequently DELETE it, if you want.

I guess the real question is, are you wanting to save this created job,
or are you thinking you "need" to save it in order to submit it?

When I do FT operations, I use a temporary PS type dataset, allocate it
to a DD, FTOPEN, FTINCL, FTINCL, etc, FTCLOSE and then issue a SUBMIT
against the created job stream. Once the SUBMIT is performed, I FREE it
and then DELETE it.

Chuck

-----Original Message-----
From: ISPF discussion list [mailto:ISP...@LISTSERV.ND.EDU] On Behalf Of
Ed. Benoit
Sent: Tuesday, July 14, 2009 11:02 AM
To: ISP...@LISTSERV.ND.EDU
Subject: Need help with ISPF File Tailoring.

Jeff Byrum

unread,
Jul 14, 2009, 1:42:12 PM7/14/09
to
And you don't even need to do that:

"FTOPEN TEMP"
"FTINCL skeleton"
"FTCLOSE
"VGET (ZTEMPF)"
Address TSO "SUBMIT '"ZTEMPF"'" /* Submit tailored JCL */

Of course always a good idea to check the RC after each service call (omitted for readability)...

Jeff

Jeff Byrum

unread,
Jul 14, 2009, 1:48:47 PM7/14/09
to
Forgot to say in my previous posting:

'skeleton' is a member of a PDS which has to be allocated to ISPSLIB -- you can put it in a pre-allocated ISPSLIB dataset, or you can LIBDEF the DSN to ISPSLIB before doing the FT services.

Then, all you need is to know how to create the skeleton member itself to describe the JCL you want.

Basically, just code the JCL, and for any variables, precede them with "&" and initialize them in the program that issues the FT calls (no need for any VPUTs). Good descriptions and examples in the ISPF Dialog Developer's Guide.

Jeff

-----Original Message-----
From: ISPF discussion list [mailto:ISP...@LISTSERV.ND.EDU] On Behalf Of Hardee, Charles H
Sent: Tuesday, July 14, 2009 1:11 PM
To: ISP...@LISTSERV.ND.EDU

Schwarz, Barry A

unread,
Jul 14, 2009, 2:34:36 PM7/14/09
to
Editing the member manually (or with an edit macro) and using file
tailoring are almost mutually exclusive. The purpose of file tailoring
is to perform the symbolic substitutions, condition inclusions, and loop
processing. This mostly eliminates the need to edit the member.

The only requirement to be a skeleton member is that the member be in a
PDS that is allocated to ISPSLIB (or the appropriate LIBDEF service has
been invoked for the PDS).

Does the data you are editing comply with the syntax for a skeleton
(either before or after editing)? Is it a real skeleton or just text to
be imbedded in a job stream?

File tailoring will not normally put data into a skeleton library. In
fact, it is usually used to tailor one or more members into a sequential
dataset. Is your question how to copy/move the data from the temporary
dataset to ISPSLIB?

Unrelated but what is the purpose of the null string in your first
EXECIO statement?

-----Original Message-----
From: Ed. Benoit
Sent: Tuesday, July 14, 2009 9:02 AM
To: ISP...@LISTSERV.ND.EDU
Subject: Need help with ISPF File Tailoring.

Ed. Benoit

unread,
Jul 14, 2009, 3:19:40 PM7/14/09
to
Problem resolved. I wrote directly into the xxxxx.skels(zuser)

Ed.

Rob Zenuk

unread,
Jul 14, 2009, 7:03:15 PM7/14/09
to
Here are 3 basic examples of File Tailoring. First is using the "TEMP"
dataset, the second is building a permanent PS dataset and the third is
building a permanent PDS member.

/* rexx */
arg skel ftdd ftdsn .
if skel = '' then skel = 'FTTEST2'
if ftdd = '' then ftdd = 'ANYDD'
if ftdsn = '' then ftdsn = 'SYS1.PARMLIB'
/*********************************************************************/
/* Invoke File Tailoring */
/*********************************************************************/
address ISPEXEC
"FTOPEN TEMP"
if RC <> 0 then say 'FTOPEN error RC='RC
"FTINCL" skel
if RC <> 0 then say 'FTINCL error RC='RC
"FTCLOSE LIBRARY("ftdd")"
if RC <> 0 then say 'FTCLOSE error RC='RC
"VGET (ZTEMPF)"
if RC <> 0 then say 'VGET error RC='RC
/*********************************************************************/
/* Submit the temporary DSN */
/*********************************************************************/
"EDIT DATASET('"ztempf"')"
/* address TSO "SUBMIT" ztempf */
/*********************************************************************/
/* Shutdown */
/*********************************************************************/
shutdown: exit(0)

FTTEST2 Skeleton

//&ZUSER.XX JOB (0000),SAMPLE,CLASS=A,MSGCLASS=X,NOTIFY=&ZUSER
//*************************************************************
//* SAMPLE JCL GENERATED FROM ISPF FILE TAILORING *
)TB 63
//* ON &ZDATE AT &ZTIME BY &ZUSER USING SKELETON &FTSKEL!*
//*************************************************************
//NOTHING EXEC PGM=IEFBR14
)TB 13
//&FTDD!DD DSN=&FTDSN,DISP=SHR


/* rexx */
arg skel ftdd ftdsn .
if skel = '' then skel = 'FTTEST'
if ftdd = '' then ftdd = 'ISPFILE'
if ftdsn = '' then ftdsn = userid()'.'skel
"ALLOC F("ftdd") DA('"ftdsn"') NEW CAT UNIT(SYSDA) SPACE(1 1)",
"TRACKS LRECL(80) BLKSIZE(0) RECFM(F B)"
if RC <> 0 then say 'ALLOC error on ISPFILE RC='RC
/*********************************************************************/
/* Invoke File Tailoring */
/*********************************************************************/
address ISPEXEC
"FTOPEN"
if RC <> 0 then say 'FTOPEN error RC='RC
"FTINCL" skel
if RC <> 0 then say 'FTINCL error RC='RC
"FTCLOSE LIBRARY("ftdd")"
if RC <> 0 then say 'FTCLOSE error RC='RC
/*********************************************************************/
/* Edit the DSN */
/*********************************************************************/
"EDIT DATASET('"ftdsn"')"
/*********************************************************************/
/* Free the allocation */
/*********************************************************************/
address TSO
"FREE F("ftdd") DELETE"
/*********************************************************************/
/* Shutdown */
/*********************************************************************/
shutdown: exit(0)


FTTEST Skeleton

-------------------------------
&SKEL &FTDD &FTDSN
-------------------------------


/* rexx */
arg skel ftdd ftdsn ftmem .
if skel = '' then skel = 'FTTEST'
if ftdd = '' then ftdd = 'ISPFILE'
if ftdsn = '' then ftdsn = userid()'.'skel
if ftmem = '' then ftmem = skel
"ALLOC F("ftdd") DA('"ftdsn"') NEW CAT UNIT(SYSDA) SPACE(1 1)",
"TRACKS LRECL(80) BLKSIZE(0) RECFM(F B) DIR(1)"
if RC <> 0 then say 'ALLOC error on ISPFILE RC='RC
/*********************************************************************/
/* Invoke File Tailoring */
/*********************************************************************/
address ISPEXEC
"FTOPEN"
if RC <> 0 then say 'FTOPEN error RC='RC
"FTINCL" skel
if RC <> 0 then say 'FTINCL error RC='RC
"FTCLOSE LIBRARY("ftdd") NAME("ftmem")"
if RC <> 0 then say 'FTCLOSE error RC='RC
/*********************************************************************/
/* Edit the DSN */
/*********************************************************************/
"EDIT DATASET('"ftdsn"("ftmem")')"
/*********************************************************************/
/* Free the allocation */
/*********************************************************************/
address TSO
"FREE F("ftdd") DELETE"
/*********************************************************************/
/* Shutdown */
/*********************************************************************/
shutdown: exit(0)

FTTEST Skeleton

-------------------------------
&SKEL &FTDD &FTDSN
-------------------------------



Hope This Helps,

Rob





In a message dated 7/14/2009 9:03:33 A.M. US Mountain Standard Time,
Ibm...@AOL.COM writes:


Hello All,
I am send this to ISPF and REXX list.
I need help creating a skel pds member with a data set.
I can edit the data but I have attempted creating a member in my skel pds
but I am having problems
so I need an example. The code below work.

ADDRESS ISPEXEC "VGET (ZTEMPF) SHARED"
ADDRESS TSO
"ALLOC F("TMP1") DATASET('"ZTEMPF"')"
ABOVE CODE WORK FINE
"EXECIO 0 DISKW "TMP1""
ABOVE CODE WORK FINE
/* WRITE THE QUEUED STATEMENTS TO THE TEMP DATASET */
ZX=QUEUED()
"EXECIO "ZX" DISKW "TMP1" (FINIS"
ABOVE CODE WORK FINE
ADDRESS ISPEXEC "EDIT DATASET('&ZTEMPF') PANEL(ISREFR01)"
ABOVE CODE WORK FINE
I can edit the file, but I would like it in a pds skel member.
Question: How can I use file tailoring to put this data as a pds member.
Example: What vget, ftopen, ftincl and ftclose name(xxxxxx)
I have attempted several combination.
I need code to accomplished this task.

Ed.


____________________________________
Can love help you live longer? _Find out now_
(http://personals.aol.com/articles/2009/02/18/longer-lives-through-relations
hips/?ncid=emlweuslove0000000
1) .


Ed. Benoit
Recovery Knowledge
DB2 Automation Is Our Only Business
562-436-3660

**************Can love help you live longer? Find out now.
(http://personals.aol.com/articles/2009/02/18/longer-lives-through-relations
hips/?ncid=emlweu
slove00000001)


**************Summer concert season is here! Find your favorite artists on
tour at TourTracker.com.
(http://www.tourtracker.com/?ncid=emlcntusmusi00000006)

cmj1...@gmail.com

unread,
Jul 24, 2015, 4:11:14 AM7/24/15
to
I wish you had included examples of this.
0 new messages