using declare global temporary table workfile to create a workfile on the fly using SQL then writting and reading data back from this table see attached.
Code:
*-------------------------------------------------------- * $CreateTable - create our workfile in qtemp *-------------------------------------------------------- c $CreateTable begsr * * Create Work file in Qtemp * c/Exec Sql c+ declare global temporary table workfile c+ (sqlCompany char(10), superV char(10), SuperVDesc char(30), c+ Emp dec(9), EmpDesc char(30), MissDate dec(8,0) , c+ SQLDayofweek char(10), SQLSchdH dec(5,2) , SQLWorkH dec(5,2) , c+ sqlNote char(40)) c+ with replace c/End-Exec * c endsr
Comment