GoFiler Legato Script Reference
Legato v 1.5b Application v 5.24b
|
Table of Contents | < < Previous | Next >> |
Chapter Twenty-one — EDGARView Integration (continued)
Overview
The EDGARArchiveOpen function opens an EDGAR Archive or Return Copy file and creates an internal map of the file. Operation of this function can be somewhat time consuming, particularly if the source file is directly downloaded from the SEC EDGAR Archive.
Syntax/Parameters
Syntax
handle = EDGARArchiveOpen ( string source, [boolean bHeader] );
Parameters
source
A string containing the source filename and path. The string can specify a URI. If a local file is specified, it is held open until the archive object is closed.
bHeader
A boolean when set to non-zero, only the header and properties are loaded. The documents are not mapped and cannot be retrieved when this flag is set.
Return Value
A handle value or error as NULL_HANDLE (0). Use the GetLastError function to return details of the error if the object fails to open. Use GetLastErrorMessage to retrieve textual details. The handle is subsequently used to access the contents of the archive. When the handle is no longer needed, use the CloseHandle function to destroy the object.
If the source file contains structural errors, an ERROR_SYNTAX will be returned with one of the following codes in the lower word:
0x1000 | Unable to parse header (probably invalid archive). | |
0x1001 | Expected a <PDF> tag. | |
0x1002 | Syntax error in UU encoded section. | |
0x1003 | Expected a <DOCUMENT> tag. The error message will contain the location. | |
0x1004 | Premature end of file while loading document header. | |
0x1005 | Premature end of file while looking for document or file end tags. | |
0x1006 | Could not locate return copy file delimiter. | |
0x1007 | Bad parameter in document header of return copy. |
The GetLastErrorMessage will contain additional information such as the offending line number in the source file.
Remarks
Once open, the file properties and file content can be extracted from the EDGAR Archive.
The source file is opened with read share and held open as long as the object is open.
Related Functions
Platform Support
Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL
Legato IDE, Legato Basic
Table of Contents | < < Previous | Next >> |
© 2012-2024 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. GoFiler™ and Legato™ are trademarks of Novaworks, LLC. EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated with or approved by the U.S. Securities and Exchange Commission. All other trademarks are property of their respective owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software License Agreement.