Discussion:
File Tailoring in REXX and Clist
(too old to reply)
drispw
2005-02-28 13:41:51 UTC
Permalink
I have been puzzling over an issue that I can't seem to resolve. I
have what looks to me to be identical file tailoring processes in clist
and REXX. The clist version works in ISPF, but fails when I run it in
batch TSO (IKJEFT01). The REXX version works in both situations.
Below is an example of the two routines.

CLIST:

ISPEXEC VGET (WORKMEM)
SET OUTSKPDS = &STR('TEST.SAMPLE.SKELS')
ALLOC DD(OUTSKEL) DS(&OUTSKPDS) SHR
ISPEXEC FTOPEN
ISPEXEC FTINCL SAMPSKEL
ISPEXEC FTINCL SAMPSKL2
ISPEXEC FTINCL SAMPSKL3
ISPEXEC FTCLOSE LIBRARY(OUTSKEL) NAME(&WORKMEM)

In batch TSO, the FTCLOSE receives an error that states that OUTSKEL is
not a PDS


REXX:

'VGET (WORKMEM)'
OUTSKPDS = TEST.SAMPLE.SKELS
ADDRESS TSO "ALLOC DD(OUTSKEL) DS('"OUTSKPDS"') SHR"
'FTOPEN'
'FTINCL SAMPSKEL'
'FTCLOSE LIBRARY(OUTSKEL) NAME('WORKMEM')'

This works in both foreground and background

HELP!!
Jeremy C B Nicoll
2005-02-28 17:29:00 UTC
Permalink
Post by drispw
I have been puzzling over an issue that I can't seem to resolve. I
have what looks to me to be identical file tailoring processes
They're not - you FTINCL different skeletons in the two.
Post by drispw
in clist and REXX. The clist version works in ISPF, but fails when I
run it in batch TSO (IKJEFT01). The REXX version works in both
situations. Below is an example of the two routines.
Do the ones that work continue to work if you call them several times
in succession, rather than alternating with a failing one?

What are the return codes from each ispf and tso service?
Post by drispw
ISPEXEC VGET (WORKMEM)
SET OUTSKPDS = &STR('TEST.SAMPLE.SKELS')
ALLOC DD(OUTSKEL) DS(&OUTSKPDS) SHR
ISPEXEC FTOPEN
ISPEXEC FTINCL SAMPSKEL
ISPEXEC FTINCL SAMPSKL2
ISPEXEC FTINCL SAMPSKL3
ISPEXEC FTCLOSE LIBRARY(OUTSKEL) NAME(&WORKMEM)
In batch TSO, the FTCLOSE receives an error that states that OUTSKEL
is not a PDS
Well, is it, at that point?
Post by drispw
'VGET (WORKMEM)'
OUTSKPDS = TEST.SAMPLE.SKELS
ADDRESS TSO "ALLOC DD(OUTSKEL) DS('"OUTSKPDS"') SHR"
'FTOPEN'
'FTINCL SAMPSKEL'
'FTCLOSE LIBRARY(OUTSKEL) NAME('WORKMEM')'
This works in both foreground and background
HELP!!
--
Jeremy C B Nicoll - my opinions are my own.
drispw
2005-02-28 18:04:46 UTC
Permalink
Okay, they're not identical because one includes more skeletons.
Yes, the ones that work, work every time they are called.
I don't know all the return codes, but I do know the clist FTCLOSE in
batch gets an rc=20
Yes, the output dataset is an existing, catalogued PDS every time, all
the time.
Frank Clarke
2005-03-01 00:43:25 UTC
Permalink
Post by drispw
Okay, they're not identical because one includes more skeletons.
Yes, the ones that work, work every time they are called.
I don't know all the return codes, but I do know the clist FTCLOSE in
batch gets an rc=20
Yes, the output dataset is an existing, catalogued PDS every time, all
the time.
If you're getting an RC=20, ISPEXEC is also setting ZERRSM and ZERRLM. Find out
what's in those messages.


(change Arabic number to Roman numeral to email)
drispw
2005-03-01 17:31:59 UTC
Permalink
One of my coworkers found the difference between the REXX and the
clist. The REXX is allocating a temporary ISPFILE for background
execution and the clist is not.

Thanks for all the input.

Loading...