Concatenating String and Saving to Text File using PowerBuilder -
what problem in pb script below, text file returns output of "h name" - opening , closing quote included inside text file upon saving , should have been h name only. i've run in debug mode , value of ls_message h name correct when saving text file became "h name". happened? below script.
ls_message = "h" ls_message += "~t" ls_message += ls_itsupportname ll_hdr_insert = dw_outbound.insertrow(0) dw_outbound.setitem(ll_hdr_insert,'message',ls_message) if trim(ls_message) <> "" or len(trim(ls_message)) > 0 ls_message = "" filepath = string(dw_path.object.outboundfilepath[1]) filename = ls_fileprefix + string(ldt_trandate,'yyyymmddhhmm') +'_'+ ls_referecenum + '.txt' filedir = filepath + '/' + filename dw_outbound.saveas(filedir, text!, false)
if you're using datawindow.saveas() (i'm guessing, since isn't explicit in question @ point), you're relinquishing control of format generic functionality (which wasn't designed just creating text file; it's more staging data of mixed types other use).
it sounds want powerscript functions fileopen(), filewrite() , fileclose(). those, control format.
good luck,
terry.
Comments
Post a Comment