|
|
@@ -2679,89 +2679,92 @@ BOOL CFtpListResult::parseAsIBMMVS(const char *line, const int linelen, t_direct
|
|
|
if (!str)
|
|
|
return FALSE;
|
|
|
|
|
|
- // unit
|
|
|
- str = GetNextToken(line, linelen, tokenlen, pos, 0);
|
|
|
- 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, "Migrated", 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);
|
|
|
+ // unit
|
|
|
+ str = GetNextToken(line, linelen, tokenlen, pos, 0);
|
|
|
if (!str)
|
|
|
return FALSE;
|
|
|
|
|
|
- if (strnchr(str, tokenlen, ' '))
|
|
|
+ //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;
|
|
|
|
|
|
- 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;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// name of dataset or sequential name
|