Jump to page titleUNITED STATES
hp.com home products and services support and drivers solutions how to buy
» contact hp

:

more options
 

hp.com home
End of Jump to page title
Example-PLI Using ONSOURCE To Correct SOURCE CONVERSION Error
Jump to content



» 

business support center

Home & Home Office Support:
» HP branded products
» Presario branded products
» Services & Warranties
Small & Medium Business Support:
» Small & Medium Business products
» Small & Medium Business services
Support for IT Professionals:
» Enterprise products (IT Resource Center)
» NonStop enterprise products
» Business & IT Services
Content starts here
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
privacy statementusing this site means you accept its terms