ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

How to check PDS member existence using OPS/REXX?

book

Article ID: 186539

calendar_today

Updated On:

Products

OPS/MVS Event Management & Automation

Issue/Introduction

How to check if a member of a PDS dataset exists using OPS/REXX?

Environment

Release : 13.0

Component : OPS/MVS

Resolution

The OPSPDS function can be used to check if a member of a PDS exists.

Sample usage:

operation = 'EXISTS'              
pds = 'CAI.PPOPTION'   
member = 'XP41'                   
var = OPSPDS(operation,pds,member)
say var          

If var returns 16 it means the member does not exist.

Additional Information

https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-mainframe-software/automation/ca-ops-mvs-event-management-and-automation/13-0/reference-information/command-and-function-reference/ops-rexx-built-in-functions/opspds-function.html