I created a CSV file from a PF using CPYTOIMPF. Here was my command:
I then created an RPG program using the vvIfs_readfile() example.
When I inspect the data it looks encoding (lots of umlauts, vowel expressions etc). How do I c0nvert the data in the "proper" format to update a PF? (is this a CCSID issue)?
Code:
CPYTOIMPF FROMFILE(FPVAL41DEV/MYTFILE) TOSTMF('/a-file-import.csv') STMFCCSID(*PCASCII) RCDDLM(*CRLF) RMVBLANK(*BOTH)
Code:
fileHandle = vvIfs_openFile('/a-file-import.csv'':OREADONLY); x=1; dou status = -1 or x = %elem(record); data = vvIfs_readFile(fileHandle:status:READLINE); data = vvUtility_decodeUTF16(data); record(x) = data; x+=1; enddo; vvIfs_closeFile(fileHandle);
Comment