IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SDSF REXX - Console command with '


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Thu Feb 18, 2016 11:35 pm
Reply with quote

Hi,
I am trying to execute a JES command via REXX.
Code:
cmd = "/D U,TAPE,ONLINE"
Address SDSF "isfexec '" || cmd || "' "

This works fine when the JES command does not contain any " or '

Now when I am trying to issue the below command which has '
Code:
cmd = "/$T A,T=12.45,'$AJ58747'"
Address SDSF "isfexec '" || cmd || "' "


The ULOG says
Code:
"$HASP650 $AJ58747'   INVALID OPERAND OR MISPLACED OPERAND"


The ' on isfexec is being terminated earlier by the ' on the command.
Could you please let me know how to correct this.

I changed the "s with 's. It comes up with the below error
Code:
ISF302E """ was seen in command position 9 where one of the following was expec
ted: /, QUOTED-STRING, UNQUOTED-STRING.


The complete code: Courtesy Enrico
Code:
/*REXX*/

TRACE "A"
Parse Source _sys _how _cmd .
parse arg args
IsfRC = isfcalls("ON")
 if IsfRC ¬= 0 then do
    say "isfcalls RC" IsfRC
     exit
 end

 cmd = "/D U,TAPE,ONLINE"
 Address SDSF "isfexec '" || cmd || "' "
 if RC ¬= 0 then do
     say "isfexec  RC" RC
     say isfmsg
     do  im = 1 to isfmsg2.0
         say isfmsg2.im
     end
     exit
 end
 say 'isfulog.0=' isfulog.0
 do il = 1 to isfulog.0
     say right(il,1) isfulog.il
 end
 call  isfcalls "OFF"
 exit


Regards,
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Fri Feb 19, 2016 6:50 pm
Reply with quote

as usually, double quotes inside a quoted string.
Code:
cmd = "/$TA,T=12.45,''$AJ58747''"
Address SDSF "isfexec '"cmd"'"

seems to work

Coded - and it makes the various apostrophes/quotes clearer!
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Fri Feb 19, 2016 11:19 pm
Reply with quote

Thank you Sir, your solution works great!
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top