Porting Central
Skip to main content

Porting Central

UNIX FAQ

Below you will find frequently asked questions, divided into topics. Clicking on "Answers" will take you to the questions and answers for each section.

This UNIX porting FAQ pertains to OS/400 (notably ILE and PASE), but does not pertain to guest or 'hosted' operating systems (e.g. Windows, AIX, Linux) running on eServer i5 or iSeries servers.

Industry standard UNIX support

  • What UNIX-type functions does iSeries provide?
  • What UNIX-type industry standards are implemented on iSeries and what are the plans for implementation of additional standards?

Unix Answers

Process control

  • Does OS/400 support a threaded process model? How is it similar/different from other threaded process models?
  • Is there any way to fork() a process on iSeries systems?
  • What if I want to fork() a process in the ILE environment, but my logic does not immediately follow with an exec()?

Process control answers

Signals

  • Does OS/400 support an asynchronous signals model? If so, how is it similar to or different from a UNIX model?

Signals answers

Environment variables:

  • Does OS/400 ILE support environment variables?
  • How does OS/400 PASE support environment variables?
  • Are there any differences in programming environment variables between CISC and RISC versions of OS/400?

Environment variables answers

ASCII vs EBCDIC

  • Does OS/400 support an ASCII character set?
  • How can I change the code page of a file?
  • How can OS/400 support ASCII workstations if it is an EBCDIC system?
  • How can data be converted between ASCII and EBCDIC in ILE?
  • What is the correct value for the #pragma convert (ccsid) if I desire character strings to be compiled as ASCII in ILE C?

ASCII vs EBCDIC answers

File system and file I/O

  • Is there any way in OS/400 to redirect printf output from the console log to a file?
  • Is there any way to redirect input from a file rather than reading from STDIN (e.g. mypgm < myfile)?
  • Does OS/400 support a UNIX-like (POSIX) hierarchical file structure?
  • In ILE, when I tried fopen(), fclose(), etc. on IFS stream files in QOpenSys they do not seem to work, but the low level calls do not have any problems. Is there any difference in these two types of calls?
  • How can I binary open *PGM or *MODULE types? The following statement doesn't work:
    fd = open("/qsys.lib/mylib.lib/mypgm.pgm", O_RDONLY, 0);
    I receive message "The value specified for the argument is not correct." I can use open() command for all *MBR types without problems. On what kind of other object types can I expect troubles?
  • Are there ILE C APIs for I/O operation on record files?
  • Does OS/400 support standard file descriptors 0 (standard input), 1 (standard output), and 2 (standard error)?
  • Are file descriptors closed implicitly when a program ends?

File system and file I/O answers

User interface

  • How can I design a UNIX-like text-based interface, using standard output?
  • Does OS/400 support curses libraries?
  • Does OS/400 support X-Windows, Motif, Athena libraries?

User interface answers

C++

  • What is the OS/400 C++ development environment?
  • How do I choose which C++ compiler to use?
  • Does OS/400 support threaded application in C++?

C++ interface answers

Database

  • What databases does OS/400 support?
  • How can I port database design and tables to DB2 UDB for iSeries?
  • How (and how well) does DB2 UDB for iSeries interoperate with other databases?
  • What are the data types supported by DB2 UDB for iSeries?
  • What locking level does DB2 UDB for iSeries use, row level or page level?
  • What is the difference between a physical file created by DDS and a TABLE created using SQL?
  • What are journal and journal receivers?
  • Does DB2 UDB for iSeries support stored procedures? Can one port stored procedures from other RDBMS like Oracle or Sybase to DB2 UDB for iSeries?
  • What is scope of a connection?
  • Can I connect to more than one database? How do I switch between database connections?
  • What is scope of a COMMIT?
  • Does OS/400 have callable SQL APIs which can be used to make an application portable?
  • What standards does DB2 UDB for iSeries comply with?
  • Does DB2 UDB for iSeries support Unicode?
  • Does DB2 UDB for iSeries support triggers?
  • Where can I find education about DB2 UDB for iSeries?
  • What is CLI?
  • How does CLI on DB2 UDB differ on iSeries systems?

Database answers

ILE application development tools and utilities

  • Is there a way to use the source-level debugger on an ILE program which has been spawn()'d from another?
  • Can executable program objects be stored in QOpenSys (in the integrated file system (IFS))?
  • My program sources have tabs used for indentation? Should I expect any problem while taking the sources to OS/400?
  • What editors are available in ILE?
  • What debuggers are available in ILE?
  • Does OS/400 ILE support PERL programming?
  • Is there a version of zip available for OS/400?

ILE application development tools and utilities answers

OS/400 PASE application development tools and utilities

  • What debuggers are available in iSeries PASE?
  • Is there a way to use the source-level debugger on an OS/400 PASE program which has been spawn()'d from another?
  • Can executable program objects be stored in QOpenSys (in the integrated file system (IFS))?
  • What editors are available in OS/400 PASE?
  • Does OS/400 PASE support PERL programming?
  • Is there a version of zip available for OS/400?

OS/400 PASE application development tools and utilities answers

Software product packaging, distribution and license management

  • I want to use CD-ROMs for distributing my software. How do I produce CD-ROMs for my software in house?

Software product packaging, distribution and license management answers

Security

  • How is authentication information stored on iSeries?
  • Are user and group names case sensitive?
  • Does iSeries support uids and gids?
  • How does iSeries handle the "super user" or "root" concept?
  • Does OS/400 require a user to be a member of a group?"

Security answers

Miscellaneous

  • What is the analogy for UNIX shared library on iSeries?
  • Is gettimeofday() API available on iSeries ?
  • Is data alignment on iSeries different than that on UNIX? If, yes, what are the implication or issues while porting UNIX app to iSeries?
  • Does iSeries has sys_nerr[] array for error message to be used in a C program?
  • Does iSeries support pointer arithmetic? Is it different from UNIX?
  • Is iSeries a Big-Endian or a Little-Endian machine ?
  • I have heard that the iSeries uses 16 byte pointers. What are the porting considerations
  • Does the iSeries support 64 bit integer data types?

Miscellaneous answers