Subject: | |
From: | |
Reply To: | |
Date: | Tue, 2 Jan 2001 12:22:36 +0000 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Hi,
This is slightly obscure, but I'm sure one of you out there will have done this!
I am attempting to issue a Reflection accept box from within COBOL and then find some way to get the input data back into HP variables.
I have been able to achieve this in a CI script, but the final stage whereby I issue a TRANSFER RCL command does not work. Can anyone tell me another way of doing this?
I have copied the working storage and procedure division below, but I just need to explain a couple of things.
1. The "TRANSFER 'boxany ' & V1" command runs a simple 2-line command file, 'boxany' which looks like this:
anyparm p1
setvar sw_input_var '!p1'
I use this to get the input text into an HP variable (sw_input_var).
2. You will see that I build up a command file containing the necessary reflection commands and escape sequences. When I issue the 'PRINT COMFILE' in COBOL, then the TRANSFER does not work, but when doing the same thing from the command prompt, this works.
********************************
CI command file
echo anyparm p1 > boxany
echo setvar sw_input_var '!!p1' >> boxany
#
setvar sc_esc chr(27)
setvar sc_init "!sc_esc"+"&oF"
setvar sc_rfl_ac1 'ACCEPTBOX V0 PROMPT "This is a question" TITLE "Question" QUESTION'
setvar sc_rfl_ac2 'TRANSFER "boxany " & V0'
echo !sc_init !sc_rfl_ac1
echo !sc_init !sc_rfl_ac2
********************************
COBOL code
WORKING STORAGE.
1 RCBOXG.
3 BOXG-REFL-ACCEPT.
5 FILLER PIC X VALUE %33.
5 FILLER PIC X(4) VALUE "&oF ".
5 FILLER PIC X(20)
VALUE "ACCEPTBOX V1 PROMPT ".
5 FILLER PIC X VALUE QUOTE.
5 BOXG-RFL-PROMPT PIC X(20) VALUE SPACES.
5 FILLER PIC X VALUE QUOTE.
5 FILLER PIC X(7) VALUE " TITLE ".
5 FILLER PIC X VALUE QUOTE.
5 BOXG-RFL-HEADER PIC X(20) VALUE SPACES.
5 FILLER PIC X VALUE QUOTE.
5 FILLER PIC X(16)
VALUE " QUESTION".
3 BOXG-REFL-TRANSFER.
5 FILLER PIC X VALUE %33.
5 FILLER PIC X(4) VALUE "&oF ".
5 FILLER PIC X(23)
VALUE "TRANSFER 'boxany ' & V1".
*
PROCEDURE DIVISION.
MOVE "THIS IS A PROMPT" TO BOXG-RFL-PROMPT.
MOVE "THIS IS A HEADER" TO BOXG-RFL-HEADER.
*
OPEN OUTPUT COMFILE.
MOVE BOXG-REFL-ACCEPT TO COMMAND-LINE.
WRITE RCCOMFILE.
MOVE BOXG-REFL-TRANSFER TO COMMAND-LINE.
WRITE RCCOMFILE.
CLOSE COMFILE.
*
* Now issue the terminal command file
*
%COMIMAGE("PRINT COMFILE"#).
*
_____________________________________________________________
SMITH & WILLIAMSON GROUP MANAGEMENT SERVICES LIMITED
This is an email from Smith & Williamson Group Management Services Limited.
No. 1 Riding House Street, London W1A 3AS (http://www.smith.williamson.co.uk)
Telephone: 020 7637 5377, Fax: 020 7631 0741.
Registered in England at the above address No. 1386775.
The contents of this email are confidential to the intended recipient and may not be disclosed. Although it is believed that this email and any attachments are virus free, it is the responsibility of the recipient to check this.
______________________________________________________________
|
|
|