SDSF REXX - NO Displayable data.



IBM's Command List programming language & Restructured Extended Executor

SDSF REXX - NO Displayable data.

Postby Viswanathchandru » Wed Nov 13, 2013 4:29 am

Dear all,

I'm trying to xdc output of a job through sdsf rexx. But unfortunately the ISFACT ST part ends with RC +8. When I added ISFMSG I got to know the reason as "NO DISPLAYABLE DATA". I tried to add the command "ISFEXEC INPUT ON" in the begining of my rexx but ended with
ISF745E Error processing 'INPUT ON' command, reason: NOT VALID WHEN REXX.
ISF766I Request completed, status: NOT VALID WHEN REXX.                 


Can anyone help me to turn on the Input so that i can xdc the data. Any pointers will be helpful.


Thanks,
Viswa..
Viswanathchandru
 
Posts: 271
Joined: Mon Oct 25, 2010 2:24 pm
Has thanked: 25 times
Been thanked: 0 time

Re: SDSF REXX - NO Displayable data.

Postby Pedro » Wed Nov 13, 2013 10:49 pm

Can you show us your rexx program, without the use of 'INPUT ON'?
Pedro Vera
User avatar
Pedro
 
Posts: 686
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: SDSF REXX - NO Displayable data.

Postby Pedro » Thu Nov 14, 2013 12:21 am

This works for me. In this example, you need to pass in the job number.
/* rexx */                                                       
parse arg jobnum                                                 
rc=isfcalls( ON )                                                 
ISFFILTER = 'JOBID EQ 'jobnum                                     
Address SDSF                                                     
"ISFEXEC ST"                                                     
If token.0 > 0 Then                                               
  Do                                                             
    /* save job output to a data set                           */
    xdc#  = "XDC"||right('00000'random(0,99999),5)               
    ISFPRTDSNAME = xdc# || ".LIST"                               
    ISFPRTDISP   = "NEW"                                         
    "ISFACT ST TOKEN('"token.1"')  parm(NP XDC)"                 
                                                                 
    If sysdsn(ISFPRTDSNAME) = "OK" Then                           
      Do                                                         
        /* view the job output data set                        */
        Address TSO ,                                             
        "ALLOCATE FILE("xdc#") DSN("ISFPRTDSNAME") OLD REUSE"     
                                                                 
        Address ISPEXEC ;                                         
        "LMINIT DATAID(DATAID) DDNAME("xdc#")"                   
        "VIEW DATAID("dataid")"                                   
        "LMFREE DATAID("dataid")"                                 
        Address TSO "FREE F("xdc#")"                             
      End                                                         
  End                                                             
Else                                                             
  Say 'No rows in ST list'                                       
Return                                                           
Pedro Vera
User avatar
Pedro
 
Posts: 686
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: SDSF REXX - NO Displayable data.

Postby Steve Coalbran » Sat Nov 23, 2013 7:44 pm

Many thanks Pedro, I have never worked with mode ADDRESS SDSF before, or hardly and not successfully.
This is a great example to get one going.
I cut it out and changed most things that I could to fit in with my own codepage and standards (# is not a valid char and | is ! in CP 1143).
Here attached it my version of the exec which is passed a JOB(/JES) number "JOBn..." as an argument. It does some basic validation and then traps the output, as I say, all based on your example! 8-)
/*REXX*/ TRACE "O"
PARSE ARG jes
re = ", correct it and try again."
PARSE VAR jes 1 job 4 nnn 9 res
IF res<>"" THEN CALL SAYMSG 1,"INVALID JOB NUMBER",,
   "Job number" jes "is too long"re
ELSE NOP
IF job<>"JOB" THEN CALL SAYMSG 1,"INVALID JOB NUMBER",,
   "Job number" jes "should be of the form JOBnnnnn"re 1
ELSE NOP
IF DATATYPE(nnn,"N")=0 THEN CALL SAYMSG 1,"INVALID JOB NUMBER",,
   "Job number" jes "should be of the form JOBnnnnn"re 2
ELSE NOP
IF LENGTH(nnn)<>5 THEN jes = "JOB"RIGHT(nnn,5,0)
ELSE NOP
RC = ISFCALLS("ON")
ADDRESS SDSF
isffilter = 'JOBID EQ 'jes
"ISFEXEC ST"
IF( token.0>0 )THEN CALL GRABJOB

ELSE CALL SAYMSG 0,"NO ROWS FOUND",,
                   "No rows found in SDSF for JOBID("jes")."
EXIT /*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/

/*===================================================================*/
/* save job output TO a data set                                     */
/*===================================================================*/
GRABJOB:
isfprtddname = "XDC"!!RIGHT('00000'RANDOM(0,99999),5)
isfprtdsname = isfprtddname !! ".LIST"
isfprtdisp   = "NEW"
"ISFACT ST TOKEN('"token.1"') PARM(NP XDC)"
IF( SYSDSN(isfprtdsname)="OK" )THEN DO
   /*----------------------------------------------------------------*/
   /* view the job output data set                                   */
   /*----------------------------------------------------------------*/
   ADDRESS TSO "ALLOC DD("isfprtddname")",
                     "DS("isfprtdsname") OLD REUSE"
   ADDRESS TSO "EXECIO * DISKR" isfprtddname "(STEM ISF. FINIS "
   jn = "?UNKNOWN"
   DO i = 11 TO 12
      PARSE VAR isf.i . 10 ln 12 ss 14 jn qjw . 3 stm 20 .
      IF( ln qjw = "1 JOB" ,
        ! stm="STMT NO. MESSAGE" )THEN LEAVE
      ELSE NOP
   END
   jj = jn"("jes")"
   ADDRESS ISPEXEC "LMINIT DATAID(DATAID) DDNAME("isfprtddname")"
   CALL SAYMSG 0,isf.0 "ROWS FOUND",,
                 isf.0 "rows found in SDSF for job" jj"."
   ADDRESS ISPEXEC "VIEW DATAID("dataid")"
   ADDRESS ISPEXEC "LMFREE DATAID("dataid")"
   ADDRESS TSO     "FREE DD("isfprtddname")"
   CALL SAYMSG 0,isf.0 "ROWS FOUND",,
                 isf.0 "rows found in SDSF for job" jj"."
   END
ELSE NOP
RETURN /*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/

/*===================================================================*/
/* say a message and exit if code non-zero                           */
/*===================================================================*/
SAYMSG:
PARSE ARG cc,zerrsm,zerrlm
PARSE VALUE "NONE YES" WITH zerrhm zerralrm
ADDRESS ISPEXEC "SETMSG MSG(ISRZ003)"
IF( cc<>0 )THEN EXIT 1
ELSE RETURN /*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
:D
Steve
User avatar
Steve Coalbran
 
Posts: 138
Joined: Wed Apr 06, 2011 11:49 am
Location: Stockholm, Sweden
Has thanked: 13 times
Been thanked: 1 time

Re: SDSF REXX - NO Displayable data.

Postby Pedro » Mon Nov 25, 2013 10:07 pm

Many thanks Pedro

I am glad I could help.
Pedro Vera
User avatar
Pedro
 
Posts: 686
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post