Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref

Author Message
Julie Maquirang

New User

Joined: 07 Jan 2009
Posts: 20
Location: Philippines

 Posted: Mon Mar 02, 2009 3:16 pm    Post subject: get result from arithmetic operation with leading zeroes 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

Julie Maquirang

New User

Joined: 07 Jan 2009
Posts: 20
Location: Philippines

 Posted: Mon Mar 02, 2009 3:20 pm    Post subject: Reply to: get result from arithmetic operation with leading Correction: result: CDATEB=9060
Garry Carroll

Senior Member

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

Posted: Mon Mar 02, 2009 3:29 pm    Post subject:

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

Garry.
gcicchet

Senior Member

Joined: 28 Jul 2006
Posts: 1703
Location: Australia

 Posted: Mon Mar 02, 2009 3:36 pm    Post subject: Hi, what happens when julian date is equal to 09001 ? Gerry
Julie Maquirang

New User

Joined: 07 Jan 2009
Posts: 20
Location: Philippines

 Posted: Mon Mar 02, 2009 3:39 pm    Post subject: Reply to: get result from arithmetic operation with leading Hi Gerry, Thanks!!
Julie Maquirang

New User

Joined: 07 Jan 2009
Posts: 20
Location: Philippines

 Posted: Mon Mar 02, 2009 3:40 pm    Post subject: Reply to: get result from arithmetic operation with leading I haven't tried yet... =)
 All times are GMT + 6 Hours
 Page 1 of 1

Search our Forum:

 Topic Author Forum Replies Posted Similar Topics Utility for search operation Gopalakrishna551 TSO/ISPF 11 Wed Jan 03, 2018 11:07 am Squeeze record left so that zeroes ar... Vignesh Sid SYNCSORT 5 Fri Nov 10, 2017 1:40 pm Remove leading spaces from numeric field rexx77 SYNCSORT 6 Wed Sep 06, 2017 2:15 am Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm

 © 2003-2017 IBM MAINFRAME Software Support Division
 Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us