HOW TO PROVIDE MULTIPLE INPUT COMMANDS USING REXX API

Document ID : KB000049925
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

How can I provide multiple INPUT commands via the Rexx API? I have only been able to get one input command to work and need more than one. I'm trying to issue command 'COPYOUTP' followed by inputs for dataset specifications for DSN, member, space, lrecl, etc.

Solution:

Below sample to fill up multiple entries using sysview rexx api

/* REXX */   
ADDRESS TSO   
TRACE   
ADDRESS 'LINK' 'GSVXRXAA'   
ADDRESS SYSVIEWE "C(LISTHELD =)"   
ADDRESS SYSVIEWE "C(LINECMD L 1)"   
ADDRESS SYSVIEWE "C(SELECT DDNAME EQ JESMSGLG)"   
ADDRESS SYSVIEWE "C(SET PRIMARY 7)"   
ADDRESS SYSVIEWE "C(SET COPYDSN PUBLIC.DATASET)"   
ADDRESS SYSVIEWE "INPUT(CMD,COD)"   
ADDRESS SYSVIEWE ,   
"C(TYPE TAB 3 ERE DATA 'SYSOUT2' TAB 3 ERE DATA '5' ENTER)"   
ADDRESS SYSVIEWE "C(END)"   
ADDRESS TSO   
DROPBUF   
EXIT(0)