Guidance
指路人
g.yi.org
Guidance Forums / Reginald Rexx / Unexpected result from InetMatchName

Register 
新用户注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. Unexpected result from InetMatchName
#13588
Posted by: DougA 2012-03-23 23:06:30
Wrote some code to extract a file from a unix host, the file may or may not exist.
So used the InetMatchName with the "ONE" option to check it's existance.
However, when the file doesn't exist,   InetMatchName still returns a null value, and sets some of the values, not what I would expect.  When run with an existing file, good values are returned.

errorsFN = date('S')                                (file name has format of:  yyyymmdd,  20120323)
drop FileInfo FileInfo.
FileInfo = 'none'; FileInfo. = 'notset'

err = InetMatchName("FileInfo", errorsFN, "ONE")
consay(con1, "InetMatchName-errors '"err"'")
consay(con1, "  File Name: '"FileInfo"'")
consay(con1, "  File Size: '"FileInfo.0"'")
consay(con1, "  File Date: '"FileInfo.1"'")


err returned null value
FileInfo returned null value
FileInfo.0 returned  "20120323"    (the value of the requested file name)
FileInfo.1 returned "1 1 1980 7 0 0"  

Am I missing something here, or is there a bug in InetMatchName ?
Doug
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Thu 2017-6-29  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0