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
 
Julian Date and year

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> FAQ & Off Topics
View previous topic :: :: View next topic  
Author Message
Suganya87

New User


Joined: 09 May 2016
Posts: 12
Location: India

PostPosted: Wed Aug 17, 2016 6:22 pm    Post subject: Julian Date and year
Reply with quote

Hi ,

I need ( Year + Today's Julian date ) for an example if Julian date of today is 230 then I need 2016230 as my output.

I Tried Julian_Day but it gave integer value from 1472 B.C .

Can anyone tel me how to achieve this.
Back to top
View user's profile Send private message

Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1243
Location: Israel

PostPosted: Wed Aug 17, 2016 6:55 pm    Post subject: Reply to: Julian Date and year
Reply with quote

Here is one possibility:
Code:
COMPUTE INTEGER-DATE = FUNCTION INTEGER-OF-DATE (DATE-YYYYMMDD)
COMPUTE JULIAN-DATE  = FUNCTION DAY-OF-INTEGER (INTEGER-DATE)

Shorter version:
Code:
COMPUTE JULIAN-DATE  = FUNCTION                             
    DAY-OF-INTEGER ( FUNCTION INTEGER-OF-DATE(DATE-YYYYMMDD) )
Back to top
View user's profile Send private message
Suganya87

New User


Joined: 09 May 2016
Posts: 12
Location: India

PostPosted: Wed Aug 17, 2016 7:01 pm    Post subject:
Reply with quote

Hi Marso,

Sorry I need in SQL format , not cobol code.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1243
Location: Israel

PostPosted: Wed Aug 17, 2016 7:25 pm    Post subject:
Reply with quote

Grrrrrrrrr
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1894
Location: UK

PostPosted: Wed Aug 17, 2016 7:38 pm    Post subject:
Reply with quote

Then why post in the COBOL programming section and not the DB2 section? Locking.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> FAQ & Off Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm
No new posts Fetch Previous month & year in MM... girishb2 DFSORT/ICETOOL 3 Thu Sep 21, 2017 9:54 pm
No new posts Validate the Date girishb2 DFSORT/ICETOOL 9 Tue Sep 19, 2017 1:12 am
No new posts Julian Date to CICS ABSTTIME blayek CICS 3 Wed Aug 30, 2017 11:15 pm
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm

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