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: 1445
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

New User


Joined: 01 Sep 2015
Posts: 94
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: 1445
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 What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
No new posts How to display value of an exit param... lind sh CICS 2 Sun Oct 09, 2016 12:28 pm
This topic is locked: you cannot edit posts or make replies. Need to code a Rexx PGM sundaram.naveen CLIST & REXX 18 Thu Oct 06, 2016 6:45 pm


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