Hello,


I have questions about the possibilities of filters programmed in SBASIC under SMSQ/E.

1. Something I had forgotten but retrieved thus no need to ask here: the parameter string in a SBASIC filter is to be found in the cmd$ string.

2. Secondly: in a chain of filters I need to use a set of functions that are the same. They exist in Sbasic and today I merge them with each of these filters. Is there a possibility for a EXeced Sbasic filter to access those functions without the mess of compiling and LRESPRing them? In other words is there a possibility for jobs to access and use FuNctions or PROCedures loaded in the Sbasic interpreter of the launching Sbasic job?

3. Multiple output files.
From a number of those filters I want output to multiple files. This works well, eg:


10 REPeat
20  BGET#0,a:BGET#0,b
30  BPUT#1,a:BPUT#2,b
40 END REPeat

and then "EX test_bas,input_file,output_file1,output_file2"
works great.

4. Multiple input files
(Tested with QPC 2.03 + SMSQ/E 2.99 and smsq_gold 2.98)
HOWEVER the following test filter doesn't work _with files_:

10 REPeat
20  BGET#0,a:BGET#1,b
30  BPUT#2,a:BPUT#2,b
40 END REPeat

and then "EX test_bas,input_file1,input_file2,output_file"
doesn't do anything. If working _from files_: the length of input_file2 is set to 0 and output_file is created but also with a length of 0.


However (again) if working _from channels_ then it seems OK (?!), eg:

OPEN_IN#3,input_file1
OPEN_IN#4,input_file2
EX test_bas,#3,#4,output_file
CLOSE#3
CLOSE#4
does work !

I wonder if this is a bug or even if it is not allowed. Indeed in the litterature (mainly Jochen at beginning of 1999) those filters only use one input channel and one output channel and that's it.

OTOH the SMSQ/E manual states that the channels defined in the filter are linked in sequence to the files or channels list given as parameters when the filter is EXeced.

Remarks

With one of my filters I would like 2 input files and up to 11 output files.

I can live with that behavior (bug?) but then my filters must have the file names hard coded (current solution) or I must OPEN (and then CLOSE) input channels or a file input routine must be added (not tested yet!).

Arnould



Reply via email to