Subject: | |
From: | |
Reply To: | |
Date: | Sat, 5 Oct 1996 04:52:28 -0700 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Also, I found timing quite critical, to the extent that I had to have
all my reflection code in the same paragraph to avoid a perform.
Ed Uber
[log in to unmask]
Geiser, Joe wrote:
>
> There was one more thing one should remember, if using
> COBOL to send and execute RCL (Reflection) commands
> and using "fully qualified" filenames...
>
> The directory names are delimited with a backslash (\).
> Guess what the Escape Character is in RCL? Yup -
> a backslash.
>
> To change this, you have to execute an RCL command
> SET LITERAL-ESCAPE command before anything
> else, to change the escape character. We just happen
> to use two tildes (~~).
>
> The Working-Storage Section looks like this:
>
> 34.7 01 WS-REFL-ESC-LITERAL-COM.
> 34.8 05 FILLER PIC X(19) VALUE
> 34.9 "SET LITERAL-ESCAPE ".
> 35 05 FILLER PIC X(01) VALUE QUOTE.
> 35.1 05 FILLER PIC X(02) VALUE "~~".
> 35.2 05 FILLER PIC X(01) VALUE QUOTE.
> 35.3
>
> And the Procedure Division looks like this:
>
> 526.7 MOVE SPACES TO WS-REFL-COM.
> 526.8 MOVE WS-REFL-ESC-LITERAL-COM TO WS-REFL-COM.
> 526.9 DISPLAY "** Setting Escape Sequence...".
> 527 DISPLAY WS-REFL-COM-LINE.
> 527.1 ACCEPT WS-REFL-S-F-RETURN-CODE.
> 527.11
> 527.12 MOVE SPACES TO WS-REFL-COM.
> 527.13 MOVE "SET VARIABLE-LENGTH 300" TO WS-REFL-COM.
> 527.14 DISPLAY "** Setting Extended R1 Variable Length...".
> 527.15 DISPLAY WS-REFL-COM-LINE.
> 527.16 ACCEPT WS-REFL-S-F-RETURN-CODE.
>
> The first couple of lines execute the SET LITERAL-ESCAPE
> command, and the second, for grins, extends the length of the
> RCL command, which has a default of 80 characters, to 300,
> as we send some long DDE commands through the channel.
>
> Just some food for thought for those contemplating using
> the file transfer capabilities from within a COBOL program
> and Reflection.
>
> (BTW: The ACCEPT WS-REFL-S-F-RETURN-CODE
> statement retrieves a value sent back by Reflection. It
> contains "S" for Success and "F" for Failure. You can
> check for problems using this value.)
>
> Best,
> Joe
|
|
|