×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.






Hi there

Is there any way to retrieve Day Of Week value  in COBOL/400?
I don't use ILE COBOL and when I try the statement for ILE COBOL, sure it gives syntax error written in below.
How can I get this value in my program?


Message . . . . : ANS COBOL reserved word DAY-OF-WEEK will be accepted as a
  nonreserved word.

Cause . . . . . :   DAY-OF-WEEK is a reserved word in the 1985 ANSI COBOL
  standard (revised 1989), but it is not a COBOL/400* reserved word.

Recovery . . . : Do not use ANS (American National Standard) COBOL reserved
  words that are not COBOL/400 reserved words.





In ILE Cobol you can:

77 w-giorno        pic  9(1) value zero.

ACCEPT w-giorno from DAY-OF-WEEK
display " today is " w-giorno
        ".th day of the week".

Good luck.

Domenico Finucci


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.