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
 

 

can you explain the proc REVERSEIT briefly

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
senthilnathanj

New User


Joined: 31 Jul 2007
Posts: 47
Location: chennai

PostPosted: Tue Aug 03, 2010 12:28 pm    Post subject: can you explain the proc REVERSEIT briefly
Reply with quote

Hi Guys,
what is the output of the below code. Please explan briefly.
Code:
CALL REVERSEIT('PL/I');
(SUBSCRIPTRANGE,SIZE,STRINGSIZE);
 REVRESEIT:[b] PROC(31);[/b]
DCL (I,J) BIN FIXED(31);
DCL (S,T) CHAR(100) VARYING;
 T=S;
 J=0;
 DO I = LENGTH(S) TO 1;
       J = J + 1;
      SUBSTR(T,J,1) = SUBSTR(S,I,1);
 END;
PUT(T);
END;
Back to top
View user's profile Send private message

Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 992
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Tue Aug 03, 2010 1:09 pm    Post subject:
Reply with quote

Why don't you try it and see? Did you mean to have spelt REVRESEIT in line 3?

Garry.
Back to top
View user's profile Send private message
donateeye
Warnings : 2

New User


Joined: 01 Jun 2007
Posts: 62
Location: chennai

PostPosted: Mon Aug 09, 2010 1:11 pm    Post subject: Reply to: can you explain the proc REVERSEIT briefly
Reply with quote

Line 3: REVERSEIT OR REVRESEIT ??

In the DO loop, seems like you need step -1

rest its fine, i think you would get the reversed string...
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 -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts New PROC not reflecting in prod even ... Musab Ahmed CA Products 9 Tue Mar 15, 2016 12:45 pm
No new posts Can someone explain me this JCL line ... PeterHolland JCL & VSAM 9 Sat Dec 12, 2015 7:22 am
No new posts PROC to JCL mapping jena_samirkumar JCL & VSAM 13 Tue Dec 08, 2015 12:37 pm
No new posts JCL/job to PROC -- Symbolic to be use... Elixir JCL & VSAM 2 Thu Aug 20, 2015 2:56 am
No new posts Calling Stored Proc with out holding ... rexx77 DB2 6 Mon Nov 03, 2014 7:20 pm


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