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 Profile Log in to check your private messages Log in
 
How to display the system date and time in the map

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
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    Post subject: How to display the system date and time in the map
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: Chennai

PostPosted: Thu Mar 19, 2009 6:11 pm    Post subject:
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: 6968
Location: porcelain throne

PostPosted: Thu Mar 19, 2009 6:18 pm    Post subject:
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    Post subject: Reply to: cics-map
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: 2504
Location: Atlanta, Georgia, USA

PostPosted: Thu Mar 19, 2009 6:49 pm    Post subject: Reply to: How to display the system date and time in the map
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 -

http://ibmmainframes.com/manuals.php

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

Active Member


Joined: 08 May 2006
Posts: 995
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Thu Mar 19, 2009 6:50 pm    Post subject:
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Binary to display characters Roy Ware SYNCSORT 1 Tue Sep 19, 2017 8:46 pm
No new posts Validate the Date girishb2 DFSORT/ICETOOL 8 Tue Sep 19, 2017 1:12 am
No new posts DB2 NULL Values display V S Amarendra Reddy DB2 3 Thu Sep 07, 2017 6:59 pm
No new posts Regarding time parameter shanthi gude JCL & VSAM 7 Mon Sep 04, 2017 2:31 pm
No new posts Julian Date to CICS ABSTTIME blayek CICS 3 Wed Aug 30, 2017 11:15 pm

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