Please Help....................COBOL/400 
Author Message
 Please Help....................COBOL/400

Since OS/400 is supposed to be Y2K compatible I want to know if it is
possible to retrieve system date in yyyy/mm/dd  format from it in
COBOL/400.

In RPG/400 -- *DATE can be used which supplies Y2K compliant system date.

Is such a feature available in COBOL/400 also ?

Statement :
 ACCEPT  identifier  FROM  DATE.
 Here the system date -- DATE has an implicit PICTURE 9(6).
 The System date format is yy/mm/dd

Any help in this matter will be appreciated.

Thanks,
        Lotika



Mon, 13 Mar 2000 03:00:00 GMT  
 Please Help....................COBOL/400


Quote:

>Since OS/400 is supposed to be Y2K compatible I want to know if it is
>possible to retrieve system date in yyyy/mm/dd  format from it in
>COBOL/400.

I don't know COBOL/400 specifically, but in COBOL-85 with the
intrinsic functions you write:
  MOVE FUNCTION CURRENT-DATE TO identifier

This gives you the current date and time in the format
YYYYMMDDHHMMSSHH0000 with the various letters representing digits of
the year, month, day, hour, minutes, seconds, 1/100's of a second, and
the last 4 zeroes being reserved for future use.

The function result is alphanumeric so the move is from left to right.
If you define identifier as pic x(8), you'll get the date.

You can use reference modification, too. So for example if you wanted
to display just the hour you could write:
  DISPLAY FUNCTION CURRENT-DATE(9:2)

George Trudeau



Mon, 13 Mar 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. AS/400 Cobol trying to call an ILE Cobol function in a service progam - Please help

2. Please Help ...........COBOL/400

3. Old RM-COBOL UNIX programmer seeking info on move to COBOL/400 on AS/400

4. AS/400, RPG/400, COBOL, CL/400

5. COBOL/400 on IBM AS/400

6. rpg/400 to cobol/400 conversion?

7. Logo on COBOL/400 Display Files on AS/400

8. need Cobol/400 help

9. COBOL on AS/400...HELP!!!!

10. AS/400 COBOL programming problem Help!

11. VS COBOL II to COBOL/400 conversion query

12. IBM Mainframe COBOL vs. AS/400 COBOL

 

 
Powered by phpBB® Forum Software