Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
Quote:
These values are getting substituted in the skel JCL. Hence trace is not hlpng me.
You already have the solution, from the learned (you have to get the emphasis correct on that one, think of courtroom dramas from the UK...) Mr Akatsukami. Next time you have a snippet you think you can't trace, copy it somewhere else where there is nothing else to interfere with it, and then trace it.
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
Priyanka Pyne wrote:
Thanks Akatsukami.
It is working fine now.
But I really didn't inderstood how it is working. If you can put some light on it then it it will be helpful.
As you will know, there are three ways of doing string concatenation in Rexx:
With an explicit concatenation operator. The result of
Code:
foo = "BAR"
foo = foo || "ABBAS"
say foo
is "BARABBAS".
By abutting the arguments. The result of
Code:
foo = "BAR"
foo = foo"ABBAS"
say foo
is also "BARABBAS".
By listing the arguments as rvalues (to the right of the assignment operator). The result of
Code:
foo = "BAR"
foo = foo "ABBAS"
say foo
is "BAR ABBAS". Note the infixed space; listing the arguments as rvalues implicitly concatenates a space between each one.
Now, look at your code snippet:
This is a concatenation of type 2, by abutting arguments; thus you expected no spaces in ORC. However, the MVS Rexx interpreter handles continued lines by concatenating the two lines and replacing the comma with a space. Thus, it reformatted your statement as
The use of an explicit concatenation operator overrides the other two means of concatenation (because when the interpreter find a concat operator, it discards any whitespace to either side), so it gives the desired result.
Hi
I tried using the above concatination technique, but still i am getting error as continuation line missing , i am using it in include condition as below:
Code:
PUSH " INCLUDE COND=("SKEY","LENGTH",CH,"R1",C"STNG"),AND,
("SKEY2",'L2",CH,"R2",C"STNG2")"
In above example i am taking the values of SKEY, LENGTH and all from the pannel and trying to apply search condition based on two conditions and after "AND" i want it to continue the line and take both serach criteria into account.
Can you please let me know how is it possible.
each line of a group must be properly terminated
looks like the first one is not...
when concatenating <strings> in a multiline statement it is wiser to use,
across the continuation the explicit concatenation operator
reread and meditate on the answers given and it will be easy to find the glitch
anyway the <string> was badly formatted
try with
Code:
say " INCLUDE COND=("SKEY","LENGTH",CH,"R1",C'"STNG"'),AND,("SKEY2","LENGTH2",CH,"R2",C'"STNG2"')"
and split on multiple lines according to the rules like
Code:
say " INCLUDE COND=("SKEY","LENGTH",CH,"R1",C'"STNG"'),AND,(" || ,
SKEY2","LENGTH2",CH,"R2",C'"STNG2"')"