View previous topic :: View next topic
|
Author |
Message |
satish kanamarlapudi
New User
Joined: 23 Jul 2008 Posts: 29 Location: Little Rock - Arkansas
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
Back to top |
|
|
satish kanamarlapudi
New User
Joined: 23 Jul 2008 Posts: 29 Location: Little Rock - Arkansas
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
satish kanamarlapudi
New User
Joined: 23 Jul 2008 Posts: 29 Location: Little Rock - Arkansas
|
|
|
|
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 |
|
|
|