org.apache.commons.net.ftp.parser

## Class MVSFTPEntryParser

- java.lang.Object
- - org.apache.commons.net.ftp.FTPFileEntryParserImpl
  - - org.apache.commons.net.ftp.parser.RegexFTPFileEntryParserImpl
    - - org.apache.commons.net.ftp.parser.ConfigurableFTPFileEntryParserImpl
      - - org.apache.commons.net.ftp.parser.MVSFTPEntryParser

- All Implemented Interfaces:
    Configurable, FTPFileEntryParser

      public class MVSFTPEntryParser
      extends ConfigurableFTPFileEntryParserImpl

  Implements `FTPFileEntryParser` and `Configurable` for IBM zOS/MVS Systems.
  See Also:
    `Usage instructions.`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `(package private) static String` | `DEFAULT_DATE_FORMAT` Dates are ignored for file lists, but are used for member lists where possible
    `(package private) static String` | `FILE_LIST_REGEX` Matches these entries:
    `(package private) static int` | `FILE_LIST_TYPE`
    `(package private) static String` | `JES_LEVEL_1_LIST_REGEX` Matches these entries, note: no header:
    `(package private) static int` | `JES_LEVEL_1_LIST_TYPE`
    `(package private) static String` | `JES_LEVEL_2_LIST_REGEX` JES INTERFACE LEVEL 2 parser Matches these entries:
    `(package private) static int` | `JES_LEVEL_2_LIST_TYPE`
    `(package private) static String` | `MEMBER_LIST_REGEX` Matches these entries:
    `(package private) static int` | `MEMBER_LIST_TYPE`
    `(package private) static int` | `UNIX_LIST_TYPE`
    `(package private) static int` | `UNKNOWN_LIST_TYPE`

    - ### Fields inherited from class org.apache.commons.net.ftp.parser.RegexFTPFileEntryParserImpl

      `_matcher_`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MVSFTPEntryParser()` The sole constructor for a MVSFTPEntryParser object.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected FTPClientConfig` | `getDefaultConfiguration()` Each concrete subclass must define this member to create a default configuration to be used when that subclass is instantiated without a `FTPClientConfig` parameter being specified.
    `FTPFile` | `parseFTPEntry(String entry)` Parses a line of a z/OS - MVS FTP server file listing and converts it into a usable format in the form of an `FTPFile` instance.
    `List<String>` | `preParse(List<String> orig)` Pre-parses is called as part of the interface.
    `(package private) void` | `setType(int type)` Sets the type of listing being processed.

    - ### Methods inherited from class org.apache.commons.net.ftp.parser.ConfigurableFTPFileEntryParserImpl

      `configure, parseTimestamp`

    - ### Methods inherited from class org.apache.commons.net.ftp.parser.RegexFTPFileEntryParserImpl

      `getGroupCnt, getGroupsAsString, group, matches, setRegex, setRegex`

    - ### Methods inherited from class org.apache.commons.net.ftp.FTPFileEntryParserImpl

      `readNextEntry`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_DATE_FORMAT

          static final String DEFAULT_DATE_FORMAT

      Dates are ignored for file lists, but are used for member lists where possible
      See Also:
        Constant Field Values

    - #### FILE_LIST_REGEX

          static final String FILE_LIST_REGEX

      Matches these entries:

            Volume Unit    Referred Ext Used Recfm Lrecl BlkSz Dsorg Dsname
            B10142 3390   2006/03/20  2   31  F       80    80  PS   MDI.OKL.WORK

      See Also:
        Data set record formats, Constant Field Values

    - #### FILE_LIST_TYPE

          static final int FILE_LIST_TYPE

      See Also:
        Constant Field Values

    - #### JES_LEVEL_1_LIST_REGEX

          static final String JES_LEVEL_1_LIST_REGEX

      Matches these entries, note: no header:

             IBMUSER1  JOB01906  OUTPUT    3 Spool Files
             012345678901234567890123456789012345678901234
                       1         2         3         4

      See Also:
        Constant Field Values

    - #### JES_LEVEL_1_LIST_TYPE

          static final int JES_LEVEL_1_LIST_TYPE

      See Also:
        Constant Field Values

    - #### JES_LEVEL_2_LIST_REGEX

          static final String JES_LEVEL_2_LIST_REGEX

      JES INTERFACE LEVEL 2 parser Matches these entries:

           JOBNAME  JOBID    OWNER    STATUS CLASS
           IBMUSER1 JOB01906 IBMUSER  OUTPUT A        RC=0000 3 spool files
           IBMUSER  TSU01830 IBMUSER  OUTPUT TSU      ABEND=522 3 spool files

      Sample output from FTP session:

           ftp> quote site filetype=jes
           200 SITE command was accepted
           ftp> ls
           200 Port request OK.
           125 List started OK for JESJOBNAME=IBMUSER*, JESSTATUS=ALL and JESOWNER=IBMUSER
           JOBNAME  JOBID    OWNER    STATUS CLASS
           IBMUSER1 JOB01906 IBMUSER  OUTPUT A        RC=0000 3 spool files
           IBMUSER  TSU01830 IBMUSER  OUTPUT TSU      ABEND=522 3 spool files
           250 List completed successfully.
           ftp> ls job01906
           200 Port request OK.
           125 List started OK for JESJOBNAME=IBMUSER*, JESSTATUS=ALL and JESOWNER=IBMUSER
           JOBNAME  JOBID    OWNER    STATUS CLASS
           IBMUSER1 JOB01906 IBMUSER  OUTPUT A        RC=0000
           --------
           ID  STEPNAME PROCSTEP C DDNAME   BYTE-COUNT
           001 JES2              A JESMSGLG       858
           002 JES2              A JESJCL         128
           003 JES2              A JESYSMSG       443
           3 spool files
           250 List completed successfully.

      See Also:
        Constant Field Values

    - #### JES_LEVEL_2_LIST_TYPE

          static final int JES_LEVEL_2_LIST_TYPE

      See Also:
        Constant Field Values

    - #### MEMBER_LIST_REGEX

          static final String MEMBER_LIST_REGEX

      Matches these entries:

             Name      VV.MM   Created       Changed      Size  Init   Mod   Id
             TBSHELF   01.03 2002/09/12 2002/10/11 09:37    11    11     0 KIL001

      See Also:
        Constant Field Values

    - #### MEMBER_LIST_TYPE

          static final int MEMBER_LIST_TYPE

      See Also:
        Constant Field Values

    - #### UNIX_LIST_TYPE

          static final int UNIX_LIST_TYPE

      See Also:
        Constant Field Values

    - #### UNKNOWN_LIST_TYPE

          static final int UNKNOWN_LIST_TYPE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### MVSFTPEntryParser

          public MVSFTPEntryParser()

      The sole constructor for a MVSFTPEntryParser object.

  - ### Method Detail

    - #### getDefaultConfiguration

          protected FTPClientConfig getDefaultConfiguration()

      Description copied from class: `ConfigurableFTPFileEntryParserImpl`
      Each concrete subclass must define this member to create a default configuration to be used when that subclass is instantiated without a `FTPClientConfig` parameter being specified.
      Specified by:
        `getDefaultConfiguration` in class `ConfigurableFTPFileEntryParserImpl`
      Returns:
        the default configuration for the subclass.

    - #### parseFTPEntry

          public FTPFile parseFTPEntry(String entry)

      Parses a line of a z/OS - MVS FTP server file listing and converts it into a usable format in the form of an `FTPFile` instance. If the file listing line doesn't describe a file, then `null` is returned. Otherwise, a `FTPFile` instance representing the file is returned.
      Parameters:
        `entry` - A line of text from the file listing
      Returns:
        An FTPFile instance corresponding to the supplied entry

    - #### preParse

          public List<String> preParse(List<String> orig)

      Pre-parses is called as part of the interface. Per definition, it is called before the parsing takes place. Three kinds of lists are recognized:
      - z/OS-MVS File lists,
      - z/OS-MVS Member lists,
      - Unix file lists.
      Specified by:
        `preParse` in interface `FTPFileEntryParser`
      Overrides:
        `preParse` in class `FTPFileEntryParserImpl`
      Parameters:
        `orig` - Original list after it has been created from the server stream
      Returns:
        `original` unmodified.

    - #### setType

          void setType(int type)

      Sets the type of listing being processed.
      Parameters:
        `type` - The listing type.