Attachmate Worldwide  |   Contact Us  |   NetIQ.com
Home » Support » Solution Library

Technical Notes

Verastream Scripting Language FILES Object
Technical Note 20000
Last Reviewed 10-Aug-2007
Applies To
Verastream Integration Broker version 8.0 or higher
Verastream EAI Suite version 7.1 or higher
Summary

The FILES object reads a list of files from a specified directory into a TMS-like table called FILES. The following code steps through a list of files and displays each file name in a message box. Fields used by the FILES object need to be defined in the application.

Sample Code

FUNCTION START START
{
    LOAD SUBAP    xteb xctrl
    INIT BASE

    # What file mask? Can use expressions
    SET ddamask '[A-Z_a-z/0-9]*\.* *'

    # What file directory?
    SET inputdir 'C:\mydir'

    fill FILES

    NOCURR FILES
    repeat {
        NEXT FILES
        FERROR BASE filebasename(filename)
    }
}

FUNCTION fill FILES
{
    PUSHDIR FILES inputdir
    SRCCLEAR FILES
    == filetype 'FILE'
    == filereadable 'yes'
    LOG BASE ddamask
    REGEXP filename ddamask
    SELECT FILES
}

FIELD ddamask    string(32)
FIELD inputdir    string(250)

# Fields for FILES pseudo table object
FIELD filename        string(250)
FIELD filetype        string(16) EXPR=FILE|DIRECTORY
FIELD filereadable    string(3) EXPR=yes|no
FIELD filewritable    LIKE filereadable
FIELD fileexecutable    LIKE filereadable

Related Technical Notes
10999 Verastream Integration Broker Technical Notes

Did this technical note answer your question?

Yes    No    Somewhat     Not sure yet

Additional comments about this tech note:

Need further help? For technical support, please contact Support.