Thanks,
Jim
I think you're out of luck here. ISREDIT requires ISPF, and ISPF (AFAIK)
doesn't run in batch. Please let us know if you find a solution to this,
I've wanted to do this a few times.
HTH,
Bill Lynch
ISPF supplies an exec ISREPDF that can be used for this (or from TSO
READY or from an ISPF Command line) so I guess you could use
ISPSTART CMD(ISREPDF somedataset MACRO(somemacro) NEWAPPL(ISR)
in the JCL
-Doug
You absolutely can run ISPF in batch!
For example, you can use PGM=IKJEFT01 with PARM='ISPSTART CMD(MYEDITOR)'
Create a clist or REXX exec called MYEDITOR (or whatever), and make sure it's in
a library that's in your JCL SYSPROC DD concatenation. MYEDITOR would look
something like this:
/* REXX - MYEDITOR */
"ISPEXEC CONTROL ERRORS RETURN"
"ISPEXEC EDIT DATASET(your_dataset) MACRO(your_edit_macro)"
exit
Only catch is that you need to make sure all the proper DD's are in your JCL,
including panels (ISPPLIB), messages (ISPMLIB), etc.
Good Luck :-)
--
***********************************************
* Jim Van Sickle <mailto:jim...@ibm.net> *
* Manager, Operations and Tech Support *
* United Retail, Inc. *
*---------------------------------------------*
* visit my meager web site at: *
* <http://mypage.ihost.com/jimswebsite/> *
***********************************************
Absolutely right, of course.
There's lots to watch out for running ISPF in batch.
Where will you get the ISP and ISR profiles from? If you use the system
standard, it is possible that two people can run your macro at the same
time and get contention
Will your routine do any file tailoring (or indeed anything clever)? If
so, make sure that you allocate ISPF work files, or it will try and use
the same ones as the on-line user - contention again.
Are you going to use your own profile variables in the macro? My advice
is DON'T, because you can never guarantee that what's in batch is the
same as what's on-line to you (you can't use your own profile libraries
direct in batch, contention yet again).
I think I have made all the idiot mistakes possible in running batch
ISPF because I've done a LOT of it. Would anyone be interested in a more
comprehensive guide and some free sample code?
Roy Gardiner
> Doug Nadel wrote:
> >
> > Jim,
> > Just create a batch job with the ISPF libraries allocated (ISPxLIB et
> > al) and a call to IKJEFT01 (the TSO TMP). Then in the systsin dd
> > statement, use
> > ISPSTART CMD(some exec) NEWAPPL(ISR)
> > and have the 'some exec'
> > do an ISPEXEC EDIT DATASET(some dataset) MACRO(some macro)
> >
(snip)
> I think I have made all the idiot mistakes possible in running batch
> ISPF because I've done a LOT of it. Would anyone be interested in a more
> comprehensive guide and some free sample code?
>
You bet, sign me up!
TIA,
Bill Lynch
> Roy Gardiner
>Where will you get the ISP and ISR profiles from? If you use the system
>standard, it is possible that two people can run your macro at the same
>time and get contention.
I always build an empty ISPPROF, DISP=NEW and take the defaults. And
I build them in VIO so they evaporate at jobend: no DSN, no CATLG, no
nuthin'.
Frank Clarke
Tampa Area REXX Programmers' Alliance
Member of the REXX Language Association
Join us at http://www.rexxla.org
(Remove the currency symbol before replying.)
> I always build an empty ISPPROF, DISP=NEW and take the defaults. And
> I build them in VIO so they evaporate at jobend: no DSN, no CATLG, no
> nuthin'.
Frank,
I get RC 12s when doing it your way. I have always presumed this was
because the tables are open WRITE during the build and that two batch
jobs running together would contend. It happened to me whenever I used
something automated to submit several jobs (with different job names)
and several initiators were available. Of course, it only happens some
of the time.
Are the RC 12s due to something else?
What I do now is to IEBCOPY the tables to a temporary and open them in
the ISPF step. This always works, but is of course an overhead.
I have summarised my experiences with ISPF in BATCH at my web site
Roy Gardiner
Warning! Advertising!
//ISPPROF DD UNIT=VIO,DISP=(NEW,DELETE),
// SPACE=(TRK,(10,10,40)),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)
It's not possible this could cause contention, not even with a
following step, certainly not with a sister-job. The RC=12 must be
from something else.
I have seen the occasional "TBOPEN FAILED -- TABLE IN USE" and have
been unable to diagnose it. Dataset-conflict seems the most unlikely
culprit.
> >I get RC 12s when doing it your way. I have always presumed this was
> >because the tables are open WRITE during the build and that two batch
> >jobs running together would contend. It happened to me whenever I used
> >something automated to submit several jobs (with different job names)
> >and several initiators were available. Of course, it only happens some
> >of the time.
> >
> >Are the RC 12s due to something else?
>
> //ISPPROF DD UNIT=VIO,DISP=(NEW,DELETE),
> // SPACE=(TRK,(10,10,40)),
> // DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)
>
> It's not possible this could cause contention, not even with a
> following step, certainly not with a sister-job. The RC=12 must be
> from something else.
I obviously explained it badly; I don't believe it's the ISPPROF dataset
that causes the problem or any dataset contention.
> I have seen the occasional "TBOPEN FAILED -- TABLE IN USE" and have
exactly!
> been unable to diagnose it. Dataset-conflict seems the most unlikely
> culprit.
What I think happens is that ISPF opens the tables in WRITE mode and
then TBSAVES them to the ISPPROF dataset. It is this that causes the
RC12 TABLE IN USE message. As you know, if you TBOPEN a table in WRITE
mode then no-one else can as well. Anyway, our joint experience is of
(rare) failure.
IEBCOPY of the system tables to a temporary dataset, defined as ISPTLIB
to batch TSO, eliminates the problem. More info. at my web site (below).
--
Mickey
mic...@home.com