× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



If you use the "WSCDOW-FMT" instead of "WSCDOW-NUM", you eliminate the
need for the table to interpret the day-of-week number. The text day of
week is returned instead.

cobol400-l-bounces@xxxxxxxxxxxx wrote on 05/03/2012 01:00:03 PM:


----- Message from "Hiers, Mike" <mhiers@xxxxxxxxxxxxxxxxxxx> on
Wed, 2 May 2012 17:48:12 +0000 -----

To:

"cobol400-l@xxxxxxxxxxxx" <cobol400-l@xxxxxxxxxxxx>
. . .
. . .
. . .

SPECIAL-NAMES.
** CEExxxx API's from the Common Execution Environment
** Special-Names API Calls for Day-of-week
LINKAGE TYPE PROCEDURE FOR 'CEEDAYS' USING ALL DESCRIBED
LINKAGE TYPE PROCEDURE FOR 'CEEDYWK' USING ALL DESCRIBED
** Special-Names I-O Feedback
I-O-FEEDBACK IS PNL-FEEDBACK.

WORKING-STORAGE SECTION.
01 WSCCEEDATES.
05 WSCLILIAN-DATE PIC S9(09) BINARY.
05 WSCDOW-NUM PIC S9(09) BINARY.
05 WSCDOW-TXT PIC X(10).
05 WSCDOW-FMT PIC X(10) VALUE 'Wwwwwwwwwz'.
05 WSCSAMPLE-DATE PIC X(08).
05 WSCDATE-FORMAT PIC X(08).

01 WSCDATA.
05 WSCDAYSTBL.
10 FILLER PIC X(09) VALUE 'Sunday '.
10 FILLER PIC X(09) VALUE 'Monday '.
10 FILLER PIC X(09) VALUE 'Tuesday '.
10 FILLER PIC X(09) VALUE 'Wednesday'.
10 FILLER PIC X(09) VALUE 'Thursday '.
10 FILLER PIC X(09) VALUE 'Friday ! '.
10 FILLER PIC X(09) VALUE 'Saturday '.
05 WSCDAYS REDEFINES WSCDAYSTBL.
10 WSCDOW PIC X(09) OCCURS 07 TIMES
INDEXED BY WSC1.

PROCEDURE DIVISION.
MOVE YOUR-DATE-FIELD (as yyyymmdd) TO WSCSAMPLE-DATE
MOVE 'YYYYMMDD' TO
WSCDATE-FORMAT
PERFORM 100-CEE THRU
100-EXIT
MOVE WSCDOW-NUM TO
MYDOWFIELD
SET WSC1
TO MYDOWFIELD
MOVE WSCDOW (WSC1) TO
MAPDAYFIELD

100-CEE.
CALL 'CEEDAYS' USING WSCSAMPLE-DATE
WSCDATE-FORMAT
WSCLILIAN-DATE
OMITTED.

CALL 'CEEDYWK' USING WSCLILIAN-DATE
WSCDOW-NUM
OMITTED.
100-EXIT.
EXIT.


MH

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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

This mailing list archive is Copyright 1997-2024 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.