× 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.



A simple way is to set up a data area. Retrieve the value, if 1, set to 0 and run reports. If 0, add 1. Then save the data area contents.

A little more involved is to look at the date in a range.

Here is code from a CL I wrote:

0829.00 /* If the current day is a Tuesday, check if weekly job */
0830.00 /* needs to be run. */
0831.00
0832.00 IF COND(&QDAYOFWEEK *EQ '*TUE') THEN(DO)
0836.00 /* ONLY RUN ON SECOND AND FOURTH WEEK OF THE MONTH */
0837.00 CHGVAR VAR(&RUNWEEKLY) VALUE('N')
0838.00 /* TEST FOR TUESDAY IN THE SECOND WEEK */
0839.00 IF COND(%SST(&QDATE 3 2) *GE '08' *AND +
0840.00 %SST(&QDATE 3 2) *LE '14') THEN(DO)
0841.00 CHGVAR VAR(&RUNWEEKLY) VALUE('Y')
0842.00 ENDDO
0843.00 /* TEST FOR TUESDAY IN THE FOURTH WEEK */
0844.00 IF COND(%SST(&QDATE 3 2) *GE '22' *AND +
0845.00 %SST(&QDATE 3 2) *LE '28') THEN(DO)
0846.00 CHGVAR VAR(&RUNWEEKLY) VALUE('Y')
0847.00 ENDDO


John McKee

Otherwise, you are looking at determining the week of the year.
-----Original message-----
From: "Robert Ostrowski" Bob.Ostrowski@xxxxxxxxxxxxxxxx
Date: Fri, 18 Sep 2009 10:25:51 -0500
To: midrange-L@xxxxxxxxxxxx
Subject: Printing Every Other Friday

We have a series of reports that now print every Friday. We print them
based on the day of the week determined in a CL program.

IF COND(&DAY *EQ '5') etc....

They now want these reports to print every other Friday. Anybody know
of a way to do this?

Thanks.



--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


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.