Reggie,
The 'decimal' function converts an integer expression to a string. From
the MPE/iX online help:
:help decimal all
Syntax: DECIMAL(integer)
Defn: A CI evaluator function that converts a number from an
integer to a string.
Type: String
Example: decimal(127)
Result: 127
The line in error should read:
: SETVAR hour ![word(file_record,,-2)]
Validating on the MPE/iX side and again using the online help:
:setvar file_record "Y 5 PM"
:SETVAR hour ![word(file_record,,-2)]
:showvar hour
HOUR = 5
:echo ![typeof(hour)]
1
:help typeof all
Syntax: TYPEOF(expression)
Defn: A CI evaluator function that returns the type of a
variable or expression where:
0 = invalid type
1 = Integer
2 = String
3 = Boolean
Type: Integer
Example: typeof(HPPATH)
Result: 2 (string)
Regards
Paul Christidis
----------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit
written agreement or government initiative expressly permitting the use of
e-mail for such purpose.
----------------------------------------------------------------------------------------
I seem to be getting the below error when using the decimal command. Do
anyone have an idea?
Regards
Reginald Monroe
Systems Engineering
Mercury Insurance - Information Technology
(714) 671-6753
[log in to unmask]
40 :SETVAR file_record ''
41 :SETVAR sess ''
42 :INPUT file_record < t1.files
43 :SHOWVAR file_record
44 FILE_RECORD = Y 5 PM
45
46 :SETVAR sess word(file_record)
47 :SETVAR ampm word(file_record,,-1)
48 :SHOWVAR ampm
49 AMPM = PM
50 : SETVAR hour decimal(word(file_record,,-2))
51 ^
52 A string operand was found in a numeric expression. (CIERR 9870) 53
REMAINDER OF JOB FLUSHED. 54 CPU sec. = 5. elapsed min. = 1. TUE, AUG
16, 2005, 8:58 PM.
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|