\ return errno;
\ }
\
\ To activate this C module remove the comment identifiers
\ following the WRITE statement and remove the comment
\ identifier from the geterrno declaration in the Configuration
\ Section. Definitions for the returned errno are found in
\ file QSYSINC/SYS member ERRNO.
\
ERROR-FOUND.
WRITE LIST-LINE.
\ CALL "geterrno" GIVING RETURN-INT.
\ MOVE RETURN-INT TO ERRVAL.
\ WRITE LIST-LINE FROM ERRLIN.
STOP RUN.
Using the Integrated File System—ILE RPG Example
This example program uses the integrated file system from ILE RPG.
F\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
F\
F\ Language: ILE RPG
F\
F\ Description: Demonstrate use of integrated file system
F\ from ILE RPG
F\
F\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
FQSYSPRT O F 132 PRINTER
D\
D\ Prototype the Integrated File System APIs
D\
Dgetuid PR 9B ð EXTPROC('getuid')
Dgetcwd PR \ EXTPROC('getcwd')
D \ VALUE
D 9B ð VALUE
Dopen PR 9B ð EXTPROC('open')
D \ VALUE
D 4A VALUE
D 4A VALUE
Dwrite PR 9B ð EXTPROC('write')
D 9B ð VALUE
D \ VALUE
D 9B ð VALUE
Dclose PR 9B ð EXTPROC('close')
D 9B ð VALUE
Dopen2 PR 9B ð EXTPROC('open')
D \ VALUE
D 4A VALUE
Dread PR 9B ð EXTPROC('read')
D 9B ð VALUE
D \ VALUE
D 9B ð VALUE
Dunlink PR 9B ð EXTPROC('unlink')
D \ VALUE
D\
D\ errno prototype; see error subroutine for further information
D\
Appendix B. Original Examples in Additional Languages B-183