Subscribe to keep this site alive! Under new management but as always, still 100% FREE. Anyone with the IBM i is a friend of ours.
The Challenge: We would like to grab a list of communication session numbers to be logged to a database which in turn can be used for other applications where the communication session number is needed.
The Solution : The QRYCOMSN produces a spool file called ED230P1 when ran when OUTPUT(*PRINT). Copy this spool file (CPYSPLF) to a physical file and use the RUNSQL CL Command to run the SQL scripts to extract the communication Session numbers from the report. There are two levels where you can find these and only pick the ones with the suffix 1 (send) and 2 (receive).
Thinking of a new CHALLENGE? Let us know HERE.