Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter Twenty-oneEDGARView Integration (continued)

EDGARLookupClass Function

Overview

The EDGARLookupClass function accesses the SEC’s public-facing company database and returns an array with series and class information for a specified CIK and Class ID.

Syntax/Parameters

Syntax

string[] = EDGARLookupClass ( string cik | qword cik, string id );

Parameters

cik

A string or a qword that specifies the registrant CIK to retrieve. Note that EDGAR CIK values can exceed a 32-bit integer or dword size.

id

A string specifying the Class ID to lookup.

Return Value

A string array containing data from the SEC. On failure, the array will be empty. Use the GetLastError function to return details of the error.

If the CIK or Class cannot be located (but a connection was made to the SEC), the last error will be ERROR_EOD with 1 or 2 depending on whether the CIK or Class cannot be found, respectively.

If there is an issue with the content of the response, ERROR_SYNTAX with a low word code will be returned. Contact technical support if this error is returned since it can indicate that the SEC has changed its response format.

Remarks

The information returned by this function is the same as the public-facing company database. Note that this information can differ slightly from the private access company database, specifically in the area of the address since the SEC stores multiple types of addresses.

Each entry within the returned list will have one of the following key names:

  Name   Description
  General Information    
    CompanyName   Company name.
    CIK   Company CIK (should match request).
  Series and Class    
    SeriesID   The series ID to which the class belongs.
    SeriesName   The name of the series to which the class belongs.
    SeriesStatus    The status of the series to which the class belongs. This is normally ‘Active’ or ‘Inactive’.
    ClassID    The class ID which will be the same as the query value.
    ClassName   The name of the class.
    ClassTicker   Ticker symbol for class, if declared.
    ClassStatus   The status of the class. This is normally ‘Active’ or ‘Inactive’.

 

An example of reading a random fund and series/class information (any valid CIK can be used, so illustrate series and class data, pick a CIK for an investment company with one or more series):

    string              list[];
    string              cik, id;
    string              s1;
    int                 ix, size;
    int                 rc;

    cik = "0000355916";
    id = "C000007907";

    list = EDGARLookupClass(cik, id);
    if (IsError()) {
      rc = GetLastError();
      AddMessage("CIK/Class Not found %s, 0x%08X", cik, rc);
      exit;
      }

    size = ArrayGetAxisDepth(list);

    while (ix < size) {
      s1 = ArrayGetKeyName(list, ix);
      AddMessage("%3d - %-30s : %s", ix, s1, list[ix]);
      ix++;
      }

This will result in a fairly long list of data, some of it presented in the log below:

  0 - CompanyName                    : BlackRock Variable Series Funds, Inc.
  1 - CIK                            : 0000355916
  2 - SeriesID                       : S000002876
  3 - SeriesName                     : BlackRock Large Cap Core V.I. Fund
  4 - SeriesStatus                   : Active
  5 - ClassID                        : C000007907
  6 - ClassName                      : Class III
  7 - ClassTicker                    : 
  8 - ClassStatus                    : Active

The company database operates outside of EDGAR operation hours and is normally available on a 24/7 basis.

Repeatedly calling with the same CIK will not likely pound the SEC’s server since both the application and WinInet will cache pages. Further, if changes are made to the SEC database, they are not likely to quickly appear when referenced from the EDGARLookupCIK function.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic