I have a program that writes data to the IFS.



Strings are concatenated into dataString. Eventually dataString is written
to the IFS. It used to only write UTF-8 so it utilized the CCSID on the
variable as follows.



dcl-s dataString varchar(1048576) ccsid(1208);



Now my client has times they want to write ebcdic instead of utf8. Is there
a way to make the ccsid on the above variable a variable that I can pass
into my program? I would rather not write code like this. First because it
is ugly to have these if statements throughout the code (I know, I can
create a function and it won't be as bad) but second we are now locked into
using only two CCSIDs and I would have to change the program if they decided
that they want a third or fourth CCSID. With a parm, I can just say give it
a try.



dcl-s dataString1208 varchar(1048576) ccsid(1208);

dcl-s dataString37 varchar(1048576) ccsid(37);



if parmCCSID = UTF8

append to dataString1208

else

append to dataString37

endif


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.