我正在输入一个需要转换为 xml 文件的文件,但我还想输入一个带有用于创建 xml 的临时表定义的 .i。分隔符也不起作用(我需要一种将变量转换为命令可以读取的东西的方法)。谢谢!
define input parameter pInputFile as character no-undo.
define input parameter pDelimiter as character no-undo.
???define input parameter pIncludeFile as character no-undo.???
define output parameter pOutputFile as character no-undo init "/tmp/out..
/* start of .i */
define temp-table ttGeneric no-undo
field cust_id as integer
field name as character
field address as character
field address2 as character
field city as character
field state as character
field zip as character
field cust_key as character
index idx is primary cust_id.
/* end of .i */
input stream sImport from value(pInputFile) no-echo.
repeat:
create ttGeneric.
import stream sImport delimiter pDelimiter ttGeneric.
end.
input stream sImport close.
temp-table ttGeneric:write-xml("LONGCHAR", pOutputFile, yes).
可能在调用程序中设置一个预处理器(以某种方式)。