View previous topic :: View next topic
|
Author |
Message |
praveensinha Warnings : 1 New User
Joined: 02 Oct 2009 Posts: 64 Location: Hyd
|
|
|
|
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 |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
praveensinha,
Can you please try to point the line where you are trying to trap the output? |
|
Back to top |
|
|
praveensinha Warnings : 1 New User
Joined: 02 Oct 2009 Posts: 64 Location: Hyd
|
|
|
|
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 |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
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 |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
£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 |
|
|
praveensinha Warnings : 1 New User
Joined: 02 Oct 2009 Posts: 64 Location: Hyd
|
|
|
|
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 |
|
|
praveensinha Warnings : 1 New User
Joined: 02 Oct 2009 Posts: 64 Location: Hyd
|
|
|
|
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 |
|
|
praveensinha Warnings : 1 New User
Joined: 02 Oct 2009 Posts: 64 Location: Hyd
|
|
|
|
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 |
|
|
praveensinha Warnings : 1 New User
Joined: 02 Oct 2009 Posts: 64 Location: Hyd
|
|
|
|
sorry for caps |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
Trace the execution (using TRACE I or TRACE R) and post the results in Code tags. |
|
Back to top |
|
|
praveensinha Warnings : 1 New User
Joined: 02 Oct 2009 Posts: 64 Location: Hyd
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Highlight the text, click on the Code button. Use Preview to see what your post will look like. |
|
Back to top |
|
|
praveensinha Warnings : 1 New User
Joined: 02 Oct 2009 Posts: 64 Location: Hyd
|
|
|
|
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 |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
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 |
|
|
praveensinha Warnings : 1 New User
Joined: 02 Oct 2009 Posts: 64 Location: Hyd
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
and ... what is the content of the messages displayed ??? |
|
Back to top |
|
|
praveensinha Warnings : 1 New User
Joined: 02 Oct 2009 Posts: 64 Location: Hyd
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
Back to top |
|
|
|