IBM MAINFRAME HELP & SUPPORT FORUMS
Technical Forums for IBM Mainframe Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7&11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
 

Length of a variable - REXX

THIS IS AN ARCHIVE FORUM: CLICK HERE TO GO TO THE ORIGINAL TOPIC

 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> CLIST & REXX
View previous topic :: View next topic  
Author Message
sridevi_g



Joined: 15 Nov 2005
Posts: 4

Posted: Fri Nov 25, 2005 3:23 pm    Post subject: Length of a variable - REXX  

Hi,

Can you please let me know how to find the entire length of a variable.
For example., Assume X is of 10 digit long, but it contains only 5 digits then the command LENGTH(X) gives 5. But i am interested in knowing the entire length of the variable (i.e., I am interested in the command which will give the value as 10).

Regards,
Sri
Back to top  
jon_s_rice



Joined: 24 Mar 2005
Posts: 106
Location: Douglasville, GA USA

Posted: Sat Nov 26, 2005 3:24 am    Post subject:  

The function I beleve you are looking for is x = digits(). This will return the number of digits used in calculations.
Back to top  
mak_tcs



Joined: 23 Nov 2005
Posts: 76
Location: Minneapolis, MN USA

Posted: Mon Nov 28, 2005 11:15 am    Post subject: Re: Length of a variable - REXX  

Hi,

U shud have declared

numeric digits 5
x=12

now digits() will display value 5

Thanks,
Mani
Back to top  
 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> CLIST & REXX
Page 1 of 1
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM