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
 
Converting a Julian date (yyddd) to YYMMDD

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
satish kanamarlapudi

New User


Joined: 23 Jul 2008
Posts: 29
Location: Little Rock - Arkansas

PostPosted: Fri Mar 27, 2009 2:33 pm    Post subject: Converting a Julian date (yyddd) to YYMMDD
Reply with quote

Hi,

My requirement is that currently we are calling a date routine which is coded in Assembler language which does date functions.

Now i want to code all of them into COBOL.

1) How to convert a date in YYDDD (only 5 digits) with no CC in it to format YYYYMMDD. If i have YYYYDDD (7 digits) it can be done using DATE-OF-INTEGER, INTEGER-OF-DAY functions. For 5 digits julian date the functions are not accpeting.

2) How to convert a date in YYMMDD to YYYYMMDD. In general it will work but

as i said above if i give input 99030 to assembler language it is giving
19990130, and as per my logic it is giving 20990130.

Its the same case for converting from YYMMDD also for (1999 Jan 1st) for exisitng assembler routine if i give 990101 is gives 19990101 but my routine is giving 20990101.

Satish
Back to top
View user's profile Send private message

Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Mar 27, 2009 2:47 pm    Post subject:
Reply with quote

Hi,

Check if this link helps you: http://www.ibmmainframes.com/viewtopic.php?t=38676&highlight=date
Back to top
View user's profile Send private message
satish kanamarlapudi

New User


Joined: 23 Jul 2008
Posts: 29
Location: Little Rock - Arkansas

PostPosted: Fri Mar 27, 2009 2:58 pm    Post subject: Reply to: Converting a Julian date (yyddd) to YYMMDD
Reply with quote

Hi Anuj,

Thx for the quik reply but here they are taking system date n doing the processing, but in my case i am just taking the input file date parameters n doing the processing. So here i dont want dates from system

So in tht case plz help me on how to proceed.

Thx,
Satish
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6970
Location: porcelain throne

PostPosted: Fri Mar 27, 2009 3:08 pm    Post subject:
Reply with quote

Satish,

your response indicates you should be in the rookie forum.

why can't you determine how to use the different functions when the source is other than the system.?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10374
Location: italy

PostPosted: Fri Mar 27, 2009 3:13 pm    Post subject: Reply to: Converting a Julian date (yyddd) to YYMMDD
Reply with quote

looks like You have issues with the sliding window

choose a year value YYLIM , for example 50

and for a yy value less than YYLIM the 4 digit year will be 20yy
for a yy vaue more than YYLIM ... it will be 19yy


ask Your support or look at the assembler routine to choose the right limit value
all depends on the application date processing
Back to top
View user's profile Send private message
satish kanamarlapudi

New User


Joined: 23 Jul 2008
Posts: 29
Location: Little Rock - Arkansas

PostPosted: Fri Mar 27, 2009 3:18 pm    Post subject: Reply to: Converting a Julian date (yyddd) to YYMMDD
Reply with quote

Thx enrico-sorichetti

tht is how i did it but with a small modification... i.e, taken limit b/w 70-99 as '19' n else as '20' in CC.
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fetching data from JHS as per the cur... arunsoods All Other Mainframe Topics 4 Wed Nov 22, 2017 1:54 pm
No new posts Date in where clause - Windows Karthikeyan Subbarayan DB2 9 Wed Nov 15, 2017 9:07 pm
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 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

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