Rexx Code continution on next line..



IBM's Command List programming language & Restructured Extended Executor

Rexx Code continution on next line..

Postby shiva7582 » Sat Feb 04, 2012 5:48 am

Hi Friends,
Can any one knows, which character can be used to continue the code in REXX langueage ....

Code:
000106 IF SUBSTR(DATA,6,3) = 'G1I' | SUBSTR(DATA,6,3) = 'G2I'
000107 SUBSTR(DATA,6,3) = 'GEE' | SUBSTR(DATA,6,4) = 'G1BV'
000108 SUBSTR(DATA,6,4) = 'G1YZ' THEN

here I want use 5 'substr' function in IF condition....

Please advice me.....
shiva7582
 
Posts: 8
Joined: Fri Feb 03, 2012 4:13 am
Has thanked: 0 time
Been thanked: 0 time

Re: Rexx Code continution on next line..

Postby Pedro » Sat Feb 04, 2012 6:19 am

Use a comma.
Pedro Vera
User avatar
Pedro
 
Posts: 684
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: Rexx Code continution on next line..

Postby NicC » Sat Feb 04, 2012 1:45 pm

Why not usde the manual? It is there to be used. All you had to do was look in the index for 'continuation'. That would have been much quicker than posting on the forum because not only would you need to type out your question, but before doing that, you would have had to search to see if the question had been raised before.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Rexx Code continution on next line..

Postby enrico-sorichetti » Sat Feb 04, 2012 1:52 pm

when asking these questions, usually the TS does not give a sith about researching,
he/she just hopes that some dummy ;) will reply with the right suggestions.

yep, even us sometimes suffer from a bit of laziness...
faster to write use a frigging comma than go thru the bookmarks and post the link to the manuals
and after posting a link somebody will certainly complain that the manual is not for the zOS version they use BTSTGTTS :geek:

... and googling for REXX CONTINUATION gave back only 213000 links
Last edited by enrico-sorichetti on Sat Feb 04, 2012 1:55 pm, edited 1 time in total.
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Rexx Code continution on next line..

Postby NicC » Sat Feb 04, 2012 1:55 pm

I rarely use the links - download a manual when I need it. Of course, I then need to keep it current! And I have loads of manuals that I have not read yet - most of the ABCs
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Rexx Code continution on next line..

Postby shiva7582 » Sat Feb 04, 2012 10:42 pm

Thanks Pedro....

Enrico,
Thanks for your remarks....... But I posted this quistion after reading the manual and i found also comma can be used for continuation of line...but it did not work and out put file showing empty....
Then I thought to find any other alternative for this....
Any way thanks to all for reply
.....
I think all my POSTs are frustrating Enrico....
Shivaji Patil
shiva7582
 
Posts: 8
Joined: Fri Feb 03, 2012 4:13 am
Has thanked: 0 time
Been thanked: 0 time

Re: Rexx Code continution on next line..

Postby enrico-sorichetti » Sat Feb 04, 2012 10:54 pm

... but it did not work and out put file showing empty....


please be more specific ...
the only situation where continuation is a bit murky is when concatenating strings using abuttal
REXX will always insert a blank when concatenating the variables in the continuation lines
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Rexx Code continution on next line..

Postby shiva7582 » Sat Feb 04, 2012 11:10 pm

******************************************************************
IF SUBSTR(DATA,6,3) = 'GEE' | SUBSTR(DATA,6,3) = 'G2I' ,
SUBSTR(DATA,6,3) = 'G1I' | SUBSTR(DATA,6,4) = 'G1BV' ,
SUBSTR(DATA,6,4) = 'G1YZ' THEN
SIGNAL AGECAL
*****************************************************************
This is the part of the rexx programe... where I want to check logonids which starts with GEE,G2I,G1I,G1bV & G1YZ characters...
When I use IF SUBSTR(DATA,6,3) = 'G1I' as first condition... I could find the logonids starts with G1I****, But for same check (IF SUBSTR(DATA,6,3) = 'G1I' ) if I use in next line.... I'm getting the empty result.
shiva7582
 
Posts: 8
Joined: Fri Feb 03, 2012 4:13 am
Has thanked: 0 time
Been thanked: 0 time

Re: Rexx Code continution on next line..

Postby BillyBoyo » Sat Feb 04, 2012 11:55 pm

IF SUBSTR(DATA,6,3) = 'GEE' | SUBSTR(DATA,6,3) = 'G2I' SUBSTR(DATA,6,3) = 'G1I' | SUBSTR(DATA,6,4) = 'G1BV' SUBSTR(DATA,6,4) = 'G1YZ' THEN                       
SIGNAL AGECAL                                           


If you forget about the continuations for the moment, take them out and you should get some idea about what is not working as an "if". Then fix, put them back in.

There are various way to make that code neater, mor understandable and more difficult to get wrong.

Edit: Running the code the Trace is always a good idea when you don't get what is happening. I think the "IF" would look very interesting in the Trace...
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Rexx Code continution on next line..

Postby enrico-sorichetti » Sun Feb 05, 2012 12:44 am

IF SUBSTR(DATA,6,3) = 'GEE' | SUBSTR(DATA,6,3) = 'G2I' ,
SUBSTR(DATA,6,3) = 'G1I' | SUBSTR(DATA,6,4) = 'G1BV' ,


if the code is as posted no wonder that it does not work ...
You forgot the logical OR | before/after the continuation
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Next

Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post