TSO REXX calling SDSF when executed via OSF server returns wrong/incorrect data
search cancel

TSO REXX calling SDSF when executed via OSF server returns wrong/incorrect data

book

Article ID: 255827

calendar_today

Updated On:

Products

OPS/MVS Event Management & Automation

Issue/Introduction

We have a simple TSO/e REXX to extract CPU utilization from SDSF. But when executed via OPSOSF, the value returned is incorrect. I tried tracing the OSF execution and I see only 6 lines out of 160 in SDSF are being considered for CPU% calculation.

Environment

Release : 14.0

Cause

SDSF was defaulting to a specific owner so the DA command was not returning all lines. Setting the owner and prefix before calling SDSF solved this problem.

Resolution

Resetting the owner and prefix before calling SDSF solved this problem.

Sample code:

/* REXX */               
trace i                 
address TSO              
rc = isfCalls('ON')      
isfowner = '*'           
isfprefix = '*'          
address SDSF 'ISFEXEC DA'
cpu = 0                  
tot = jname.0            
say 'total tasks = 'tot  
do x = 1 to tot          
 say jname.x cpupr.x     
 cpu = cpupr.x + cpu     
end                      
say 'CPU is at 'cpu'%'   
exit