FAQ's
Common Sculptor technical questions
Redirect sagerep output to a printer from a DOS shell under modern version of windows
Older versions of the DOS shell allowed printer redirection of program output. For example:
would send the output to the standard printer. Later version of the DOS shell supplied with windows do not support this. There are some commercial add-ons that can restore this functionality but the simplest thing to do is to make use of a power shell script.
For Sculptor 2 programmers still working with DOS who wish to continue using printer redirecton of sagerep output, the easiest thing to do is put the sagerep command in a Power Shell script and call Power Shell itself with the script as parameter from a DOS shell. It is not usually workable to dispense with a DOS shell altogether in favour of a Power Shell because the 'exec' command and command lines in menu files do not work. Sculptor attempts to call another DOS shell to execute commands.
The procedure then is:
- Create a Power shell script, say test.ps1, and use the power shell printer redirect facility with optional command line parameters $args[]: The -Name clause may be omitted if you want to use the default printer.
- From an exec command in a Sculptor program call a power shell with test.ps1 as a parameter along with your own optional application parameters, eg: This type of command executed by exec should also be used with menus.
Appending a value to x does not change its value and x displays an empty string. What is wrong?
With this example:
You need to use '/' not '+' The expression :
Add y onto x after the final trailing space. The expression x+y is three spaces followed by "DEF"
The same key appears to occur twice in a keyed file
Sculptor allows only one instance of a key value, ie keys must be unique. However I have an example where the same key occurs twice. Eg assume I have a singe key field F1 and I scroll through the values of this field a few time I get:
In all cases where a data file looks strange, the first thing to do is run kfcheck on the file. If it is damaged then anything could happen and the index to the file must be rebuilt with kfri. If, however, the file is OK then the most likely reason for the problem is that F1 has some characters that do not display on a screen or a printer but are nevertheless present. An easy way to find them would be to send the output to a text file and then do a binary dump of the text file using, say, od on Linux or debug on DOS.
Nothing happens when running a report to a window
If a report is run with no parameters it is sent to a default window and Next and End options appear in the top line.
But if the same report is run to a window nothing happened
Output will go to the named window. In a report sent to a named window the output does go the window but there are not automatically created Next and End options. This is because you have full control of the named window and the system does not override any functionality put there by the programmer. If you require the Next and End options create buttons for them and attach event functions in the normal way.
If you are seeing nothing it may be because the program or window have been closed.
What is the difference between srepw and srepwc
There is no difference. They are both shipped as binaries for the historic reason that srepw would only permit localhost or directly accessed data whereas srepwc allowed network connections in addition. The restriction of srepw as for licensing reasons. This restriction has now been lifted and srepw calls srepwc on entry.