Get joblog info for a job

Select * from Table(QSYS2.JOBLOG_INFO(‘JobNumber/User/JobName’)) A

Get the last command executed by the User

Select Cast(Message_Text as Char (200) Ccsid 37) From Table(QSYS2.JOBLOG_INFO(‘JobNumber/User/JobName’)) A Where A.Message_Type = ‘REQUEST’ Order By Ordinal_Position Desc Fetch First 1 Row Only


OPM stands for Original Program Model. OPM’s counterpart is ILE (Integrated Language Environment).  OPM is characterized by the structure of one source member being compiled into one executable program ILE on the other hand requires a two-step process to create programs.  Source members are first compiled into module objects (type *MOD).  For RPG, the command CRTRPGMOD (create RPG module) or […]

Access multi-member files

SQL does not support multi-member database files. To access a member other than the first, create an alias. Create alias mylib/Sales2017 for mylib/Saleshist(year2017) Select * from mylib/Sales2017