i'm quite new to programming with REXX. I'd like to write a program that will show a task from DA with the biggest CPU usage on the LPAR. Thanks in advance
000001 /* rexx */
000002 RC=ISFCALLS('ON')
000003 isfcols = "JNAME CPUPR JTYPE"
000004 /*Access the DA panel */
000005 ADDRESS SDSF "ISFEXEC DA"
000006 IF RC<>0 THEN
000007 EXIT RC
000008 /* GET FIXED FIELD NAME FROM FIRST WORD */
000009 /*OF ISFCOLS SPECIAL VARIABLE */
000010 fixedField = word(isfcols,1)
000011 Say "Number of rows returned:" isfrows
000012 /* Process all rows */
000013 do ix=1 to isfrows
000014 Say "Now processing job:" value(fixedField"."ix)
000015 /* List all columns for row */
000016 do jx=1 to words(isfcols)
000017 col = word(isfcols,jx)
000018 say " Column" col"."ix "has the value:" value(col"."ix)
000019 end
000020 end
000021 rc=isfcalls('OFF')
I'm not sure if I started correctly, I'm reviewing Redbook to find some answers, but it's a little bit rough. Could someone advice me on that? I managed to specify colums which I would like to see, but still can't get to the point where it will return me only the task with highest CPU. I assume that I have to specify sth on line 13 just to search highest number