Wanting to select with the XPFRMAIN program all called programs from a specific transaction, and sorting results by transaction's ENDTIME (descending).
Here is an example to get all called programs from a specific transaction, and sorting results by transaction's ENDTIME (descending):
//TAPSMF DD DISP=SHR,DSN=GSVX.CICSLOGR.TRAN.ABCD, /*Logstream name that is used when it was defined */
// SUBSYS=(LOGR,GSVXLGEX,
// 'FROM=(2021/157,00:00:00),TO=(2021/157,23:59:59)',
// 'STATS,EXPAND,FORWARD,NORDW'),
// DCB=(DSORG=PS,RECFM=VB,LRECL=32756,BLKSIZE=32760)
//SYSIN DD *
OPTION(SUMMARY=NO,ZEROFLD=ZERO,PRINT=DATETIME,MAXTO=NO)
OPTION(LEAPSEC=NO)
SELECT TRANID(XXXX)
SELECT TERMID(YYYY)
TAB ENDTIME SORT DESCENGING TERMID TRANID,
TRAN USE
TAB2 PROGID,
PROG USE
END
RUN