Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 8500

TSO/ISPF :: RE: Edit large number of datasets (QSAM)

$
0
0
Author: Nic Clouston
Posted: Fri Apr 07, 2017 4:21 pm (GMT 5.5)

The macro is simple - here is an example:
Code:
/*--------------------------------------------------------------------*/
/* Edit Macro: forum.SPF                                              */
/* Function: Apply a CHANGE command and then EXIT the data set/member */
/*           being edited                                             */
/*--------------------------------------------------------------------*/
"ISREDIT macro"
"ISREDIT change 'abc' 'xyz' all"
"ISREDIT end"
Exit


The rexx is also simple:
Code:
/*- Rexx ------------------------------------------------------------*/
/*                                                                   */
/*  Sample program to read a list of data sets from a data set and   */
/*  then edit each dataset using a macro.                            */
/*                                                                   */
/*  This is written assuming that the program is to be run in batch  */
/*  with the input data set allocated in the JCL to ddname THELIST.  */
/*                                                                   */
/*  Being run in batch the appropriate ISPF libraries must be        */
/*  allocated in the JCL.                                            */
/*                                                                   */
/*  No error checking has been incorporated into this sample code.   */
/*                                                                   */
/*  Written by: Rexxcellent Software   Date: April 2017              */
/*                                                                   */
/*------------------------------------------------------------ Rexx -*/
Trace N
/* Read the list of data sets into stem dsn_list. */
EXECIO * DISKR thelist(stem dsn_list. finis)
/* dsn_list.0 has the count of lines read */

/* Now process the list one-by-one */
Do i = 1 to dsn_list.0

   Address ISPEXEC "edit "dsn_list.i" IMACRO(macroname)"

End

Exit


Note: these are examples only but the macro has been tested. The more difficult part may be the JCL! There is a recent example of the requirement in the Beginner's Forum.
_________________
Regards
Nic


Viewing all articles
Browse latest Browse all 8500

Trending Articles