  Translating Message Status Codes? 
 The Question is:
 
Is there a list of FTP status messages and their meanings?  I'm putting FTP
 commands in DCL procedures and a successful "dir" (some time ago) returned
 %X10128402 in $STATUS.  I cannot duplicate that hex value.  Now, a successful
 "dir" returns %X180180E9.
 I'd like to know what each means and/or where to go to find out.
No changes have been made in our FTP environment:
UCX OpenVMS Alpha Version V4.2 - ECO 1
connecting to Microsoft FTP Service (Version 4.0)
 
 The Answer is:
 
  FTP does not necessarily return the condition status -- the OpenVMS
  Wizard will assume the use of COPY/FTP, as well.
 
  The condition value %X10128402 translates as %SMG-E-EOF, end-of-file.
  %X180180E9 doesn't have a valid translation, but the low digit (9) is
  odd, and this indicates a successful status.
 
  The simplest way to translate most (OpenVMS) status codes is using the
  DCL command HELP/MESSAGE.  The attached example establishes the condition
  using the EXIT command, and then issues the HELP/MESSAGE to display the
  code.  (HELP/MESSAGE/STATUS=code would also work.)
 
 
$ exit %X10128402
$ help/message
 
 EOF,  end-of-file
 
  Facility:     SMG, Screen Management Facility
 
  Explanation:  The end-of-file condition is detected on input.
 
  User Action:  If necessary, modify your program to recognize this condition
                and respond to it.
 
 
    Some codes may not be known to HELP/MESSAGE, but they may be present in
    one of the system message files. The following command procedure will
    search all message files in SYS$MESSAGE, looking for a match with the
    specified condition code.
 
$! Searches system message files for a match with a status code
$!
$! format: @MSGTXT code [filespec] [log]
$!
$! code is assumed to be hexidecimal
$! filespec is the file name(s) to be searched in SYS$MESSAGE (default=*)
$! log will list files being searched if non null
$!
$!
$ IF p1.EQS."" THEN INQUIRE p1 "Message ID"
$ IF F$LOCATE("%X",p1).GE.F$LENGTH(p1) THEN p1="%X"+p1
$ IF p2.EQS."" THEN p2="*"
$ txt=F$MESSAGE(p1)
$ IF F$LOCATE("NOMSG",txt).LT.F$LENGTH(txt) THEN GOTO DoSearch
$ WRITE SYS$OUTPUT "Message found in system messages"
$ WRITE SYS$OUTPUT txt
$ EXIT
$ DoSearch:
$ Oldmsg=F$ENVIRONMENT("MESSAGE")
$ ON CONTROL_Y THEN GOTO NotFound
$ SET MESSAGE/NOFACILITY/NOSEVERITY/NOIDENT/NOTEXT ! Avoid warnings for non
$                                                  ! message files
$loop: file=F$SEARCH("SYS$MESSAGE:''p2'.EXE")
$      IF file.EQS."" THEN GOTO NotFound
$      IF p3.NES."" THEN WRITE SYS$OUTPUT "''file'"
$      ON WARNING THEN GOTO loop
$      SET MESSAGE 'file'
$      txt=F$MESSAGE(p1)
$      IF F$LOCATE("NOMSG",txt).GE.F$LENGTH(txt) THEN GOTO found
$ GOTO loop
$ found:
$ a=F$SEARCH(F$ENVIRONMENT("PROCEDURE"))        ! Cancel search
$ WRITE SYS$OUTPUT "Message found in ''file'"
$ WRITE SYS$OUTPUT txt
$ SET MESSAGE'Oldmsg'
$ EXIT
$ NotFound:
$ WRITE SYS$OUTPUT "Message ''p1' not found"
$ SET MESSAGE'Oldmsg' SYS$MESSAGE:SYSMSG
$ EXIT
 
 
