Hi,
i have a small problem. i have an array that contains n columns and i want to write the content of this array to a file with a pipe separator without using report.
Thanks a lot
LET sel_string = "select * from ", table_name"
# override the default | if you want to
UNLOAD TO file_name DELIMITER ":" sel_string
IF sqlca.sqlcode != 0
THEN
display "unload problem"
ELSE
display "unload count: ", sqlca.sqlerrd[3]
END IF
END FUNCTION
2) Build strings from the array, and echo it to a file:
let str1="1|2|3|"
let str2="4|5|6|"
run "rm -f file.unl"
let run_str="echo \"", str1 clipped, "\" >> file.unl"
run run_str
let run_str="echo \"", str2 clipped, "\" >> file.unl"
run run_str
end main
3) Informix 4GL is brain dead when communicating with the OS. I've developed callable "C" functions that will also do this job. Check out the FAQ over in the Informix Online
forum if you're interested.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.