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
 
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: 1235
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: 1235
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: 1848
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 How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts LISTIDR compiled date/time jerryte IBM Tools 3 Thu Apr 20, 2017 7:37 pm
No new posts SUBSTR for Date functions Shaheen Shaik DB2 4 Thu Apr 06, 2017 2:14 pm
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm


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