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


  • Subject: Re: Time change.
  • From: "Bill Meecham" <wm@xxxxxxxxx>
  • Date: Thu, 28 Oct 1999 12:56:36 -0400
  • Organization: Extol Inc

I enter a job schedule entry for 2am on sunday morning that will run this
code.  This is some very basic code that will change the time forward or
backward based on the time of the year it's run.  I offer no gaurentees.
This is offered as my opinion only and it is not the recommendation of me or
any of my employers.  I don't suggest that you run this code, this is just
an example of code that would change the time on the AS400 that it run on.
If you're not sure, check with someone who is familiar with your environment
before making this change.  In any case, don't do this on your own!

As someone else mentioned, you should adjust the UTC offset system value.
You could add that change to this routine.


             PGM

             DCL        VAR(&TIMEN) TYPE(*DEC ) LEN(6 0)
             DCL        VAR(&MONTHN) TYPE(*DEC ) LEN(2 0)
             DCL        VAR(&TIMEC) TYPE(*CHAR) LEN(6)
             DCL        VAR(&MONTHC) TYPE(*CHAR) LEN(2)
/*assuming the month is set correctly */
             RTVSYSVAL  SYSVAL(QMONTH) RTNVAR(&MONTHC)
             CHGVAR     VAR(&MONTHN) VALUE(&MONTHC)
/*assuming the time is correct now*/
             RTVSYSVAL  SYSVAL(QTIME) RTNVAR(&TIMEC) /**/
             CHGVAR     VAR(&TIMEN) VALUE(&TIMEC)
/* SPRING AHEAD /**/
             IF         COND(&MONTHN < 6) THEN(CHGVAR VAR(&TIMEN) +
                          VALUE( &timeN + 10000 ))
/* FALL BACK    /**/
             IF         COND(&MONTHN > 6) THEN(CHGVAR VAR(&TIMEN) +
                          VALUE( &timeN - 10000 ))
/*get ready to change */
             CHGVAR     VAR(&TIMEC) VALUE(&TIMEN)
/* actual change  /**/
              CHGSYSVAL  SYSVAL(QTIME) VALUE(&TIMEC)     /**/
/* get out */
             RETURN
             ENDPGM



+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.