ᑍ 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