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 Usergroups Profile Log in to check your private messages Log in
 

 

How to display system current date on screen

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
sasidhar.choragudi
Currently Banned

New User


Joined: 26 Jun 2006
Posts: 3
Location: Hyderabad

PostPosted: Tue Feb 27, 2007 10:36 pm    Post subject: How to display system current date on screen
Reply with quote

want to get system date?

in working-storage section i wrote like this
77 ws-date pic x(12)

and i wrote a statement in procedure division for that
display ws-date from date

then i am getting 990227. but the year is not showing correctly . for this how to write a programme please

sasi
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Tue Feb 27, 2007 11:21 pm    Post subject:
Reply with quote

Did you put the system date in ws-date?
Back to top
View user's profile Send private message
sachin_star3
Warnings : 1

New User


Joined: 30 Sep 2006
Posts: 78
Location: pune

PostPosted: Wed Feb 28, 2007 3:35 pm    Post subject:
Reply with quote

ID-DIVISION.
PROGRAME-ID. XXX.
DATA DIVISION.
WORKING-STORAGE SECTION.
77 WS-DATE PIC X(12).
PROCEDURE DIVISION.
ACCEPT WS-DATE FROM DATE
DISPLAY WS-DATE
STOP-RUN.
========================
THIS YOU GET RESULT
FROM- SACHIN BORASE
IBM PUNE
Back to top
View user's profile Send private message
sasidhar.choragudi
Currently Banned

New User


Joined: 26 Jun 2006
Posts: 3
Location: Hyderabad

PostPosted: Wed Feb 28, 2007 6:49 pm    Post subject: Re THANK YOU WILLIAMS, BUT....
Reply with quote

OK THANK YOU BOSS, BUT I AM GETTING THAT DATE

AS FOLLOWS 99 02 28 THAT IS YY MM DD. THAT TOO NOT 2007 BELOW 2000 ONLY IT IS SHOWING. HOW TO SOLVE THIS PROBLEM WITH SIMPLE CODE
Back to top
View user's profile Send private message
sasidhar.choragudi
Currently Banned

New User


Joined: 26 Jun 2006
Posts: 3
Location: Hyderabad

PostPosted: Wed Feb 28, 2007 6:56 pm    Post subject: Re THANK YOU BOSS BUT I AM NOT GETTING YEAR CORRECTLY
Reply with quote

WHEN I WROTE THAT PROGRAME LIKE THIS
D-DIVISION.
PROGRAME-ID. TTT.
DATA DIVISION.
WORKING-STORAGE SECTION.
77 WS-DATE PIC X(12).
PROCEDURE DIVISION.
ACCEPT WS-DATE FROM DATE
DISPLAY WS-DATE
STOP-RUN.


I AM GETTING DATE AS FOLLOWS 990228 WHICH REPRESENTS YYMMDD. THAT TOO YEAR IS NOT CORRECT. IT IS SHOWING BELOW 2K. NOT AFTER 2K. HOW TO SOLVE
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 686
Location: Earth

PostPosted: Wed Feb 28, 2007 7:55 pm    Post subject:
Reply with quote

Which version of cobol are you using?
I am using IBM ENTERPRISE COBOL FOR Z/OS AND OS/390 3.2.0.
It is not giving any problem. icon_smile.gif
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Wed Feb 28, 2007 9:30 pm    Post subject: Re: Re THANK YOU WILLIAMS, BUT....
Reply with quote

sasidhar.choragudi wrote:
AS FOLLOWS 99 02 28 THAT IS YY MM DD. THAT TOO NOT 2007 BELOW 2000 ONLY IT IS SHOWING. HOW TO SOLVE THIS PROBLEM WITH SIMPLE CODE
Stop with the all CAPS!
is there a time/date program forcing the year to 99 tor testing purposes?
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How system know which REXX to excute? jackzhang75 CLIST & REXX 14 Thu Jul 06, 2017 1:09 am
No new posts Display upon console bipinpeter COBOL Programming 1 Thu Jun 22, 2017 12:35 am
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts SMTP the current generation number of... Jyothi Kulunde JCL & VSAM 4 Thu May 04, 2017 4:08 pm


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