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

Retrieve system date in COBOL


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

New User


Joined: 25 Oct 2007
Posts: 19
Location: hyderabad

PostPosted: Tue Jan 08, 2008 10:44 am
Reply with quote

hey can anyone tell me how do i retrieve SYSTEM DATE in my COBOL program...?
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Tue Jan 08, 2008 11:17 am
Reply with quote

Muhammad,

Use COBOL mnemonics.
Back to top
View user's profile Send private message
muhammad

New User


Joined: 25 Oct 2007
Posts: 19
Location: hyderabad

PostPosted: Tue Jan 08, 2008 11:21 am
Reply with quote

is there any command such as CURRENT DATE or something which can help me move date to my variable??
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Tue Jan 08, 2008 11:22 am
Reply with quote

Search manuals, you will find.
Back to top
View user's profile Send private message
ahalyah

New User


Joined: 13 Dec 2007
Posts: 25
Location: india

PostPosted: Tue Jan 08, 2008 12:18 pm
Reply with quote

Yes. Use as FUNCTION CURRENT DATE.
Back to top
View user's profile Send private message
muhammad

New User


Joined: 25 Oct 2007
Posts: 19
Location: hyderabad

PostPosted: Tue Jan 08, 2008 12:30 pm
Reply with quote

hey thanks,

its working well now...
Back to top
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Wed Jan 09, 2008 1:22 am
Reply with quote

The us of Function Current-Date returns a 21 byte date, you need to
look at the manual for the layout of this 21 bytes.
Back to top
View user's profile Send private message
pamireddy

New User


Joined: 01 Feb 2006
Posts: 1
Location: India

PostPosted: Fri Jan 11, 2008 8:50 pm
Reply with quote

WE CAN USE THE FOLLOWING COMMAND TO RETRIVE THE SYSTME DATE.

ACCEPT SYS-DATE FROM DATE.

NOTE: IN THE WORKING-STORAGE SECTION DEFINE

01 SYS-DATE PIC 9(6).
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 Replace each space in cobol string wi... COBOL Programming 3
No new posts Sysplex System won't IPL at DR site I... All Other Mainframe Topics 2
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
Search our Forums:

Back to Top