Return to the RPG Tips
ILE RPG way to sniff the most recently entered sign-on buffer
So here is an ILE RPG way to sniff the most recently entered sign-on buffer on a level 30 machine. H dftactgrp( *no ) bnddir( 'QC2LE' ) D UserId S 10A D Password S 10A D Work DS based( Work@ ) D Buffer@ * overlay( Work : 17 ) D UFCB@ * overlay( Work : 433 ) D SubSystem 16A overlay( Work : 529 ) D PCO@ PR * extproc( '_PCOPTR' ) D setsppfp PR * extproc( 'setsppfp' ) D Object 16A value C eval Work@ = PCO@ C eval Work@ = setsppfp( SubSystem ) C eval Work@ = UFCB@ C eval Work@ = Buffer@ C eval UserId = %subst( Work : 1 : 10 ) C eval Password = %subst( Work : 11 : 10 ) C eval *INLR = *on
[report a broken link by clicking here]