/* REXX *** */ ADDRESS TSO Numeric Digits 10 cvt = C2D(storage(10,4)) smc = C2D(Storage(D2X(cvt+196),4)) ipldt = Right(Left(C2X(Storage(D2X(smc+340),4)),7)+1900000,5) ipltm = C2D(Storage(D2X(smc+336),4)) iplhh = Right(ipltm % 360000, 2, '0') iplmm = Right((ipltm // 360000) % 6000, 2, '0') iplss = Right((ipltm // 6000) % 100, 2, '0') time1 = iplhh':'iplmm':'iplss date1 = Date('O', ipldt, 'J') cen1 = Left(Date('S', ipldt, 'J'),2) Say 'Current date :'Left(Date('S'),2)Date('O')'; Time:'time() SAY 'Last IPL Date:'cen1||date1'; Time:'time1 Days = Date('B') - Date('B', ipldt, 'J') If time1 >= time() then , Days = Days - 1 If Days > 0 then , Say 'Number of days since last IPL = 'Days Exit 0