Subject: | |
From: | |
Reply To: | Vance, Jeff H (Cupertino) |
Date: | Mon, 15 Aug 2005 10:09:22 -0700 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
...
> CAROL ; 10 AM- 3 PM
...
>
> What we would like to do and the problem we are having is as
> follows: We are trying to set a variable for the position for
> the session name (for example positions 1-8 in the above file
> example we'll call it sess).
> Then we want to set a variable for the end time (position 17
> we'll call it hour). Then set an if statement that in a loop
> that states
> if HPHOUR > than hour then abort sess.
Assuming you read each record into a variable named "file_record",
the first field is easy to get:
setvar sess word(file_record)
SESS will automatically have leading and trailing blanks removed.
To get the ending time, which will need to be converted to a 24 hour
clock, you can:
setvar ampm word(file_record,,-1)
setvar hour decimal(word(file_record,,-2))
if ampm = "PM" then
setvar hour hour+12
endif
finally:
if hphour > hour then ....
:help word displays the full syntax.
BTW, I did not test any of this but it is at least close.
HTH,
Jeff Vance, vCSY
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|
|
|