Valence version: 6.1.20220706.0
Trying to set the CCSID to 1208. It works if the file is .TXT, but will always upload as CCSID 37 if the file is .DAT.
First the .txt document (this one works)...
text_file.png
text_file_ifs.png
Rename the existing document from .txt to .dat and it will end up CCSID 37:
dat_file.png
dat_file_ifs.png
Trying to set the CCSID to 1208. It works if the file is .TXT, but will always upload as CCSID 37 if the file is .DAT.
First the .txt document (this one works)...
text_file.png
text_file_ifs.png
Rename the existing document from .txt to .dat and it will end up CCSID 37:
dat_file.png
dat_file_ifs.png
Code:
**free
/copy qcpylesrc,vvHspec
/include qcpylesrc,vvNabBtn
// --------------------------------------------------------------
// program start
// --------------------------------------------------------------
Initialize();
Process();
CleanUp();
*inlr=*on;
// --------------------------------------------------------------
dcl-proc Process;
vvIn.path = '/home/PBEHR/file_upload';
vvIn.fileName = %char(%timestamp)
+ '_' + vvUtility_getSessVar('VVUPLOAD_fileName' : gSid);
vvIn.ccsid = 1208;
vvIn_file(vvIn : '*NULL');
if vvIn.error <> *blanks;
SetResponse('success' : 'false');
return;
endif;
SetResponse('success' : 'true');
end-proc Process;
//================================================== ==================================
// Valence copybook - DO NOT REMOVE
//================================================== ==================================
/include qcpylesrc,vvNabBtn

Comment