Read a flat file.

Sort:
You are not authorized to post a reply.
Author
Messages
Kishan
Basic Member
Posts: 6
Basic Member
    IS IT POSSIBLE TO READ A UNIX FILE (CREATED BY THE USER WTH HIS/HER OWN DATA) FROM A LAWSON PROGRAM?
    Gary Davies
    Veteran Member
    Posts: 248
    Veteran Member
      Yes you can, either a straight flat file or CSV, there are API's in the Lawson COBOL to handle it.  The only caveat is that the files have to exist (or the directory dynamically linked to) the application server. 
      Selva
      Basic Member
      Posts: 8
      Basic Member
        you can also use the below API to find out whether file exists or not.

        900-FILEEXISTS
        This routine will check on the existence of an external UNIX file name. An example:

        MOVE WS-RESTART-FILENAMEA TO SYSCMD-FILENAME.
        PERFORM 900-FILEEXISTS.
        IF (SYSCMD-ERROR NOT = ZEROES)
        MOVE WS-FALSE TO PROGRAM-RESTARTING
        END-IF.

        The full path name must be used to populate the SYSCMD-FILENAME variable. If SYSCMD-ERROR is zeroes the file exists.
        Kishan
        Basic Member
        Posts: 6
        Basic Member
          Thank you for your inputs
          You are not authorized to post a reply.