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 - 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: 1461
Location: Azeroth

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: 102
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: 1461
Location: Azeroth

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 REXX compiled via RXTCOMP sergeyken CLIST & REXX 7 Tue Feb 07, 2017 9:41 pm
No new posts Fail to change physical VSAM filename... jacobdng CICS 7 Fri Jan 20, 2017 12:36 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm


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