Unidata database export - how to add headings using TO DELIM

狂风中的少年 提交于 2019-12-22 12:37:10

问题


In Unidata, when dumping a query to a delimited file, e.g.

list MYFILE '1000' ATB1 ATB2 ATB3 TO DELIM "|" /tmp/extract.txt

Are there any UDT.OPTIONS that control if a heading row is written or not? The only workaround currently involves some really hokey BY.EXP action, and changing EVERY atb to be multivalued and return the heading:@VM:value if we're on the first row. That really, really, sucks.

Looking for something similar to UDT.OPTIONS 91 which controls whether external formatting is applied using TO DELIM.

Currently the output would be:

1000|100|200|300

And what I'm looking for is:

@ID|ATB1|ATB2|ATB3
1000|100|200|300

回答1:


Ian,

Have you looked at using TOXML, and then using the XDOMTransform function, to flatten it the way you want?

Mike



来源:https://stackoverflow.com/questions/46547709/unidata-database-export-how-to-add-headings-using-to-delim

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!