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

convert mmddyy to mmddyyyy


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
pravatsahu

New User


Joined: 07 Jan 2010
Posts: 1
Location: chennai

PostPosted: Wed Feb 03, 2010 7:03 pm
Reply with quote

how to convert mmddyy to mmddyyyy
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Feb 03, 2010 7:08 pm
Reply with quote

Click on the manuals link at the top of the page, find the COBOL Language Reference and Programming Guide manuals, and read up on date formats and MOVE statements until you can do it yourself.

Furthermore, you didn't specify anywhere near enough information to get realistic answers. If all the dates are this century, just add the digits 20 to the right place. If not, what are the rules -- what's the lowest date you'll see, for example?
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Thu Feb 04, 2010 2:17 pm
Reply with quote

Hi !

InnDate = mmddyy
OutDate = mmddhhyy

IF InDate_JJ GT '60' MOVE '19' to OutDate_HH
ELSE MOVE '20' to OutDate_HH
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Feb 04, 2010 8:08 pm
Reply with quote

Hello,

Well, a possibility, but what about people born before 1960 (which is most of the "seniors" here icon_smile.gif )?

Hopefully the organization has rules about how to convert dates. . .
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Thu Feb 04, 2010 9:00 pm
Reply with quote

dick scherrer wrote:
Hello,

Well, a possibility, but what about people born before 1960 (which is most of the "seniors" here icon_smile.gif )?

Hopefully the organization has rules about how to convert dates. . .


Sometimes i feel like im still in "the dark ages", reading (or try to undertsand) the questions here.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Thu Feb 04, 2010 9:29 pm
Reply with quote

Language Environment offers Callable Service routines to query (and save if you'd like) the current default century (CEEQCEN) and alter this default century (CEESCEN) to the value of your choosing. You would then need to use the Callable Service routines that convert MMDDYY to MMDDYYYY format.

The default century window for Language Environment is set to start 80 years before the current system date.

If you choose to use this functionality, this is all documented in the LE manuals for your review.

Just another choice....

Bill
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 Populate last day of the Month in MMD... SYNCSORT 2
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Keep leading zero(s) after convert fl... SYNCSORT 7
No new posts Convert single row multi cols to sing... DFSORT/ICETOOL 6
No new posts convert file from VB to FB and use tr... DFSORT/ICETOOL 8
Search our Forums:

Back to Top