Consuming JSON with YAJL

http://ibmsystemsmag.com/ibmi/developer/rpg/json-data-with-yajl/

Display Journal Entries

Select * from Table (QSYS2.DISPLAY_JOURNAL(‘MYLIB’, ‘MYJRN’)) As J This will return all entries of the *CURRENT receiver of journal MYLIB/MYJRN

Review the jobs that are updating a table

Select Job_Name, Count(*) As Rows_Updating From QSYS2.RECORD_LO​CK_INFO Where System_Table_Name = ‘TABLENAME’ And System_Table_Schema = ‘TABLELIB’ And Lock_State = ‘UPDATE’ Group By Job_Name Order By Rows_Updating Desc

Numeric date to Date

Fetching records from TableA where the record_create_ date is greater than Jan 01 2018. Record_Create_Date is a numeric field(8 S 0) Select * From TableA where Date (Digits (Record_create_date) || ‘000000’ ) >= ’01/01/2018′ The DIGITS function returns a character string representation of the absolute value of a number  

Get info about a Job

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