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

How to display the system date and time in the map


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sindhu_raghu
Currently Banned

New User


Joined: 18 Mar 2009
Posts: 7
Location: trichy

PostPosted: Thu Mar 19, 2009 6:09 pm
Reply with quote

how to display the system date and time in the map initially when the application program is cobol?
Back to top
View user's profile Send private message
muthuvel

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Canada

PostPosted: Thu Mar 19, 2009 6:11 pm
Reply with quote

Allocate a field for it in the MAPSCREEN and in the program use ASKTIME to get current time and date.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Mar 19, 2009 6:18 pm
Reply with quote

what is wrong with using eibdate and eibtime?
they are already populated.
why incur the extra cpu resource for an asktime and format?
Back to top
View user's profile Send private message
sindhu_raghu
Currently Banned

New User


Joined: 18 Mar 2009
Posts: 7
Location: trichy

PostPosted: Thu Mar 19, 2009 6:20 pm
Reply with quote

i have used eibdate and eidtime but i cant interpret the date format
i want the date to be displayed in standard format
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 Mar 19, 2009 6:49 pm
Reply with quote

There are numerous date-formats as well as a time-format available from the FORMATTIME command. However, you need to issue an ASKTIME ABSTIME command beforehand. The overhead is negligible and their usage is very straightforward.

Review the applicable CICS Application Programmer Reference manual for the proper syntax and usage.

Click here -

ibmmainframes.com/manuals.php

Regards,
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Thu Mar 19, 2009 6:50 pm
Reply with quote

EIBDATE is defined as PIC S9(7) COMP-3 .

The Fine manual states
Quote:
The date is in packed decimal form (0CYYDDD+) where C shows the century with values 0 for the 1900s and 1 for the 2000s. For example, the dates 31 December 1999 and 1 January 2000 have EIBDATE values of 0099365 and 0100001 respectively.


You just need to unpack using a suitable PICTURE.

Dick,

Garry.
Quote:
what is wrong with using eibdate and eibtime?


Depending on when you access them, EIBDATE and EIBTIME fields may not be exact. The ASKTIME refreshes both.

Garry.
Back to top
View user's profile Send private message
Vishu

New User


Joined: 23 Mar 2009
Posts: 22
Location: Bangalore

PostPosted: Tue Apr 07, 2009 3:35 pm
Reply with quote

You can use the following code:

EXEC CICS ASKTIME ABSTIME(WS-ABSTIME)
END-EXEC.
EXEC CICS FORMATTIME ABSTIME(WS-ABSTIME)
DDMMYY(WS-DATE)
DATESEP('/')
TIME(WS-TIME)
TIMESEP(':')
END-EXEC.

**
DDMMYY can be changed to DDMMYYYY etc
Back to top
View user's profile Send private message
Mickeydusaor

Active User


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

PostPosted: Wed Apr 08, 2009 1:02 am
Reply with quote

Code:
05 WS-DATE-CURRENT.
  10 WS-DATE-CUR-CCYY.
    15 WS-DATE-CUR-CC         PIC 9(02) VALUE ZEROES.
    15 WS-DATE-CUR-YY         PIC 9(02) VALUE ZEROES.
  10 WS-DATE-CUR-MM           PIC 9(02) VALUE ZEROES.
  10 WS-DATE-CUR-DD           PIC 9(02) VALUE ZEROES.
  10 WS-TIME-CUR-HH           PIC 9(02) VALUE ZEROES.
  10 WS-TIME-CUR-MM           PIC 9(02) VALUE ZEROES.
  10 WS-TIME-CUR-SS           PIC 9(02) VALUE ZEROES.
  10 WS-TIME-CUR-MS           PIC 9(02) VALUE ZEROES.
  10 WS-TIME-LOC-ID           PIC X(01) VALUE SPACES.
  10 WS-TIME-GMT-HR           PIC 9(02) VALUE ZEROES.
  10 WS-TIME-GMT-MM           PIC 9(02) VALUE ZEROES.


then you can display it anyway you like on the screen.


Code:
MOVE FUNCTION CURRENT-DATE TO WS-DATE-CURRENT
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 -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Sysplex System won't IPL at DR site I... All Other Mainframe Topics 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts To get the the current time DFSORT/ICETOOL 13
No new posts RC query -Time column CA Products 3
Search our Forums:

Back to Top