Page 1 of 1

Using ispf edit commands in JCL

PostPosted: Wed Dec 01, 2010 5:04 pm
by usuario24
Hi everyone!!

Could anyone help me to find how to use ispf edit commands in a JCL process?

I need to edit a dataset in an automatic process using this ISPF commands:

x all
f 'expression' all
del x all

Create a dataset with the result of the operation.

Is it possible? (Everything is posible, i know, but i don't know yet how to do it ;-))

Thanks a lot

Re: Using ispf edit commands in JCL

PostPosted: Wed Dec 01, 2010 5:48 pm
by MrSpock
- ISPF requires TSO, so you'll need to run TSO in batch (see the IKJEFT01 program). See Executing the terminal monitor program.

- With a TSO address space established, you'll need to invoke ISPF. See ISPF services in batch mode. Notice that you need to include all of the appropriate ISPF libraries for your job.

- With TSO and ISPF active, you'll need to invoke the ISPF Editor Service for your dataset. See EDIT--edit a data set. The ISPF Edit Process will need to call an ISPF Edit Macro. The macro will run those commands as you mentioned earlier. ISPF Edit Macros are described here.

Re: Using ispf edit commands in JCL

PostPosted: Wed Dec 01, 2010 10:31 pm
by prino
Using SORT with the correct control statements would quite likely be a far more appropriate solution...

Re: Using ispf edit commands in JCL

PostPosted: Wed Dec 01, 2010 10:33 pm
by MrSpock
prino wrote:Using SORT with the correct control statements would quite likely be a far more appropriate solution...


Exactly what I was thinking ... but, I figured there was an as-of-yet undisclosed reason for the OP to want to take this path ...