I am attempting to use your vvIfs service program procedures to create an HTML file on the IFS. I'm getting the file, but the contents are not readable.
I have my own IFS service program that I've used for quite some time (uses the same C procedures) - I can't use it because our procedures conflict (i.e. readline and writeline).
In any case, I tried following your example in the online documentation and it produces a file that contains odd characters. I've tried code page 819 and 1252, and adding the OTEXTMODE and/or OCODEPAGE "flags".
If I omit the codepage value, the file is written using codepage 37. I can read it using WRKLNK, but not from a PC editor.
I was following documentation here: https://service.cnxcorp.com/valence-..._Toolkit.vvIFS
I know the "flags" are simply added to create an integer value to control the open()... My own code looks like this:
(files using this method can be viewed from WRKLNK as well as PC applications)
Not sure how to get the same result with your service pgms.
thx,
Greg
I have my own IFS service program that I've used for quite some time (uses the same C procedures) - I can't use it because our procedures conflict (i.e. readline and writeline).
In any case, I tried following your example in the online documentation and it produces a file that contains odd characters. I've tried code page 819 and 1252, and adding the OTEXTMODE and/or OCODEPAGE "flags".
If I omit the codepage value, the file is written using codepage 37. I can read it using WRKLNK, but not from a PC editor.
I was following documentation here: https://service.cnxcorp.com/valence-..._Toolkit.vvIFS
Code:
lStmf = '/tmp/' + gCompany + '-' + lEntity + '.html';
vvIfs_deleteFile(lStmf);
fd = vvIfs_openFile(lStmf
:OREADWRITE+OCRTNOEXIST
:S_IRUSR + S_IWUSR + S_IROTH + S_IWOTH
:1252);
writeOK = vvIfs_writeFile(fd :%addr(lMessageBody:*data) :%len(lMessageBody));
vvIfs_closeFile(fd);
?
flag = o_wronly + o_creat + o_ccsid + o_excl + o_textdata + o_text_creat;
mode = s_irusr + s_iwusr + s_iroth + s_iwoth;
fd = open(%trimr(inStmf):flag:mode:cp:0); ?
mode = s_irusr + s_iwusr + s_iroth + s_iwoth;
fd = open(%trimr(inStmf):flag:mode:cp:0); ?
Not sure how to get the same result with your service pgms.
thx,
Greg

Comment