|
From: | Roger While |
Subject: | Re: [open-cobol-list] End of line character. |
Date: | Fri, 08 Jun 2007 08:08:26 +0200 |
Use CALL "SYSTEM" ... This upper-case variant is implemented in the OC runtime (0.33). This will knock off the trailing spaces in the parameter, add in a termating null character and pass it to the "system" routine. No line-end or anything else is necessary. As usual with CALL's, the special register RETURN-CODE will be set to the return status of the "system" function and can therefore be checked for successful completion. Alternatively, one can use the ON EXCEPTION clause of the CALL staement. Roger
Is there a symbolic name in Open Cobol (or in tiny) that represents the end-of line character? I am trying to create a string that I can feed to a CALL "system" statement that will execute a non-cobol program with parameters. Here is what I have thus far: MOVE SPACES TO CALLREC. STRING "bookland.py ", "978160019", SERIAL, " > foorec", ??? INTO CALLREC. CALL "system" USING CALLREC. The string should look like: bookland.py 978160019123 >foorec (CR) Where the last three digits will vary. Later on in the logic I open foorec and use some of the results of the above step. Possibly the program will work without the explicit end of line but I am assuming not. --
[Prev in Thread] | Current Thread | [Next in Thread] |