Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

SDSF rexx

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
praveensinha
Warnings : 1

New User


Joined: 02 Oct 2009
Posts: 64
Location: Hyd

PostPosted: Fri Apr 05, 2013 9:06 pm    Post subject: SDSF rexx
Reply with quote

I am trying to trap the output of hsend q cds through this rexx
/* REXX */


ISFRC = ISFCALLS( "ON" )
/* ISSUE THE COMMAND */

ADDRESS SDSF "ISFEXEC '/F HSM*,QUERY CDS' "
ISFDELAY=10
IF RC <> 0 THEN DO
SAY "RC" RC "RETURNED FROM ..."
END

/* DISPLAY THE USER LOG ASSOCIATED WITH THE ACTION */

SAY ISFULOG.0 "USER LOG LINES"
DO I = 1 TO ISFULOG.0
SAY ISFULOG.4
END

It is not capturing the output
Back to top
View user's profile Send private message

Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Fri Apr 05, 2013 9:11 pm    Post subject:
Reply with quote

praveensinha,

Can you please try to point the line where you are trying to trap the output?
Back to top
View user's profile Send private message
praveensinha
Warnings : 1

New User


Joined: 02 Oct 2009
Posts: 64
Location: Hyd

PostPosted: Fri Apr 05, 2013 9:14 pm    Post subject: Reply to: SDSF rexx
Reply with quote

SAY ISFULOG.0 "USER LOG LINES"
DO I = 1 TO ISFULOG.0
SAY ISFULOG.4
END

correct me if I am missing here
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Fri Apr 05, 2013 9:22 pm    Post subject:
Reply with quote

I am sorry I overlooked the post

What was the output of?

Code:
SAY ISFULOG.0 "USER LOG LINES"
DO I = 1 TO ISFULOG.0
SAY ISFULOG.4
END
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1713
Location: UK

PostPosted: Fri Apr 05, 2013 10:46 pm    Post subject:
Reply with quote

£Why are you looping around ISFULOG.0 times jsut to display what is in ISFULOG.4?
I also do not see why you doing an assignment between issuing the command and checking the return code from the command.
Another thing...I do not see why, after over 3 years on the board you still are not able to use the code tags when posting code.
Back to top
View user's profile Send private message
praveensinha
Warnings : 1

New User


Joined: 02 Oct 2009
Posts: 64
Location: Hyd

PostPosted: Fri Apr 05, 2013 11:23 pm    Post subject: Reply to: SDSF rexx
Reply with quote

WHEN I HAVE OPENED SDSF PANEL AND RUNNING THIS EXEC IN ANOTHER PANEL THEN IT IS PRINTING ONLY THIS

systemNAME 2013095 13:51:44.74 ISF031I CONSOLE userid ACTIVATED

AND IF OTHER SDSF PANEL IS OPENED THEN ALL THE DESIRED OUTPUT IS GETTING PRINTED
Back to top
View user's profile Send private message
praveensinha
Warnings : 1

New User


Joined: 02 Oct 2009
Posts: 64
Location: Hyd

PostPosted: Fri Apr 05, 2013 11:31 pm    Post subject: Reply to: SDSF rexx
Reply with quote

I AM NOT A ACTIVE MEMBER..SORRY FOR THAT LINE OF CODE..CORRECT CODE IS

SAY ISFULOG.0 "USER LOG LINES"
DO I = 1 TO ISFULOG.0
SAY ISFULOG.I
END
Back to top
View user's profile Send private message
praveensinha
Warnings : 1

New User


Joined: 02 Oct 2009
Posts: 64
Location: Hyd

PostPosted: Fri Apr 05, 2013 11:42 pm    Post subject: Reply to: SDSF rexx
Reply with quote

LET ME PUT IN ONE POST:

WHEN I HAVE OPENED SDSF PANEL AND RUNNING THIS EXEC IN ANOTHER PANEL THEN IT IS PRINTING ONLY THIS

systemNAME 2013095 13:51:44.74 ISF031I CONSOLE userid ACTIVATED

AND IF NO OTHER SDSF PANEL IS OPENED THEN ALL THE DESIRED OUTPUT IS GETTING PRINTED

THE CORRECT CODE IS
SAY ISFULOG.0 "USER LOG LINES"
DO I = 1 TO ISFULOG.0
SAY ISFULOG.I
END

AND WHEN I AM RUNNING THIS REXX THROUGH BATCH USING THIS IKJEFT01 THEN I AM GETTING RC=8
Back to top
View user's profile Send private message
praveensinha
Warnings : 1

New User


Joined: 02 Oct 2009
Posts: 64
Location: Hyd

PostPosted: Fri Apr 05, 2013 11:48 pm    Post subject: Reply to: SDSF rexx
Reply with quote

sorry for caps
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Sat Apr 06, 2013 12:13 am    Post subject:
Reply with quote

Trace the execution (using TRACE I or TRACE R) and post the results in Code tags.
Back to top
View user's profile Send private message
praveensinha
Warnings : 1

New User


Joined: 02 Oct 2009
Posts: 64
Location: Hyd

PostPosted: Sat Apr 06, 2013 12:44 am    Post subject: Reply to: SDSF rexx
Reply with quote

I ran the rexx code through batch (IKJEFT01) I am getting returns code 8..Suggested to use trace to here is the output.
Sorry I am not sure how to use code tags here ..

Code:
 6 *-* /* ISSUE THE COMMAND */                                   
     8 *-* ADDRESS SDSF "ISFEXEC '/F HSM*,QUERY CDS'"               
       >L>   "ISFEXEC '/F HSM*,QUERY CDS'"                           
       +++ RC(8) +++                                                 
     9 *-* IF RC <> 0                                               
       >V>   "8"                                                     
       >L>   "0"                                                     
       >O>   "1"                                                     
       *-*  THEN                                                     
       *-*  DO                                                       
    10 *-*   SAY "RC" RC "RETURNED FROM ..."                         
       >L>     "RC"                                                 
       >V>     "8"                                                   
       >O>     "RC 8"                                               
       >L>     "RETURNED FROM ..."                                   
       >O>     "RC 8 RETURNED FROM ..."                             
RC 8 RETURNED FROM ...                                                   
    11 *-*  END                                                           
    13 *-*  /* DISPLAY THE USER LOG ASSOCIATED WITH THE ACTION */         
    15 *-* SAY ISFULOG.0 "USER LOG LINES"                                 
       >V>   "0"                                                         
       >L>   "USER LOG LINES"                                             
       >O>   "0 USER LOG LINES"                                           
0 USER LOG LINES                                                         
    16 *-* DO I = 1 TO ISFULOG.0                                         
       >L>   "1"                                                         
       >V>   "0"   
READY                                                                     
END


Code'd
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7225

PostPosted: Sat Apr 06, 2013 12:58 am    Post subject: Reply to: SDSF rexx
Reply with quote

Highlight the text, click on the Code button. Use Preview to see what your post will look like.
Back to top
View user's profile Send private message
praveensinha
Warnings : 1

New User


Joined: 02 Oct 2009
Posts: 64
Location: Hyd

PostPosted: Sat Apr 06, 2013 1:04 am    Post subject: Reply to: SDSF rexx
Reply with quote

Similar code I am running as stand alone as typing EX in front of rexx exec then it is giving desired output .

How to make it correctly in Batch
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Sat Apr 06, 2013 2:05 am    Post subject: Re: Reply to: SDSF rexx
Reply with quote

praveensinha wrote:
I ran the rexx code through batch (IKJEFT01) I am getting returns code 8..Suggested to use trace to here is the output.
Sorry I am not sure how to use code tags here ..

Code:
 6 *-* /* ISSUE THE COMMAND */                                   
     8 *-* ADDRESS SDSF "ISFEXEC '/F HSM*,QUERY CDS'"               
       >L>   "ISFEXEC '/F HSM*,QUERY CDS'"                           
       +++ RC(8) +++                                                 
     9 *-* IF RC <> 0                                               
       >V>   "8"                                                     
       >L>   "0"                                                     
       >O>   "1"                                                     
       *-*  THEN                                                     
       *-*  DO                                                       
    10 *-*   SAY "RC" RC "RETURNED FROM ..."                         
       >L>     "RC"                                                 
       >V>     "8"                                                   
       >O>     "RC 8"                                               
       >L>     "RETURNED FROM ..."                                   
       >O>     "RC 8 RETURNED FROM ..."                             
RC 8 RETURNED FROM ...                                                   
    11 *-*  END                                                           
    13 *-*  /* DISPLAY THE USER LOG ASSOCIATED WITH THE ACTION */         
    15 *-* SAY ISFULOG.0 "USER LOG LINES"                                 
       >V>   "0"                                                         
       >L>   "USER LOG LINES"                                             
       >O>   "0 USER LOG LINES"                                           
0 USER LOG LINES                                                         
    16 *-* DO I = 1 TO ISFULOG.0                                         
       >L>   "1"                                                         
       >V>   "0"   
READY                                                                     
END

Well, as Dr. Sorichetti indicated, your SDSF knowledge does not inspire confidence. Modify your script as follows:
Code:
ADDRESS SDSF "ISFEXEC '/F HSM*,QUERY CDS'"               
IF (RC <> 0) THEN
DO
  say "Return code" rc "from ISFEXEC"
  say "Short message is: " isfmsg
  say "Long message is:"
  do i = 1 to isfmsg2.0
    say "   " isfmsg2.i
  end
END
Back to top
View user's profile Send private message
praveensinha
Warnings : 1

New User


Joined: 02 Oct 2009
Posts: 64
Location: Hyd

PostPosted: Sat Apr 06, 2013 3:05 am    Post subject: Reply to: SDSF rexx
Reply with quote

Yes I am new to SDSF rexx

Code:

   /* REXX */                                                         
   /* LOAD THE SDSF ENVIRONMENT AND ABORT ON FAILURE */               
                                                                     
   ISFRC = ISFCALLS( "ON" )                                           
                                                                     
   /* ISSUE THE COMMAND */                                           
                                                                     
   ADDRESS SDSF "ISFEXEC '/F HSM*,QUERY CDS'"                         
   IF RC <> 0 THEN DO                                                 
   SAY "RETURN CODE" RC "FROM ISFEXEC"                               
     SAY "SHORT MESSAGE IS: " ISFMSG                                 
     SAY "LONG MESSAGE IS:"                                           
     DO I = 1 TO ISFMSG2.0                                           
       SAY "   " ISFMSG2.I                                           
     END                                                             
   END                                                               
   /* DISPLAY THE USER LOG ASSOCIATED WITH THE ACTION */     
                                                             
   SAY ISFULOG.0 "USER LOG LINES"                             
   DO I = 1 TO ISFULOG.0                                     
   SAY ISFULOG.I                                             
   END                                                       


As suggested I modified the REXX code and ran .
1.When type ex in front this exec ,it gives me correct output .

2.When I am trying to run this same exec in batch via (IKJEFT01) ,I am not getting any output.It is giving me cc=8 as mentioned earlier .

Please suggest to fix this issue
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Sat Apr 06, 2013 3:26 am    Post subject: Reply to: SDSF rexx
Reply with quote

and ... what is the content of the messages displayed ???
Back to top
View user's profile Send private message
praveensinha
Warnings : 1

New User


Joined: 02 Oct 2009
Posts: 64
Location: Hyd

PostPosted: Sat Apr 06, 2013 3:35 am    Post subject: Reply to: SDSF rexx
Reply with quote

1.When I type EX in front of exec ,I get the output same when we pass HSEnd q cds
Code:

54 USER LOG LINES                                                             
SYSTEMname     2013095  17:58:41.07             ISF031I CONSOLE A135IP4 ACTIVATED   
system name     2013095  17:58:41.07            -F HSM*,QUERY CDS                   
system name     2013095  17:58:41.07  STC12846   ARC0101I QUERY CONTROLDATASETS COMMA ND STARTING ON                                                                 
                                            ARC0101I (CONT.) HOST=A             
 ACUA      2013095  17:58:41.07  STC12846   ARC0947I CDS SERIALIZATION TECHNIQUE
  IS ENQUEUE                                                                   
 ACUA      2013095  17:58:41.08  STC12846   ARC0148I MCDS TOTAL SPACE=6131520 K-
 BYTES, CURRENTLY                                                               
                                            ARC0148I (CONT.) ABOUT 79% FULL, WAR
 NING THRESHOLD=85%, TOTAL                                                     
                                            ARC0148I (CONT.) FREESPACE=36%, EA=Y
 ES, CANDIDATE VOLUMES=0                                                       
 ACUA      2013095  17:58:41.08  STC12846   ARC0948I MCDS INDEX TOTAL SPACE=8613
  K-BYTES,                                                                     
                                            ARC0948I (CONT.) CURRENTLY ABOUT 81%
  FULL, WARNING THRESHOLD=85%, 


2 When I run the same exec via batch I am getting following msg

Code:

READY                                                                       
%SDSFCMD                                                                   
RETURN CODE 8 FROM ISFEXEC                                                 
SHORT MESSAGE IS:  NOT AUTHORIZED FOR CMD                                   
LONG MESSAGE IS:                                                           
    ISF745E Error processing '/+' command, reason: NOT AUTHORIZED FOR CMD. 
    ISF766I Request completed, status: NOT AUTHORIZED FOR CMD.             
0 USER LOG LINES                                                           
READY                                                                       
END   


It says not authorized for command but I ran with highest level of access.If at all it is access issue then why it is able to run by typing EX in front of that exec..May be I am missing something points
Please guide
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Sat Apr 06, 2013 9:23 am    Post subject: Reply to: SDSF rexx
Reply with quote

Quote:
It says not authorized for command but I ran with highest level of access.If at all it is access issue then why it is able to run by typing EX in front of that exec..May be I am missing something points


well, that' s what You think, but unfortunately that' s not how sdsf works for BATCH

it' s all explained in the SDSF manual
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ISF4CS80/CCONTENTS?SHELF=ISF4BK80&DN=SA22-7670-11&DT=20080605143940
here
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ISF4CS80/11.4?SHELF=ISF4BK80&DT=20080605143940

speak to Your support, so that they may ( if allowed by security support ) customize the authorizations for batch
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
This topic is locked: you cannot edit posts or make replies. Need to code a Rexx PGM sundaram.naveen CLIST & REXX 18 Thu Oct 06, 2016 6:45 pm
No new posts SDSF Command Avtrix CLIST & REXX 4 Fri Sep 30, 2016 11:13 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us