 |
» |
|
 |
|
 |

Copyright (c) Digital Equipment Corporation 1988, 1989. All rights reserved
LAYERED PRODUCT: PLI V3.n OP/SYS: VMS
SOURCE: Digital Customer Support Center
SYMPTOM:
Correcting a string conversion error gives a SOURCE NOT MODIFIED error.
ANALYSIS:
With the upgrade to versions 3.0/3.1 PLI, the ONSOURCE clause was
added to allow altering a string which, when assigned, caused a
conversion error. Any alteration of a string without using the
ONSOURCE clause gives this error message.
SOLUTION:
This program demonstrates how to use the ONSOURCE clause to alter or reset
a string which, when assigned, caused a conversion error.
BINF: proc options(main);
/* This program demonstrates how to use the ONSOURCE command to correct
a CONVERSION error. The string cannot be modified unless the ONSOURCE
is used. Generally, without the use of the ONSOURCE command, a PLI
run-time error message is generated:
PLI-I-ONSNOTMODE, ONSOURCE value not modified. */
dcl X char(1) var;
dcl Y fixed bin(31) init (5);
on CONVERSION begin;
put skip list('In the conversion routine');
onsource() = '0';
put skip list('In the conversion routine-problem corrected');
end;
x = '?';
y = binary(x);
put skip list ('DONE');
put skip list('Y=',Y);
end BINF;
|
buy online or call 1.800.AT.COMPAQ
|
|