ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

call only one time

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • call only one time

    i have a clp that is called 5 times a day, i have several calls happening in this clp. One of the calls i only want to happen the first time the clp runs, how can i have this run once and then skip that call for the rest of the day?

  • #2
    How about a *LGL *DTAARA called RAN_TODAY that gets set it to false by a job scheduler entry every day at midnight? Your CL can check that data area. If it's false, run the special code and then set the data area to true.

    Comment


    • #3
      Create a *DTAARA that can hold current date. If *DTAARA <> current-date, call the program and set *DTAARA = current-date.

      When the code runs a second time, the test will fail and the CALL won't happen. First time it runs on a new date, it'll reset. If it needs to run again on some date because of unforeseen issues, simply initialize the *DTAARA to blanks or whatever.
      Tom

      There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

      Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

      Comment

      Working...
      X