Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Things I hoped never to see in a REXX program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
Author Message
Marso

Active User


Joined: 13 Mar 2006
Posts: 281
Location: Israel

PostPosted: Tue Apr 15, 2008 2:47 pm    Post subject: Things I hoped never to see in a REXX program
Reply with quote

"Before" shows what I found in somebody else REXX programs.
"After" shows what I used instead...

Code:
Len = Length(Output_Db2) + 1                   /* Before: */
To_L = 8 - Len + 1                                         
Output_Db2 = OVERLAY(' ',Output_Db2,Len,To_L)               
                                                           
Output_Db2 = Left(Output_Db2,8)                /* After:  */


Code:
Len = Length(MAX_DB2)                          /* Before: */
If Len = 1 Then                                             
   MAX_DB2 = '00'||MAX_DB2                                   
If Len = 2 Then                                             
   MAX_DB2 = '0'||MAX_DB2                                   
                                                             
MAX_DB2 = Right(MAX_DB2,3,'0')                 /* After:  */
Back to top
View user's profile Send private message
References
PostPosted: Tue Apr 15, 2008 2:47 pm    Post subject: Re: Things I hoped never to see in a REXX program Reply with quote

Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1