DATAMANIP commands


PROGRAM NAME

kgeneric - Generic Routine Interface (glue)

DESCRIPTION

kgeneric is a programmable interface that allows a generalized Un*x command line to be executed by cantata.

Entries on the pane are spit out to a string that is then system()'d off. The string is built up by appending the contents of the SELECTED entries together in scan-line order.

Note: All entries are strings. Unfortunately, the forms don't seem to like multiple-worded strings, so you have to build up your command piece at a time. You CAN use a multiple-worded string in the prefix and trailer.

Note: Anything entered into a FILENAME box will be treated as a file using the normal Khoros file access checking. This means the UI will try to open the filename for access. If it is a Un*x command or other object then things won't work.

Note: There appears to be no way to protect special characters from the shell.

Note: The oval button to the left of argument name selection allows you to put a minus sign ("-") immediately in front of the name itself in the command string that is executed. The parser won't let you put a minus sign in the string field itself - it will complain about unknown arguments. So if you want an argument name that looks like

-blah

then click the button to get the - to show and enter blah as the name. The actual command string executed will look like that above.

Note: There is no job control from this routine. Hitting the kill button in cantata is not guaranteed to kill the command that was system()'d off. Additionally, status reporting is unsupported.

REQUIRED ARGUMENTS

-di1
type: boolean
desc: selects minus sign (TRUE) or blank (FALSE) for input name #1
-di2
type: boolean
desc: selects minus sign (TRUE) or blank (FALSE) for input name #2
-di3
type: boolean
desc: selects minus sign (TRUE) or blank (FALSE) for input name #3
-do1
type: boolean
desc: selects minus sign (TRUE) or blank (FALSE) for output name #1
-do2
type: boolean
desc: selects minus sign (TRUE) or blank (FALSE) for output name #2
-do3
type: boolean
desc: selects minus sign (TRUE) or blank (FALSE) for output name #3
-dn1
type: boolean
desc: selects minus sign (TRUE) or blank (FALSE) for arg name #1
-dn2
type: boolean
desc: selects minus sign (TRUE) or blank (FALSE) for arg name #2
-dn3
type: boolean
desc: selects minus sign (TRUE) or blank (FALSE) for arg name #3
-dn4
type: boolean
desc: selects minus sign (TRUE) or blank (FALSE) for arg name #4
-dn5
type: boolean
desc: selects minus sign (TRUE) or blank (FALSE) for arg name #5
-dn6
type: boolean
desc: selects minus sign (TRUE) or blank (FALSE) for arg name #6
-dn7
type: boolean
desc: selects minus sign (TRUE) or blank (FALSE) for arg name #7
-dn8
type: boolean
desc: selects minus sign (TRUE) or blank (FALSE) for arg name #8

OPTIONAL ARGUMENTS

-prefix
type: string
desc: prefix string
default: {none}
-i
type: infile
desc: input image
default: {none}
-o
type: outfile
desc: output image or file
default: {none}
-iname1
type: string
desc: name of input argument #1
default: {none}
-i1
type: infile
desc: input filename #1
default: {none}
-iname2
type: string
desc: name of input argument #2
default: {none}
-i2
type: infile
desc: input filename #2
default: {none}
-iname3
type: string
desc: name of input argument #3
default: {none}
-i3
type: infile
desc: input filename #3
default: {none}
-oname1
type: string
desc: name of output argument #1
default: {none}
-o1
type: outfile
desc: output filename #1
default: {none}
-oname2
type: string
desc: name of output argument #2
default: {none}
-o2
type: outfile
desc: output filename #2
default: {none}
-oname3
type: string
desc: name of output argument #3
default: {none}
-o3
type: outfile
desc: output filename #3
default: {none}
-name1
type: string
desc: Name of argument #1
default: {none}
-val1
type: string
desc: argument #1 value
default: {none}
-name2
type: string
desc: Name of argument #2
default: {none}
-val2
type: string
desc: argument #2 value
default: {none}
-name3
type: string
desc: Name of argument #3
default: {none}
-val3
type: string
desc: argument #3 value
default: {none}
-name4
type: string
desc: Name of argument #4
default: {none}
-val4
type: string
desc: argument #4 value
default: {none}
-name5
type: string
desc: Name of argument #5
default: {none}
-val5
type: string
desc: argument #5 value
default: {none}
-name6
type: string
desc: Name of argument #6
default: {none}
-val6
type: string
desc: argument #6 value
default: {none}
-name7
type: string
desc: Name of argument #7
default: {none}
-val7
type: string
desc: argument #7 value
default: {none}
-name8
type: string
desc: Name of argument #8
default: {none}
-val8
type: string
desc: argument #8 value
default: {none}
-trailer
type: string
desc: trailer string
default: {none}

EXAMPLES

To execute:

ls -al > snarf

using this routine, do:

% kgeneric -prefix ls -iname1 al -iname2 > -o1 snarf -di1 1 -di2 0 -di3 0 -do1 0 -do2 0 -do3 0 -dn1 0 -dn2 0 -dn3 0 -dn4 0 -dn5 0 -dn6 0 -dn7 0 -dn8 0

and you should get the desired result. Note that this routine is not much good for use on the command line. It is for cantata.

SEE ALSO

None. Yet.

RESTRICTIONS

Kgeneric executes the command via a ksystem() call, and thus there is no reporting of errors from the command. If nothing happens when you run a command, try executing the whole command from command line. If the command line fails, fix the problem before trying to use kgeneric.

No data type or range checking is available when using this interface.

REFERENCES

None.

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.