EGL Development User Group

How to write into a file in EGL program

  • 1.  How to write into a file in EGL program

    Posted Thu September 01, 2022 07:11 PM
      |   view attached
    Dear experts,
    Because I cannot use sysLib.writeStdout to output message,  and got no help in this group here, I turn to writing to a file.
    I am using the instruction Writing and reading to files at
    https://www.ibm.com/docs/en/rbd/9.5.1?topic=tasks-writing-reading-files
    My rbd is 9.5.1
    my application has multiple projects, I set the ResourceAssociations in the project myServer which fetches data from oracle.

    Following Setting up a resource association:
    in myServer/EGLSource/myServer.eglbld, I created the part with EGL Build Parts Editor:

    <ResourceAssociations name="WriteFromUI">
    <description><![CDATA[Write FromUI]]></description>
    <association fileName="uiWrite">
    <win>
    <seqws systemName="myFile1"/>
    </win>
    </association>
    </ResourceAssociations>

    followed by the Record:

    record mySerialRecord type serialRecord
    {fileName = "WriteFromUI"}
    10 myInteger int;
    10 myChar char(100);
    End

    Now I start to working on Writing to the file, I failed at item2.

    In a function of my EGL program in myServer,
    I tried to import it in the way:
    import myServer.myData.mySerialRecord;

    But I do not know what is the myData,
    When I use:
    import myServer.mySerialRecord;
    I got error: myServer cannot be resolved.  Please see the attached file.

    I have to stop there. I am afraid the step 3. 4. 5 may not work too. 

    Please help,

    Eric

    ------------------------------
    Eric Zuo
    ------------------------------

    Attachment(s)

    docx
    egl question.docx   30 KB 1 version