IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

get result from arithmetic operation with leading zeroes


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Julie Maquirang

New User


Joined: 07 Jan 2009
Posts: 20
Location: Philippines

PostPosted: Mon Mar 02, 2009 3:16 pm
Reply with quote

Hi,

Does anybody knows how to get result from arithmetic operation with leading zeroes

I am getting the current date with Julian date format
when I subtract 1 from my variable(julian date)

CDATE = 09061

CDATEB=CDATE-1

result:

CDATE=9060
Back to top
View user's profile Send private message
Julie Maquirang

New User


Joined: 07 Jan 2009
Posts: 20
Location: Philippines

PostPosted: Mon Mar 02, 2009 3:20 pm
Reply with quote

Correction:

result:

CDATEB=9060
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Mon Mar 02, 2009 3:29 pm
Reply with quote

Use the RIGHT function.
Code:
CDATEB = RIGHT((CDATE-1),5,'0')

Garry.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Mon Mar 02, 2009 3:36 pm
Reply with quote

Hi,

what happens when julian date is equal to 09001 ?


Gerry
Back to top
View user's profile Send private message
Julie Maquirang

New User


Joined: 07 Jan 2009
Posts: 20
Location: Philippines

PostPosted: Mon Mar 02, 2009 3:39 pm
Reply with quote

Hi Gerry,

Thanks!!
Back to top
View user's profile Send private message
Julie Maquirang

New User


Joined: 07 Jan 2009
Posts: 20
Location: Philippines

PostPosted: Mon Mar 02, 2009 3:40 pm
Reply with quote

I haven't tried yet... =)
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Keep leading zero(s) after convert fl... SYNCSORT 7
No new posts Remove leading zeroes SYNCSORT 4
No new posts leading spaces can be removed in trai... DFSORT/ICETOOL 1
No new posts first column truncated in search result IBM Tools 13
No new posts SDSF like solution in EJES (store com... All Other Mainframe Topics 4
Search our Forums:

Back to Top