IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Converting a Julian date (yyddd) to YYMMDD


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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

Superior Member


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

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

Hi,

Check if this link helps you: 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
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: 6966
Location: porcelain throne

PostPosted: Fri Mar 27, 2009 3:08 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Mar 27, 2009 3:13 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Need help to append a date&tsp at... DFSORT/ICETOOL 9
Search our Forums:

Back to Top