View previous topic :: View next topic
|
Author |
Message |
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
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 |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 712 Location: Denmark
|
|
|
|
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 |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Thank you Sir, your solution works great! |
|
Back to top |
|
|
|