I have a pgm that perfroms verious system checks and alerts me if there is a problem.
I would like to add an If statement to exclude some of the checks that fall between a certain time period and have it jump to a specific lable in the script to continue. thus skipping over the commands that do not need to run during the time frame.
Can someone show me an example and explain the process?
Software/Hardware used:
as400
ASKED:
December 28, 2010 7:26 AM
UPDATED:
December 28, 2010 7:32 PM
Thanks Tom,
I will try and go through the process you suggested and see if I understand it as I walk through it all.
Tom, I had to wrk the second senerio you gave and it worked great. Question: command ENDTIME *lt &STRTIME )…..what does the *lt stand for.
*lt is less then. So this would be true when the endtime value is less than the start time. As in &Strtime = 2300 and &EndTime = 0100
if (&ENDTIME *lt &STRTIME
Phil
Comparison operators can be entered as symbols such as “=” or “<”, but it’s better to use the mnemonics.
The mnemonics are not case-sensitive. I prefer using lower-case for all language elements because it will emphasizes how the command analyzer interprets commands after I prompt them. When I change a command, I always copy it first, then change the copy.
I can see dramatic differences due to the upper-casing by the prompter. Especially with a complex expression involving embedded quotes, I expect to see where all of the mnemonics have been recognized by the prompter.
If the change looks correct, I copy/paste just the change back into the original and type over any bits to set letters to lower-case.
Tom