Page 1 of 1

Integrator SVFileService Header Values

Posted: Fri Sep 29, 2017 2:01 am
by jyoung
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 3077 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.

Re: Integrator SVFileService Header Values

Posted: Sat Oct 07, 2017 12:28 am
by jyoung
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.