CompuServe Thread

settime atomclock

7 messages in this thread
#95284From: Robert J. FleigApr 12, 1993 6:43 PM
I am trying to use the "Settime.rexx" script that came with your program, AtomClock V.1.2a. I get an "error 26 in line 32; missing or unexpected END settime.rexx failed (return code 10)". Here is the script, would you check it out and tell what may be wrong? The 32nd line is the last line. /* settime.rexx */ /* If you have AREXX and WShell you can insert this in your */ /* startup sequence. Will run AtomClock just once a month and */ /* set the hardware clock */ paramstr = 'z/EDT n/*70,1-202-653-0351 c10' /* set command line arguments for AtomClock */ 'DATE >RAM:LastSet.dat' NewMonth = GetMonth('RAM:LastSet.dat'); IF EXISTS('S:LastSet.dat') THEN OldMonth = GetMonth('S:LastSet.dat') ELSE OldMonth = 'Nul' /* arbitrary – to make unequal */ 'DELETE RAM:LastSet.dat' IF OldMonth ~= NewMonth THEN DO 'AtomClock' paramstr IF rc = 0 THEN DO 'COPY RAM:LastSet.dat S:' /* change this for your hardware clock if necessary */ 'SETCLOCK SAVE' END EXIT GetMonth: arg filename CALL OPEN('datefile',filename,'R'); datestr = READLN('datefile'); CALL CLOSE('datefile') PARSE VAR datestr WeekDay DD '-' Mon '-' YR Time RETURN Mon RJ……….on AutoPilot
#95493From: Clark WilliamsApr 14, 1993 2:51 AM
Robert, Where is the closing end for this DO? |–DO | 'AtomClock' paramstr | IF rc = 0 THEN | |—-DO | | 'COPY RAM:LastSet.dat S:' | |/* change this for your hardware clock if necessary */ | | 'SETCLOCK SAVE' | |—-END |–EXIT GetMonth: arg filename CALL OPEN('datefile',filename,'R'); datestr = READLN('datefile'); CALL CLOSE('datefile') PARSE VAR datestr WeekDay DD '-' Mon '-' YR Time RETURN Mon
#95521From: Robert J. FleigApr 14, 1993 11:15 AM
Clark, I know next to nothing when it comes to programming. You have asked me in essence what my post is asking. How do I get settime.rexx to work? Are you saying that I must type the word END somewhere or replace a word with it and if so, where? From your message it looks like I should replace the word EXIT with END. Is this so? I appreciate your help. RJ……….on AutoPilot
#95855From: Clark WilliamsApr 16, 1993 12:26 PM
RJ, Sorry I should have posted that question to the person you were posting to! I think you need an END END EXIT as in END END EXIT It looks as though the second end is missing. Try it and see what happens! It shouldn't hurt anything. You need to pop into an editor and add the extra END. I don't know your expertise level with AmigaDOS so please forgive me if I seem patronizing here. You could use a Word Processor (such as ProWrite), but remember to save your edits as ASCII (TEXT ONLY) and not as NORMAL. See what happens and let me know if it works or fails. Clark -|- Williams –O-o-O– Via George
#95919From: Robert J. FleigApr 16, 1993 10:57 PM
Clark, Your suggestioncorrected part of the problem. Now, when the program checks and finds it is a new month it runs atomclock and attempts to save the Ram:Lastset.dat to the s: directory. The problem is that settime.rexx has already deleted Lastset.dat from Ram: and cannot open ram:Lastset.dat for input. If I take out line 14, ('DELETE RAM:LastSet.dat') will that mess up the program? The line must be there for a purpose I would think. RJ……….on AutoPilot
#95940From: Clark WilliamsApr 17, 1993 2:13 AM
RJ, I'm not sure what Art was trying to do exactly, but you might try the following code at the line which currently reads: 'COPY RAM:LastSet.dat S:' replace that with the line 'DATE > S:LastSet.dat' I think tha Art was just trying to update the current date as the 'old' date. It is hard to tell exactly since the comments are rather sparse. I can't guarantee this will solve your problem, but I think this should help you out. Clark -|- Williams –O-o-O– Via George
#95964From: Robert J. FleigApr 17, 1993 9:53 AM
Clark, I moved the 'delete ram:LastSet.dat' between the END and EXIT lines and it seems to work fine now. I've come across a few Arexx programs that always seem to need a little tweeking. I don't understand how someone can upload a program that doesn't work. You would think they would have tested it and are using it themselves first. RJ……….on AutoPilot