|
@@ -117,6 +117,8 @@
|
|
|
" WPTA01 3290 2004/03/04 1 3 FB 80 3125 PO 49-MVS.DATASET",
|
|
|
" TSO004 3390 VSAM 50-mvs-file",
|
|
|
" TSO005 3390 2005/06/06 213000 U 0 27998 PO 51-mvs-dir",
|
|
|
+ // Tape file (z/OS)
|
|
|
+ "C03193 Tape AT.CCRIS.TP",
|
|
|
|
|
|
/* Dataset members */
|
|
|
// Name VV.MM Created Changed Size Init Mod Id
|
|
@@ -2695,84 +2697,87 @@ BOOL CFtpListResult::parseAsIBMMVS(const char *line, const int linelen, t_direct
|
|
|
if (!str)
|
|
|
return FALSE;
|
|
|
|
|
|
- //Referred Date
|
|
|
- str = GetNextToken(line, linelen, tokenlen, pos, 0);
|
|
|
- if (!str)
|
|
|
- return FALSE;
|
|
|
- if (!ParseShortDate(str, tokenlen, direntry.date))
|
|
|
+ if (strncmp(str, "Tape", tokenlen) != 0)
|
|
|
{
|
|
|
- // Perhaps of the following type:
|
|
|
- // TSO004 3390 VSAM FOO.BAR
|
|
|
- if (tokenlen != 4 || strncmp(str, "VSAM", tokenlen))
|
|
|
- return FALSE;
|
|
|
-
|
|
|
- str = GetNextToken(line, linelen, tokenlen, pos, 1);
|
|
|
+ //Referred Date
|
|
|
+ str = GetNextToken(line, linelen, tokenlen, pos, 0);
|
|
|
if (!str)
|
|
|
return FALSE;
|
|
|
+ if (!ParseShortDate(str, tokenlen, direntry.date))
|
|
|
+ {
|
|
|
+ // Perhaps of the following type:
|
|
|
+ // TSO004 3390 VSAM FOO.BAR
|
|
|
+ if (tokenlen != 4 || strncmp(str, "VSAM", tokenlen))
|
|
|
+ return FALSE;
|
|
|
|
|
|
- if (strnchr(str, tokenlen, ' '))
|
|
|
- return FALSE;
|
|
|
-
|
|
|
- copyStr(direntry.name, 0, str, tokenlen, true);
|
|
|
- direntry.dir = false;
|
|
|
- return true;
|
|
|
- }
|
|
|
+ str = GetNextToken(line, linelen, tokenlen, pos, 1);
|
|
|
+ if (!str)
|
|
|
+ return FALSE;
|
|
|
|
|
|
- // ext
|
|
|
- str = GetNextToken(line, linelen, tokenlen, pos, 0);
|
|
|
- if (!str)
|
|
|
- return FALSE;
|
|
|
- if (!IsNumeric(str, tokenlen))
|
|
|
- return FALSE;
|
|
|
+ if (strnchr(str, tokenlen, ' '))
|
|
|
+ return FALSE;
|
|
|
|
|
|
- int prevLen = tokenlen;
|
|
|
+ copyStr(direntry.name, 0, str, tokenlen, true);
|
|
|
+ direntry.dir = false;
|
|
|
+ return true;
|
|
|
+ }
|
|
|
|
|
|
- // used
|
|
|
- str = GetNextToken(line, linelen, tokenlen, pos, 0);
|
|
|
- if (!str)
|
|
|
- return FALSE;
|
|
|
- if (IsNumeric(str, tokenlen))
|
|
|
- {
|
|
|
- // recfm
|
|
|
+ // ext
|
|
|
str = GetNextToken(line, linelen, tokenlen, pos, 0);
|
|
|
if (!str)
|
|
|
return FALSE;
|
|
|
+ if (!IsNumeric(str, tokenlen))
|
|
|
+ return FALSE;
|
|
|
|
|
|
+ int prevLen = tokenlen;
|
|
|
+
|
|
|
+ // used
|
|
|
+ str = GetNextToken(line, linelen, tokenlen, pos, 0);
|
|
|
+ if (!str)
|
|
|
+ return FALSE;
|
|
|
if (IsNumeric(str, tokenlen))
|
|
|
- return false;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- if (prevLen < 6)
|
|
|
- return false;
|
|
|
- }
|
|
|
+ {
|
|
|
+ // recfm
|
|
|
+ str = GetNextToken(line, linelen, tokenlen, pos, 0);
|
|
|
+ if (!str)
|
|
|
+ return FALSE;
|
|
|
|
|
|
- // lrecl
|
|
|
- str = GetNextToken(line, linelen, tokenlen, pos, 0);
|
|
|
- if (!str)
|
|
|
- return FALSE;
|
|
|
- if (!IsNumeric(str, tokenlen))
|
|
|
- return FALSE;
|
|
|
+ if (IsNumeric(str, tokenlen))
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if (prevLen < 6)
|
|
|
+ return false;
|
|
|
+ }
|
|
|
|
|
|
- // blksize
|
|
|
- str = GetNextToken(line, linelen, tokenlen, pos, 0);
|
|
|
- if (!str)
|
|
|
- return FALSE;
|
|
|
- if (!IsNumeric(str, tokenlen))
|
|
|
- return FALSE;
|
|
|
+ // lrecl
|
|
|
+ str = GetNextToken(line, linelen, tokenlen, pos, 0);
|
|
|
+ if (!str)
|
|
|
+ return FALSE;
|
|
|
+ if (!IsNumeric(str, tokenlen))
|
|
|
+ return FALSE;
|
|
|
|
|
|
- // dsorg
|
|
|
- str = GetNextToken(line, linelen, tokenlen, pos, 0);
|
|
|
- if (!str)
|
|
|
- return FALSE;
|
|
|
- if (tokenlen == 2 && !memcmp(str, "PO", 2))
|
|
|
- {
|
|
|
- direntry.dir = TRUE;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- direntry.dir = FALSE;
|
|
|
- direntry.size = 100;
|
|
|
+ // blksize
|
|
|
+ str = GetNextToken(line, linelen, tokenlen, pos, 0);
|
|
|
+ if (!str)
|
|
|
+ return FALSE;
|
|
|
+ if (!IsNumeric(str, tokenlen))
|
|
|
+ return FALSE;
|
|
|
+
|
|
|
+ // dsorg
|
|
|
+ str = GetNextToken(line, linelen, tokenlen, pos, 0);
|
|
|
+ if (!str)
|
|
|
+ return FALSE;
|
|
|
+ if (tokenlen == 2 && !memcmp(str, "PO", 2))
|
|
|
+ {
|
|
|
+ direntry.dir = TRUE;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ direntry.dir = FALSE;
|
|
|
+ direntry.size = 100;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|