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: 992
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 Performing arithmetic on input field zh_lad DFSORT/ICETOOL 31 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
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Joinkeys operation betwen VB and FB file Susanta SYNCSORT 4 Sun Sep 25, 2016 9:49 pm
This topic is locked: you cannot edit posts or make replies. How to run and see the result of DFH$... lind sh CICS 2 Wed Jul 27, 2016 7:04 pm


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