Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

College Student needs a little help 2

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
In an assingment I need to retrieve the system date in the initialize section. Any help would be appreciated.

I am a student at Washington State U.
 
1.- declare in working ws-date pic 9(6)

2.- anywhere in procedure

" accept ws-date from date"

and you'll get the date as 'yymmdd' [sig][/sig]
 
If accepting the system date as-is is OK for you, a simple statement in your "INIT" will do as tupendo noted. If, however, you are printing the date for a report and want something more like MMDDYY, you need to do the following:
Working Storage Section.
01 ws-date.
05 year-in pic 99.
05 month-in pic 99.
05 day-in pic 99.

01 report-hdr
05 pic x.
05 date-out.
10 month-out pic 99.
10 pic x value '/'.
10 day-out pic 99.
10 pic x value '/'.
10 year-out pic 99.
10 pic x value '/'.


100-INIT.
Accept ws-date from date
move month-in to month-out
move day-in to day-out
move year-in to year-out.
Turin
mailto:turin_2000@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top