How to capture command output from TSO DRESTORE with REXX?
search cancel

How to capture command output from TSO DRESTORE with REXX?

book

Article ID: 189359

calendar_today

Updated On:

Products

Disk Backup and Restore - MVS DISK BACKUP AND RESTORE- ADD-ON OPTIO DISK BACKUP AND RESTORE

Issue/Introduction

Is there any possibility to capture messages from TSO DRESTORE command?
This is required for a user line command (REXX) from ISPF 3.4, which issues TSO DRESTORE.

When TSO DRESTORE is issued once:

ADSDM278 2401 DRESTORE REQUEST HAS BEEN SUCCESSFULLY QUEUED
ADSDM278 2401 DSNAME = data set name
ADSDM278 2401 DATA SET TO BE RESTORED WAS ARCHIVED ON 2020.106 AT 05:21
ADSDM278 2401 AND IS ON VOLSER vvvvv

When TSO DRESTORE is issued twice and more

ADSDM278 2400 ERROR - REQUEST TO RESTORE THIS DATA SET ALREADY EXISTS
ADSDM294 2405 REQUEST TO RESTORE DSNAME = data set name
ADSDM294 2405 HAS BEEN REJECTED.

These messages should be capture and processed in the REXX.
OUTTRRAP does not work and trying to capture SYSPRINT allocated to user session does not work either

Environment

Release : 12.5

Component : CA Disk Backup and Restore

Resolution

DRESTORE writes messages to MSGPRINT and not to SYSPRINT.
Allocating and reading MSGPRINT in the REXX solved the problem.