Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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

Senior Member


Joined: 08 May 2006
Posts: 1004
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 Utility for search operation Gopalakrishna551 TSO/ISPF 11 Wed Jan 03, 2018 11:07 am
No new posts Squeeze record left so that zeroes ar... Vignesh Sid SYNCSORT 5 Fri Nov 10, 2017 1:40 pm
No new posts Remove leading spaces from numeric field rexx77 SYNCSORT 6 Wed Sep 06, 2017 2:15 am
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

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us