You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "federico franceschetti (Jira)" <ji...@apache.org> on 2021/11/26 15:04:00 UTC

[jira] [Created] (NET-706) FTPClient does not list GDG files on Z/OS system

federico franceschetti created NET-706:
------------------------------------------

             Summary: FTPClient does not list GDG files on Z/OS system
                 Key: NET-706
                 URL: https://issues.apache.org/jira/browse/NET-706
             Project: Commons Net
          Issue Type: Bug
          Components: FTP
    Affects Versions: 3.8.0, 3.7, 3.6
            Reporter: federico franceschetti


In z/OS®, it is possible to catalog successive updates or generations of related data, which are called generation data groups (*GDG*s).
A generation data group (GDG) is a collection of historically related data sets that are arranged in chronological order. That is, each data set is historically related to the others in the group.
Generation data sets have sequentially ordered absolute and relative names that represent their age. The operating system's catalog management routines use the absolute generation name. Older data sets have smaller absolute numbers. The relative name is a signed integer used to refer to the latest (0), the next to the latest (-1), and so forth, generation.

In my test scenario, in the Z/OS System there are three GDG data sets with following root: TWS95.EBIZ2.UAT.FGI231.XML.DOCFL1

data sets:
TWS95.EBIZ2.UAT.FGI231.XML.DOCFL1.G0001V00
TWS95.EBIZ2.UAT.FGI231.XML.DOCFL1.G0002V00
TWS95.EBIZ2.UAT.FGI231.XML.DOCFL1.G0003V00

 

If I try to get the file with FTPClient methods, as following:

FTPClient f=FTPClient();
f.connect(server);
f.login(username, password);
FTPListParseEngine engine = f.initiateListParsing("{*}'TWS95.EBIZ2.UAT.FGI231.XML.DOCFL1.G0001V00'{*}");
while (engine.hasNext()) { 
FTPFile[] files = engine.getNext(1);  
}

the 'engine.hasNext()' condition is true and the 'get' action performed works fine.

Using instead the index notation to reference the file, as shown below:

FTPClient f=FTPClient();
f.connect(server);
f.login(username, password);
FTPListParseEngine engine = f.initiateListParsing("{*}'TWS95.EBIZ2.UAT.FGI231.XML.DOCFL1(0)'{*}");
while (engine.hasNext()) { 
   FTPFile[] files = engine.getNext(1);  
}

the 'engine.hasNext()' condition is false and it means that an empty object return from initiateListParsing method.

Question is: does FTPClient support the index notation to manage GDG data sets?
If yes, what's wrong in my code?


Thanks and regards
 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)