Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.
Hi ,
I am new into RPG World and learning new things step by step .I have been working on various assingment related to IFS . So every time i start working with IFS i got struck with these two things : CODEPAGE , CCSID . So we need to give our program various hit trail before it's ready for final testing .
It would be grateful if anyone can provide some thought on these two topic .
Thanks
amit
Codepage is old, use CCSID
By IFS, do you mean the "big PC hard drive" (the ROOT system)? If so, then two popular values are 1252 (Windows) and 819 (Latin-1). Here is a tutorial on using the IFS with RPG http://www.scottklement.com/rpg/ifs_ebook/ifs_ebook.pdf .
Chris Ringer
If you're not doing anything terribly fancy, just reading or writing, you can let the system take care of conversion for you. With the Unix-type IFS APIs, the 2nd parameter on open() is oflag, which is really a set of bit flags. If you turn on O_TEXTDATA, then the API will convert to or from the file's CCSID to your program's CCSID (which is normally EBCDIC). You just need to make sure the CCSID of the *STMF matches what is really in the file.