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
 

 

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: 6966
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: 10231
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 How to pick only YYMMDD from DATE1P (... atulbaviskar SYNCSORT 7 Wed Mar 22, 2017 11:39 am
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm
No new posts Overlay the system date Danielle.Filteau SYNCSORT 4 Fri Mar 03, 2017 1:16 am
No new posts Checking Current date vickey_dw DFSORT/ICETOOL 1 Wed Feb 08, 2017 11:14 pm


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