Determining what the ACS routines are doing when
FTP allocates a dataset can be problematic, as the allocation occurs in a
started task separate from the address space requesting the file transfer, and with a jobname
equal to the userid specified on the FTP command. SMS/Debug
can perform ACS routine tracing of FTP allocations in much
the same manner as described in Dynamically Enabling ACS Routine Tracing
above. To enable SMS/Debug ACS routine tracing for FTP allocations, the
PRE_SMSACS and SMSACS_TRACE environments must be active, as
above, and the SMS/Debug rules must turn on the
&SD_ACSTRACE variables, also as above. FTP allocations can be identified
by the &PGM variable (BPXPRECP) and the
&CDE variable (FTPDNS). Since the FTP allocation occurs
in an address space which exists only momentarily and in which an //SMSDEBUG DD
statement cannot be included, the trace output must be sent to the console. This can be
accomplished with the WTORC operand on the DEFPROD statement.
For example:
DEFPROD WTORC(2,11) /* TRACE OUTPUT TO CONSOLE */
DEFRULE DYNTRACE
IF &ENV = PRE_SMSACS
&PGM = BPXPRECP /* IS IT UNIX SYS SERVICES? */
&CDE = FTPDNS /* IS IT FTP? */
&DSNAME = MY.INTER.ESTING.DATA.SET
THEN SET &SD_ACSTRACE = YES /* TURN ON ACS ROUTINE TRACING */
SET &SD_ACSTRACE_B = YES /* DUMP ACS R/O VARIABLES BEFORE */
SET &SD_ACSTRACE_A = YES /* DUMP ACS R/W VARIABLES AFTER */
IF &ENV = PRE_SMSACS THEN EXIT /*NO MORE PRE_SMSACS PROCESSING */