ANSI Standard PL/B Language and Visual PL/B
NOTE TO OUR READERS
This web resource is written for our own use. But we feel strongly that the PL/B language should be shared with the software community. So feel free to use this at will!
BUT PLEASE...
if you find errors or omissions or have a better way to do something. TELL US! Dialog helps us all. Send e-mail to:
support@mmcctech.com
XFILEs
XFILE support in PL/B
This is a SUNBELT ONLY language feature.
Sunbelt's XFILE support allows these files to be automatically handled both on disk and in memory.
Little information has been added yet lacking more than a technical description in the Sunbelt manuals.
But here are some notes from the web board.
9/27/2011 Herlev in Denmark needed to convert some output to UTF-8 and was wondering how.
>Matthew Lake from Sunbelt replied:
One option would be to use the built in XFILE support. By default, the generated XML is in UTF-8 format. So to convert a string to UTF-8, you can prep a memory XFILE, write the data and use GETFILE to get the content, Then strip the XML.
XF XFILE
XF1 XFILE
d1 dim 1
UnicodeIn dim 100
UnicodeOut dim 100
string dim 1000
PREP XF,d1,"root"
WRITE XF,seq;recrord=XF1
WRITE XF1,seq;Unicode=UnicodeIn
GETFILE XF,XMLDATA=string
CLOSE XF
SCAN "", string
BUMP string, seq
LENSET string
RESET string
SCAN "", string
BUMP string, 9
MOVE string, UnicodeOut.
(This page is repeated as
plb-U010.cfm
Plb-X010.cfm v1.0