Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
SDSF REXX - Console command with '

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

Global Moderator


Joined: 28 Aug 2007
Posts: 1522
Location: Chennai

PostPosted: Thu Feb 18, 2016 11:35 pm    Post subject: SDSF REXX - Console command with '
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 User


Joined: 01 Sep 2015
Posts: 170
Location: Switzerland

PostPosted: Fri Feb 19, 2016 6:50 pm    Post subject:
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: 1522
Location: Chennai

PostPosted: Fri Feb 19, 2016 11:19 pm    Post subject:
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    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 How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 47 Fri Sep 29, 2017 1:08 pm
No new posts MQ command in option 6 of ISPF! Vignesh Sid All Other Mainframe Topics 3 Tue Sep 26, 2017 6:01 pm
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us