public FTPFileEntryParser createMVSEntryParser() { return new MVSFTPEntryParser(); }
isParsed = parseFileList(f, entry); } else if (isType == MEMBER_LIST_TYPE) { isParsed = parseMemberList(f, entry); if (!isParsed) { isParsed = parseSimpleEntry(f, entry); isParsed = parseUnixList(f, entry); } else if (isType == JES_LEVEL_1_LIST_TYPE) { isParsed = parseJeslevel1List(f, entry); } else if (isType == JES_LEVEL_2_LIST_TYPE) { isParsed = parseJeslevel2List(f, entry);
String header = orig.get(0); if (header.indexOf("Volume") >= 0 && header.indexOf("Dsname") >= 0) { setType(FILE_LIST_TYPE); super.setRegex(FILE_LIST_REGEX); } else if (header.indexOf("Name") >= 0 && header.indexOf("Id") >= 0) { setType(MEMBER_LIST_TYPE); super.setRegex(MEMBER_LIST_REGEX); } else if (header.indexOf("total") == 0) { setType(UNIX_LIST_TYPE); unixFTPEntryParser = new UnixFTPEntryParser(); } else if (header.indexOf("Spool Files") >= 30) { setType(JES_LEVEL_1_LIST_TYPE); super.setRegex(JES_LEVEL_1_LIST_REGEX); } else if (header.indexOf("JOBNAME") == 0 && header.indexOf("JOBID") > 8) {// header contains JOBNAME JOBID OWNER // STATUS CLASS setType(JES_LEVEL_2_LIST_TYPE); super.setRegex(JES_LEVEL_2_LIST_REGEX); } else { setType(UNKNOWN_LIST_TYPE);
String header = orig.get(0); if (header.indexOf("Volume") >= 0 && header.indexOf("Dsname") >= 0) { setType(FILE_LIST_TYPE); super.setRegex(FILE_LIST_REGEX); } else if (header.indexOf("Name") >= 0 && header.indexOf("Id") >= 0) { setType(MEMBER_LIST_TYPE); super.setRegex(MEMBER_LIST_REGEX); } else if (header.indexOf("total") == 0) { setType(UNIX_LIST_TYPE); unixFTPEntryParser = new UnixFTPEntryParser(); } else if (header.indexOf("Spool Files") >= 30) { setType(JES_LEVEL_1_LIST_TYPE); super.setRegex(JES_LEVEL_1_LIST_REGEX); } else if (header.indexOf("JOBNAME") == 0 && header.indexOf("JOBID") > 8) {// header contains JOBNAME JOBID OWNER // STATUS CLASS setType(JES_LEVEL_2_LIST_TYPE); super.setRegex(JES_LEVEL_2_LIST_REGEX); } else { setType(UNKNOWN_LIST_TYPE);
isParsed = parseFileList(f, entry); else if (isType == MEMBER_LIST_TYPE) { isParsed = parseMemberList(f, entry); if (!isParsed) isParsed = parseSimpleEntry(f, entry); } else if (isType == UNIX_LIST_TYPE) { isParsed = parseUnixList(f, entry); } else if (isType == JES_LEVEL_1_LIST_TYPE) { isParsed = parseJeslevel1List(f, entry); } else if (isType == JES_LEVEL_2_LIST_TYPE) { isParsed = parseJeslevel2List(f, entry);
parser = new MVSFTPEntryParser(); // Does not currently support config parameter
public FTPFileEntryParser createMVSEntryParser() { return new MVSFTPEntryParser(); }
public FTPFileEntryParser createMVSEntryParser() { return new MVSFTPEntryParser(); }
/** * Matches these entries, note: no header: [1] [2] [3] [4] [5] IBMUSER1 * JOB01906 OUTPUT 3 Spool Files * 012345678901234567890123456789012345678901234 1 2 3 4 * ------------------------------------------- Group in regex [1] Job name * [2] Job number [3] Job status (INPUT,ACTIVE,OUTPUT) [4] Number of sysout * files [5] The string "Spool Files" * * * @param file * will be updated with Name, Type and Timestamp if parsed. * @param entry zosDirectoryEntry * @return true: entry was parsed, false: entry was not parsed. */ private boolean parseJeslevel1List(FTPFile file, String entry) { if (matches(entry)) { if (group(3).equalsIgnoreCase("OUTPUT")) { file.setRawListing(entry); String name = group(2); /* Job Number, used by GET */ file.setName(name); file.setType(FTPFile.FILE_TYPE); return true; } } return false; }
parser = createOS400FTPEntryParser(config); } else if (ukey.contains("MVS")) { parser = new MVSFTPEntryParser(); } else if (ukey.contains("NETWARE")) { parser = new NetwareFTPEntryParser(config);
/** * Matches these entries, note: no header: [1] [2] [3] [4] [5] 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 * 012345678901234567890123456789012345678901234 1 2 3 4 * ------------------------------------------- Group in regex [1] Job name * [2] Job number [3] Owner [4] Job status (INPUT,ACTIVE,OUTPUT) [5] Job * Class [6] The rest * * * @param file * will be updated with Name, Type and Timestamp if parsed. * @param entry zosDirectoryEntry * @return true: entry was parsed, false: entry was not parsed. */ private boolean parseJeslevel2List(FTPFile file, String entry) { if (matches(entry)) { if (group(4).equalsIgnoreCase("OUTPUT")) { file.setRawListing(entry); String name = group(2); /* Job Number, used by GET */ file.setName(name); file.setType(FTPFile.FILE_TYPE); return true; } } return false; }
/** * Parses a line of an MVS FTP server file listing and converts it into a * usable format in the form of an <code> FTPFile </code> instance. If the * file listing line doesn't describe a file, <code> null </code> is * returned, otherwise a <code> FTPFile </code> instance representing the * files in the directory is returned. * <p> * @param entry A line of text from the file listing * @return An FTPFile instance corresponding to the supplied entry */ public FTPFile parseFTPEntry(String entry) { FTPFile f = null; if (matches(entry)) { f = new FTPFile(); String dataSetName = group(2); f.setType(FTPFile.FILE_TYPE); f.setName(dataSetName); return (f); } return null; }