Integrator SVFileService Header Values

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
jyoung
Posts: 351
Joined: Thu Jan 21, 2016 6:43 am
Location: Oklahoma City, OK USA

Integrator SVFileService Header Values

Post by jyoung » Fri Sep 29, 2017 2:01 am

I am using the SVFileService to generate a CSV file.

All is good, except the header. The header values are the identifiers in the list.

How can I get more "friendly" values in the header?

I am using the SVHEAD(*LIST) and SERVICE_LIST(Header Values) but that does not seem to be working.

Code: Select all

#JSMXCMD := ('WRITE FILE(' + #wk_FilePath + ') SVHEAD(*LIST) CONTENT(*CSV) SERVICE_LIST(NUMBER,NAME,TOTAL_OPEN,CURRENT_OPEN,31-60,61-75,67-90,90-120, OVER_120)')
#SYS_APPLN.TraceMessageData( "Executing &1" #JSMXCMD )
use builtin(JSMX_COMMAND) with_args(#JSMXHDLE #JSMXCMD) to_get(#JSMXSTS #JSMXMSG #DataList)
if (#COM_OWNER.CheckStatus( #JSMXSTS #JSMXMSG ) = ER)
return
endif
CSV Headers.PNG
CSV Headers.PNG (8.71 KiB) Viewed 83 times
I may be mis-reading the docs here http://docs.lansa.com/14/EN/lansa093/in ... f135892058 but it seems like I can put the header values in the SERVICE_LIST.

jyoung
Posts: 351
Joined: Thu Jan 21, 2016 6:43 am
Location: Oklahoma City, OK USA

Re: Integrator SVFileService Header Values

Post by jyoung » Sat Oct 07, 2017 12:28 am

I was finally able to get it to work using the properties filed that is briefly discussed here http://docs.lansa.com/14/EN/lansa093/co ... 7_2060.htm.

Another suggestion from Support would be to have the first write be a "header" list with one entry and then write out our data list with the APPEND(*YES) option.

Post Reply