UNSOLVED

prabir2

updated

18 years ago

P

prabir2

1 Message

0

5111

August 7th, 2008 07:00

ASL

Can any body please give me some idea as how to sent output into a file using ASL script?

Thanks in advance..

prabir

  • bkuhhirte

    52 Posts

    365

    0

    Posted August 15th, 2008 04:00

    The primary method used to output text to a file in ASL is by using the ACT_File object:

    fileObj = create("ACT_File","New-file");

    fileObj->fileName("test.out");

    fileObj->write("This is a same blob of text");

    fileObj->writeln("This is a line of output");

    Regards,

    Bill

  • supriya2

    2 Posts

    365

    0

    Posted September 9th, 2008 00:00

    Hi Bill,

    While i am executing the code without specifying domain, ASL is giving following error

    ASL-ERROR_CREATE-While attempting to create the object 'ACT_File::New-file'

    CI-EGENERIC-ACT_File

    MR-CLASS_NOT_FOUND-Class of given name not found

    and while i am executing the code with specifying domain, ASL also is giving following error

    ASL-ERROR_INVOKE-While attempting to invoke operation 'fileName' of object

    'ACT_File::New-file'

    SVIF-EREMOTE-CI-E-EGENERIC-fileName

    . MR-OPERATION_NOT_FOUND-Specified operation not found in class

    Is there are way out? Also strugling with to read a file whthin ASL script not from the command line --outout filefrom. Is there any function available to read a file from ASL script?

    If possible please help.

    Thanks in Advance

    Supriya

  • ArunDeva

    37 Posts

    365

    0

    Posted January 27th, 2010 02:00

    ACT_File can be used to write the out put to a file.

    Please find below the relevant information.

    dmctl> getProperties ACT_File

    Properties of class ACT_File:
        CreationClassName =
                     Name =
              ServiceName =
                 fileName =
                     test =
                    trace =

    dmctl> getOperations ACT_File

    Operations for class ACT_File:
        clone_name
        write msg
        writeln msg

    dmctl>

    sample commands

    -----------------------------

    sampleFile = create("ACT_File", "SAMPLE-FILE");
    sampleFile->trace = TRUE;
    sampleFile->fileName = "/opt/InCharge7/SAM/smarts/local/rules/testingfile.txt";

    sampleFile->write();

    I know that this is a very late answer, but still putting these details just for "informations" to others.

    Regards

    Arun