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
 

 

get result from arithmetic operation with leading zeroes

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: get result from arithmetic operation with leading zeroes
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    Post subject: Reply to: get result from arithmetic operation with leading
Reply with quote

Correction:

result:

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

Active Member


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

PostPosted: Mon Mar 02, 2009 3:29 pm    Post subject:
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: 1703
Location: Australia

PostPosted: Mon Mar 02, 2009 3:36 pm    Post subject:
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    Post subject: Reply to: get result from arithmetic operation with leading
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    Post subject: Reply to: get result from arithmetic operation with leading
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts scheduling between OPC and TWS give u... nsbl IBM Tools 4 Sun Mar 12, 2017 5:35 pm
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 37 Tue Dec 06, 2016 8:04 pm
No new posts Joinkeys operation when key1 and key2... Susanta DFSORT/ICETOOL 5 Wed Nov 02, 2016 5:35 pm


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