You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Alexander Eller (JIRA)" <ji...@apache.org> on 2017/07/03 13:57:00 UTC

[jira] [Commented] (NET-639) Bug in MVSFTPEntryParser.preParse

    [ https://issues.apache.org/jira/browse/NET-639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16072470#comment-16072470 ] 

Alexander Eller commented on NET-639:
-------------------------------------

After further examination of the pattern, I changed the pattern FILE_LIST_REGEX as a first fix. As - despite the long pattern - only the "recfm" (via pattern) and the "dataset organisation" and "dataset name" (via group) are used, I changed the pattern part concerning the "used" column to be optional (from "\\S+\\s+" to "\\S*\\s+") - now the above line  matches and the line is part of the result.

In MVSFTPEntryParser.java line 64ff

{code:java}
 static final String FILE_LIST_REGEX = "\\S+\\s+" + // volume
                                                                // ignored
            "\\S+\\s+" + // unit - ignored
            "\\S+\\s+" + // access date - ignored
            "\\S+\\s+" + // extents -ignored
            // "\\S+\\s+" replaced ...
            // change respects too large used values and therefor missing delimiter between extents and used
            "\\S*\\s+" + // used - ignored 
            "[FV]\\S*\\s+" + // recfm - must start with F or V
            "\\S+\\s+" + // logical record length -ignored
            "\\S+\\s+" + // block size - ignored
            "(PS|PO|PO-E)\\s+" + // Dataset organisation. Many exist
            // but only support: PS, PO, PO-E
            "(\\S+)\\s*"; // Dataset Name (file name)
{code}


> Bug in MVSFTPEntryParser.preParse
> ---------------------------------
>
>                 Key: NET-639
>                 URL: https://issues.apache.org/jira/browse/NET-639
>             Project: Commons Net
>          Issue Type: Bug
>          Components: FTP
>    Affects Versions: 3.6
>         Environment: different clients running Windows 7, AIX, Ubuntu 16.04
> IBM FTP CS V2R1 as ftp host running z/OS 02.01.00
>            Reporter: Alexander Eller
>            Priority: Minor
>
> Some PS-files couldn't be retrieved from ftp host (during FTPClient.listFiles("xxx")). After investigation we've noticed, that the file has an unusual large allocation info (reading 
> {code:java}
> Volume Unit    Referred Ext Used Recfm Lrecl BlkSz Dsorg Dsname
>    :     :          :     :   :    :      :    :    :      :
> PEZ320 3390   2017/07/03  215807  FB   29600 29600  PS  'LBP.TX.FTP.LAZAGDOM.WORK.HILF'
>    :     :          :     :   :    :      :    :    :      :
> {code}
> so the values of ext and used column merged. As a result, the pattern FILE_LIST_REGEX in MVSFTPEntryParser doesn't match -> the file is ignored.
> Quick Fix in Comments described ...



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)