Home

User Manual

image

Contents

1. ADD 1 TO Y IF DI OPTRDP TRANSCODE TM STRING YMDEFF lt DI OPTRDP YMDEFF AND YMDEND gt DI OPTRDP YMDEND DELIMITED BY SIZE INTO SUPRTOOL COMMAND LINE Y ELSE STRING YMDEFF gt DI OPTRDP YMDEFF AND YMDEFF lt DI OPTRDP YMDEND OR DELIMITED BY SIZE INTO SUPRTOOL COMMAND LINE Y ADD 1 TO Y STRING YMDEND gt DI OPTRDP YMDEFF AND YMDEND lt DI OPTRDP YMDEND DELIMITED BY SIZE INTO SUPRTOOL COMMAND LINE Y ADD 1 TO Y MOVE AND VOID TO SUPRTOOL COMMAND LINE Y 336 Examples of Calling Suprtool Suprtool Open 5 7 Suprtool Open 5 7 IF USE PROGRAM OPEN OUTPUT PROG FILE CONTINUE ADD 1 TO X Y MOVE TABLE B PROG NBR FILE DIR_TEMPDATA mep833pg dat TO SUPRTOOL COMMAND LINE X MOVE AND LOOKUP B PROG NBR TO SUPRTOOL COMMAND LINE Y END IF IF USE CARRIER OPEN OUTPUT CARRIER FILE CONTINUE ADD 1 TO X Y MOVE TABLE C CARRIER FILE DIR_TEMPDATA mep833ca dat TO SUPRTOOL COMMAND LINE X MOVE AND SLOOKUP C CARRIER END IF IF USE REGION OPEN OUTPUT REGION FILE CONTINUE ADD 1 TO X Y MOVE TO SUPRTOOL COMMAND LINE Y TABLE D REGION FILE DIR_TEMPDATA mep833rg dat TO SUPRTOOL COMMAND LI MOVE AND SLOOKUP D REGION NE X yn NE Y LINE Y TOOL COMMAND LINE Y MOVE SORT YMDEND DESC TO SUPRTOOL COMMAND LINE Y TO SUPRTOOL COMMAND LI END
2. N 10 OUT 2 CPU Sec 1 Wall Sec 1 In this example we see two records that do not contain proper dates The first record contains all 9s which is probably used as some sort of flag We may need to add 99 in front of these dates Once all the incorrect dates are fixed we can start converting We can add a prefix of 19 or 20 to all the appropriate dates by using the following Extract statement Please note that we are updating this directly In case we need to redo this task we only convert those dates that have not yet been converted In this example we set the cutoff year to 30 so any dates before 30 will have 20 as the century and the others will have 19 gt get d sales gt set date cutoff 30 gt item purch_ date date yymmdd gt item deliv date date yymmdd gt if not invalid purch_date and not invalid deliv date gt update gt ext purch_ date stddate purch date gt ext deliv date Sstddate deliv date gt xeq We have now converted all the J2 yymmdd dates to a ccyymmdd format and added the correct century to the date Case 2 X6 yymmdd Data to X8 ccyymmdd The following Suprtool task shows how you can generate a new file to put into a new database with dates in a different format Consider the deliv date and purch_date fields of the D Sales dataset Database STORE DBOLD ACCOUNT D SALES Detail Set 5 Entry Offset CUST ACCOUNT Z8 1 M CUSTOMER DELIV DATE X6 9 PRODUCT NO Z8 15 M PRODUCT
3. STExport Commands 251 Form Command F Display the fields in a self describing file FORM filename If no file name is specified the fields in the input file are displayed The display shows the field type and field length in IMAGE notation An I1 field is a single integer Packed fields show the number of nibbles subtract one to obtain the number of digits Byte and zoned decimal fields show the byte length When showing the form of a self describing file STExport shows the byte offset of each field after the subcount type and sublength The first field always appears at offset one There are two types of self describing files One type is produced with Suprtool s Query output option You produce the other type with the Link output option The Form command shows the internal self describing version number enabling you to tell the difference A 00 00 Query Output Option Compound fields have a question mark for the type and the length is the number of bytes in the field Sort information about the file is missing Here is an example form listing form custfile File custfile SD Version A 00 00 Has linefeeds Entry Offset CHARACTER X5 1 length is five bytes ZONED Z5 6 room for five digits INTEGER Il 11 single integer DOUBLE 12 13 double integer PACKED P6 17 room for five digits QUAD I4 20 eight byte integer REPEATINT 26 28 compound field LOGICAL K1 34 single logical DBLLOG K2 36 doub
4. ccceeeeeeeeeees semicolon means multiple commands Separator Cates ce ceeeceseeteeteereeeeee serial vs chained read 0 eceececseeseeseeeeseeeeeeeeeeeeeees SOSSION WAEREA session mode Set Albastre eiieeii isea Set Arithmetic sis ol eek oann n aee Suprtool Open 5 7 Set BlocksiZe sssini eniinn K E E EE 176 Set Buffer os Set command STEXport c ceceeeceeceecneeeceeeeeees 254 Set command Suprlink 0 0 cee ceceeeseeteeteeeeeeeeeee 304 Set command Suprtool 174 Set CurrencySymbol ccceeceeeseceeeseeseeseeseeeeeee 177 Set Dates tis cte eatin ce Nevis tee heat 178 179 Set Date Cutoff cccccecseeseesteeeeeeseeee 52 53 177 Set Date Forcecentury ies dos 178 Set DecimalSymbo cceceeceeeeeeceensenseeseeseeneene Set Defer s i csiesesicoue eeke eoe aeaee NEES Set Dumponerror Set EditStoperror a S t Eofread a sironnan ie iei n E a Set Fastread aae aea Ascites Ses lak ease cee Set Filecode ne Set Firstrec eeseseesssesesseeeseseesesesesseresseeeseseeesesesseee Set Hints aa era AA eee Set Ifcheck Set Ignore Set Itemabbreviatedate 0 cece cececeseeteeeeeeeeeeeee Set Labelledtaperewind i Seti Limits saii asoida e ei i aalas Set List POcio enii iii eS Set Lock Set Mapped sirenenet e eiaa iE set name parameter escent Set NLS woe Set Openmode Set Progress Set Prompt Suprtool
5. Bourne and Korn Shells See Configuring Different Shells above for a discussion on the files that are automatically executed by the Bourne and Korn shells The easiest way to change the two PATHs for all the users on your machine is to logon as root and add these two lines to the file etc profile after any existing PATH or MANPATH statements Running Suprtool 39 PATH S PATH opt robelle bin MANPATH SMANPATH opt robelle man Remember to delete any PATH or MANPATH settings in etc d profile so that new users do not override your changes You also have to warn existing Bourne and Korn shell users to change the profile file in their home directories C Shell See Configuring Different Shells above for a discussion on the files that are automatically executed by the C shell The easiest way to change the two PATHs for all the users on your machine is to logon as root and add these two lines to the file etc csh login after any existing PATH or MANPATH statements set path Spath opt robelle bin setenv MANPATH SMANPATH opt robelle man Remember to delete any PATH or MANPATH settings in both etc d login and etc d cshre so that new users do not override your changes You also have to warn existing C shell users to change their login and cshrc files in their home directories Dynamic Loading Suprtool dynamically loads the required Eloquence and Oracle routines on startup Suprtool requires two Eloquence libraries namel
6. By default STExport formats floating point fields into either a fixed number or into scientific notation Which notation STExport chooses depends on the value of each field in each input record You can force STExport to choose either scientific or fixed notation and the number of decimal places for all floating point numbers You cannot specify these options for a specific field or make them different for 32 bit versus 64 bit floating point numbers Fixed Format Use Floating Fixed to force all floating point numbers to appear in a fixed format You specify the maximum number of digits to the right of the decimal point If you specify Floating Fixed STExport does not remove trailing zeros from the formatted numbers If you specify Columns Fixed all floating point values will be aligned along the decimal point Scientific Format Use Floating Scientific to force all floating point numbers to appear in scientific notation You must specify the number of digits to the right of the decimal point The Scientific option formats the number with all significant digits to the right of the decimal point followed by the exponent e g 0 47832E 10 Notes Both the Fixed and Scientific options attempt to round the number to the specified number of decimal places within the maximum width for each floating point data type If STExport cannot format a floating point field in the specified number of decimal places the number appears as asterisks
7. Default repeat the previous command Commands are numbered sequentially from 1 as entered and the last 1000 of them are retained Use the Listredo command to display the previous commands You can repeat a single command do 5 a range of commands do 5 10 or the most recent command whose name matches a string do list If you want to modify the commands before executing them use Redo or Before Examples listredo o do previous command again 39 do command line 39 again 5 8 do command lines 5 to 8 again link do most recent Link command grep do last starting with grep grep job do last grep job command job do last containing job 2 do command before previous 7 5 do by relative line number 5 do command lines 5 to last D O O O OnO OO O Notes The Do command cannot be abbreviated Persistent Redo Redo commands can be saved in a permanent file and can therefore be used from another session You can use the Set redo command to specify a filename to save your redo commands Please see the Set Redo command for details 306 Suprlink Commands Suprtool Open 5 7 Exit Command E Suprtool Open 5 7 Exit Suprlink in one of three ways By default perform the current linkage task if any then leave Suprlink Users are often frustrated when they exit Suprlink after specifying part of a task and Suprlink starts processing the task Use the Abort or Suspend options to exit Suprlink con
8. Duplicate Output Files If the output file already exists and you haven t requested the Erase or Append option Suprtool has to decide what to do This is how Suprtool Open handles duplicate output files e In Suprtool Open the duplicate output file processing takes place at the beginning of a task in Suprtool MPE it occurs at the end e If Suprtool Open is in batch it purges any existing file with the same file name Suprtool MPE chooses a new output file name of the form OutputNN If the Suprtool Open task is on line it prompts the user to purge the file e When Suprtool Open purges a data file it always deletes any associated Sd file even if the output option is not Query or Link Classic Reals Suprtool Open does not support Classic real numbers real or long If you are porting data files from MPE to Linux or similar OS you should first convert any Classic floating point numbers to their IEEE floating point equivalents You can do this by using the Extract command on Suprtool MPE 44 e Running Suprtool Suprtool Open 5 7 Suprtool Open 5 7 Ssuprtool gt base sample gt get customer gt define ieee credit rating 1 4 ieee gt extract cust no gt extract name first gt extract name last gt extract ieee credit rating credit rating gt out mpefile gt xeq The Classic and IEEE floating point formats are not identical Be sure to check the IEEE values after converting them from Classic floati
9. Output Erase option Output Key option a Output Link Option eee eeeeteteeeeeeeeeeee Output Num Option 00 eeeeeeeeeeeeneeeeeeeeeeeees Output Num Data option 3 Output Num Key option c ececeeeseeseeteeteeneeeeee Output Num Query Option s sseseessesesseseessseseseesesee Output PRN Option ceeeeeecceeceeceeeeeeeseeseeneeee Output Query OPtiON ee eeeeceeceeceteeteeeeseeseeneeee overpunches not used eeeeeceeceeceteeseeseeseeseeneees P packed constants cceeecescecceseeseeececeeneeneeneeeseess packed fields maintaining the sign 4 packed decimal fields ceceeeeseseeeeeeeeeeteeees packed decimal illegal digits cceeeeeeeeee page headings in List eee eeeecseeeeeeeeeeeeeeees parentheses oe ececeeeeseeeecseceeceeeeeeseeseeseeeeens 123 332 Parm 64 in Suprlink password in batch oo eecececeseeteeeceeceeseeneenseeseees password parameter cece sseecreeeeeeeeeees password upshifted ccececeseeseeseceeeseeseenseeeeseees path default for Suprtool 0 eee eeceeeseeeeneeneeeeees paths IMAGE detail datasets pattern matching eee Pausing for Usei nesrin etess PC files oo PCL option Set List 152 185 percent sign 327 333 Performance ses ies tevstv dco mo iore hii iat ia E 60 356 Index Performance considerations Suprlink 0 280 Performance Eloquence cceceeeees perform
10. Progress SET PROGRESS Percent number Minimum number Initial amp Defaults Percent 5 Minimum 50000 The Set Progress command is used to turn the Suprtool progress report feature on or off The PERCENT value specified tells Suprtool by which percentage increment to report the progress messages of any given input or output phase The allowed range for set progress is from 0 to 25 the default is every 5 percent If the PERCENT parameter is not specified then the next parameter is considered to be the PERCENT value This is to remain compatible with some earlier versions of Suprtool The MINIMUM value is the minimum number of records that an input file must have in order for the progress reports to be printed out If the MINIMUM value is set to 15000 then the input file must have at least 15000 records or else progress messages are not printed out for the entire task This value allows the user to turn off progress messages when reading smaller files The default value is 50000 records To always print progress messages just set the minimum value to 0 Suprtool does not produce any progress messages under the following conditions Set Progress is zero Output is to stdlist via the Output or List commands The input source is an SQL database The number of records from the input source is less than the minimum value Suprtool checks whether or not to print a progress message at the end of each buffer Consequently not all pro
11. is faster than gt if Slookup cust table account and status 10 because Suprtool can evaluate status 10 faster than lookup When the status is not 10 Suprtool knows the record will not be selected therefore there is no need to do the lookup Null fieldname The If null fieldname command selects any rows that have null values in them This feature is available only for SQL databases and only on columns that allow null values gt if Snull SALESTOTAL If you want to find only those values that are not null you can add the NOT keyword in front of null gt if not S null SALESTOTAL Constants This section describes numeric and string constants See also Date Selection Numeric Constants Numeric constants are not enclosed in quotes Numeric constants may be just simple whole numbers e g 5 0 56 10004 or they may have a decimal point e g 5 0 0 56 99 9 1 4 IEEE numbers may also have a scale factor e g 5E 5 0 01E 4 Over punches for the sign are not required or recognized in Suprtool Always enter 11 as 11 not 1J fora DISPLAY field String Constants String constants are delimited with double or single quote marks That is either VANC or VANC Any characters within quotes are not upshifted If the constant is shorter than the field to which it is being compared the constant is padded with blanks String constants are expected for fields of type BYTE U or X but numeric
12. is used to complete a subscript or a selected range of record numbers Right parenthesis always comes with left parenthesis Means Percentage In the Numrecs command use to indicate the number of output records as a percentage of the input file size gt numrecs 10 I Means Range of Records Slash in the Input and Get commands means a range of record numbers gt input cat dog mouse 1000 2000 Means Range of Fields Backslash in the Extract command means a range of fields gt extract account rating Suprtool Open 5 7 Glossary of Terms 349 Index measa LiStic ccccc seve chacessdecestestevssestesvoendbscoassadecseecees 332 means start parameter 0 cee ceceeceseeseeeeseeeeeneeee 332 for O S commands cececcesceeeeeeeeceeceecetseeeeenes 331 means end parameter ceeececeeceteeteeteeteeeeeeee 333 for shell commands 0 0 0 eeeeceeeneeecneeeeeeeneeeeeeens 40 start command line comment 0e 221 286 for HP UX commands ce eeeeeeeeeeeeeeeeeteeeeeees 332 for O S commands cceseeeeeeeeeeeeteeeeeeteeeeeeeeees 332 7 end command line comment eee 221 286 prompt for database password ccceeseeeeseeeees 68 means alphanumeric pattern cceceeseeseereeee 331 matches anything 0 0 eee eeceecseceteeseeseeseeseeeeeee 331 SxOUtcount STEXPOLt ee eeceeeeseeeceeceeceeeeeaeenes 218 me
13. 10 0 standard octal format Result 000012 10 0 negative number in octal Result 37777777766 100 h hexadecimal Result 0064 In Double format calculator prints the double result as two octal numbers the way they appear in DEBUG The first number represents the high order 16 bits and the second number represents the low order 16 bits 10 d treat result as two 16 bit octal words Result 000000 000012 1000000000 d high order 16 bits are no zero Result 035632 145000 10 d note negative value 2 s complement Result 177777 177766 In ASCII format up to four characters are printed in Hex Decimal and ASCII display format 2020 a Result 2020 32 32 20161 72145 a Result 2071 32 113 q 7465 116 101 te In binary format the high order 16 bits are examined If these bits are not zero they are printed as two groups of eight bits A one 1 means that the bit is on and a zero 0 means that the bit is off The low order 16 bits are always printed as two groups of eight bits 10 b high order 16 bits suppressed Result 2 00000000 00001010 10 b note negative value 2 s complement Result 2 11111111 11111111 2 11111111 11110110 1000000000 b high order 16 bits are non zero Result 2 00111011 10011010 2 11001010 00000000 Input Format The calculator supports different input formats for numbers Octal values are prefixed with a percent sign and hex value
14. Glossary of Terms 343 344 Glossary of Terms Errors Errors are messages printed by Suprtool indicating a fatal problem in the task which prevents it from completing Error messages are further described in Appendix A Field A field is a portion of a record When you access an Eloquence dataset this makes Suprtool aware of the Eloquence fields in the dataset When you access an SQL database with the Select command Suprtool is aware of each column name fields and columns are synonymous in Suprtool The Define command allows you to define new fields or redefine existing fields to have new sizes or data types Use Define to get at bytes of interest within existing fields and to give them an appropriate name Then you can refer to the defined field in other commands e g Extract If etc The following commands all contain a field gt if balance gt 10000 gt sort account gt extract a b Filename A filename is any valid filename and is used in Suprtool commands to identify the input source specify the output destination or to specify an external file to be accessed in the Table or Use command File names may be enclosed in quotes The following commands all contain file names gt input xyz gt output out gt use supruse gt input 872xyz Strings Suprtool expects all strings to be surrounded by a pair of single or double quotes or When Suprtool knows the length of a field it pads strings with t
15. R4 but internally Suprtool will treat as IEEE which is how Eloquence stores and treats the numbers This will also include Self Describing files as being the input source Suprtool will still not allow the definition of a Real or Long datatype Consequently STExport will now support items in SD files that are condidered R type however it correctly will map them to IEEE Recover SET RECOVER ON OFF This command has no effect in Suprtool Open Redo SET REDO filename Initially none Commands that you enter at the Suprtool prompt are saved in something called the redo stack You can recall commands from the redo stack using other commands such as Before Do and Redo By default the redo stack is stored in a temporary file and discarded as soon as you exit Suprtool This temporary stack is not preserved across Suprtool invocations Set Redo allows you to assign a permanent file as the redo stack The redo stack is then available for future Suprtool invocations To assign the Myredo file as a persistent redo stack enter Suprtool Open 5 7 Suprtool Open 5 7 gt set redo myredo If the file does not exist Suprtool creates it If it already exists Suprtool uses it All subsequent commands are written to the persistent redo stack The setting is valid for the duration of the Suprtool session As soon as you exit Suprtool the setting is discarded Next time you run Suprtool you will get the temporary stack If the file
16. Suprtool Open 5 7 Suprtool Open 5 7 Calendar The Calendar attribute is provided for users who have fields containing the 16 bit MPE Calendar date format as an unsigned logical value with seven bits for the year of the century bits 0 6 followed by nine bits for the day of the year bits 7 15 The Calendar date format only supports dates up to the end of the year 2027 PHdate and PHdate8 The PHdate and PHdate8 attributes are compatible with the COGNOS PowerHouse date format If the data type is J1 or K1 the date is stored as a LOGICAL value with seven bits for the year of the century bits 0 6 four bits for the month bits 7 10 and five bits for the day bits 11 15 If the data type is J2 or K2 the date is stored as yyyymmdd PHDate and PHDate8 date formats are similar however PHDate values for the year range from 0 99 whereas PHDate8 year values are from 0 127 A year of 0 in PHDate could mean either 1900 or 2000 depending on user applications A year of 0 in PHDate8 means 1900 and 100 means 2000 The PHDate8 date format is found in PowerHouse version 8 19 and higher ASK The ASK attribute is compatible with the ASK manufacturing software ASK uses a special date format stored as a single integer or a single logical i e J1 or K1 in IMAGE This date is relative to January 1 1973 yyymmdd The yyymmdd attribute is similar to yymmdd except that the first digit denotes the century If the first digit is a 1 o
17. Suprtool does not automatically align user specified headings with the data columns We suggest specifying heading strings with the same length as the fields they represent while taking into account the space between the data columns In our example we enter one column heading per line using Suprtool s continuation character amp standard heading e E E mag field is X12 Account amp field is Z8 First Name field is X10 Last Name field is X16 We included one space between fields Note that an extra space was needed for the Account heading it is an 8 digit field but we used 10 characters Because cust account is a zoned decimal field an extra space is required for the sign Printing Mailing Labels You can print mailing labels by combining the Extract command with the List Oneperline command We assume that each mailing label starts with two blank lines followed by the customer name and address followed by another blank line The Suprtool commands to produce the labels are as follows gt select from customer input customers gt extract first field gt extract second field gt extract customer_name name first gt extract street_address 1 three lines of address gt extract street_address 2 gt extract street_address 3 gt extract last blank field gt list oneperline noname noskip norec gt xeq The line extract 36 Quick Start Guide for Suprtool S
18. gt output result gt xeq String of Digits If you have a byte type field that consists entirely of digits and you want to use this field as a numeric field you need to define a new display field on top of the existing field For example suppose your data looks like the following where the customer account number is stored in the 8 digit byte type field at the start of the record 20476789 rest of customer record To find all customers with an account greater than 20470000 you would do the following gt select from table gt define accountnum account 8 display gt if accountnum gt 20470000 gt output result gt xeq Selecting by Date The following section on dates does not apply to SQL columns only to defined fields and SD fields Disc files usually store dates as numeric or character fields you can use the Define command to isolate the field 24 Quick Start Guide for Suprtool Suprtool Open 5 7 Before Suprtool can use a date field it has to know the format of a particular date field Use the Item command to specify the format For example to tell Suprtool that the item purch_date is a date field with a format of yyyymmdd e g 20040319 you would use gt define purch date 11 8 8 bytes starts in byte 11 gt item purch date date yyyymmdd date format In the following date examples we show the Define and Item commands in each example In practice however you only need to use these comma
19. gt xeq hold Task 3 Delete the records gt input datafile SLE not Slookup duptab rec gt output result gt xeq Data in disc files often has an implied number of decimal places For example dollar amounts usually have two implied decimal places for the cents In this case the number stored is scaled by a factor of one hundred e g you would enter 10000 to represent 100 00 gt input saledata reclen 70 nolf gt def total_sales 40 4 integer gt if total sales gt 99900 gt out result gt xeq find sales gt 999 You can use Suprtool s Item command to identify defined fields that have an implied number of decimal places Once you do this you can then enter regular unscaled numbers For example to enter five cents use 0 05 to enter 100 00 use 100 Ifa field is a dollar and cents amount scaled by 100 use the following to tell Suprtool about the decimal place gt item total_sales DECIMAL 2 With the Item command the previous example becomes more understandable saledata reclen 70 nolf gt def total sales 40 integer gt item total sales decimal 2 gt if total_sales gt 999 gt out result gt xeq gt input find sales gt 999 Converting Numbers Suprtool Open 5 7 There are several ways to convert binary numbers e g I2 P8 into human readable ASCII form You can use STExport s Output ASCII or Output DISPLAY if you want to convert all numbers Quick Start G
20. prints a summary of functions For a detailed description of the calculator and its options see the Suprtool manual Control Y You can interrupt a Suprlink task with the Control Y key hold down Control while striking Y Suprlink responds by telling you how far it has gotten IN OUT etc and asking if you wish to stop Hit the Return key to continue or type YES to stop the task 302 Suprlink Commands Suprtool Open 5 7 If Control Y has no effect then try Control C which is the default interrupt setting for non MPE Operating systems See the section on Control Characters and stty in the Running Suprtool chapter for notes on how change this default Suprtool Open 5 7 Suprlink Commands 303 Before Command B 304 Suprlink Commands Repeat any combination of the previous 1000 command lines with or without editing BEFORE start stop string ALL Default redo previous line BQ redo without change The Before command allows you to modify the commands before it executes them If you don t need to change them use BQ or Do The Before command uses Qedit style Control characters for modifying the commands The default mode is to replace characters To delete use Control D and to insert use Control B If you prefer HP style modify D R I and U use the Redo command instead of Before Examples 11 fd fd not found Before redo most recent command L f last command
21. regular version of Suprtool AMXW refers to the version that does NOT use the ROBELLELIB_ IMAGE variable to find and load the IMAGE intrinsics Sort Performance Suprtool Open uses its own set of sorting routines These routines are generally faster than the sorting algorithms provided with software tools and SQL databases Suprtool Open 5 7 Because sort performance varies a lot from application to application we recommend that you test Suprtool Open in your own environment You can improve the performance of sort operations by moving the sort workspace to a different physical disk drive than the input file uses You can move the sort scratch space by setting the TMPDIR environment variable to a directory that resides on another physical disk drive provided you have read and write access to that directory export TMPDIR var tmp sortscratch Oracle Performance Suprtool Open provides you with easy ways to let either Oracle or Suprtool do most of the work Whether it is best to use Oracle or Suprtool depends on your specific machine database and application You can use the Select command to force Oracle to do much of the processing or you can use Suprtool to do the work In our testing Suprtool consistently sorts two to four times faster than Oracle Your performance improvements may be different from ours so we recommend that you take some common tasks and try them with both tools Here is an example of sorting with Oracle
22. 197 198 Suprtool Commands There are some cases where Suprtool needs to use the lock descriptor when doing a dblock mode 5 which is an unconditional Item Level lock however it may appear as if it is doing a set level lock however since Suprtool could be working against different Image call interpreters Interactive SET INTERACTIVE ON OFF Initially depends If you run Suprtool from a session Set Interactive is On If you run Suprtool from a batch job or with Stdin or Stdlist re directed Set Interactive is Off When it is On Suprtool waits for answers to questions and continues processing even if there are errors When it is Off Suprtool aborts on any error assumes the correct answer to any question and generally acts as if there is not an intelligent being typing in the command Suprtool chooses the correct answer which allows the task to continue In most cases this is the default answer However there are cases where Suprtool picks a different answer from the default For example an output filename erase command has a default answer of no but with Interactive Off Suprtool uses the answer yes However if you run Suprtool on a Remote Session that was created from a batch job Set Interactive is On even though you are NOT interactive If you wish to have proper batch error processing your first command after starting Suprtool should be Set Interactive Off Set Interactive Off is also useful when automatin
23. Error Value of print state in the control buffer is incorrect 4 Error Could not open STDIN file 5 Error Could not close STDIN file 6 Error Could not successfully call System Call 7 Error Invalid total type was specified 8 Error Failure to fwrite to stdin file 9 Error Unable to get ROBELLE environment variable 10 Error Unable to get ROBSUPR environment variable 11 Error Suprtool errors encountered Suprtool2 Error Messages 341 Glossary of Terms Commonly used Terms 342 Glossary of Terms Batch Suprtool operates in session mode or batch mode In batch any error message causes Suprtool to quit Warning messages do not cause an abort If an error occurs Suprtool returns a non zero value as its result In batch mode Suprtool does not prompt for missing information as it does in session mode For example if the output file is a duplicate file name Suprtool automatically answers yes to the question asking you to purge the existing file Pseudo Batch Tasks During a canned on line task such as passing usefiles to Suprtool you can fool Suprtool into responding YES to operational questions For example if one of the canned tasks requires Suprtool to output myfile erase then Suprtool asks the question ERASE all records from this OUTPUT file no You can avoid typing yes in response to this question by invoking Suprtool with suprtool lt filename Blocksize The b
24. PRODUCT PRICE J2 23 PURCH_ DATE X6 27 SALES QTY J1 33 SALES TAX J2 35 SALES_TOTAL J2 39 Capacity 611 13 Entries 15 Highwater 15 Bytes 42 You want to convert to a date format with room for a cc at the beginning of the deliv date and purch_date Suprtool Open 5 7 Suprtool Issues and Solutions 57 Database STORE DB ACCOUNT D SALES Detail Entry CUST ACCOUNT Z8 1 M CUSTOMER DELIV DATE X8 9 PRODUCT NO Z8 DF M PRODUCT PRODUCT_PRICE J2 25 PURCH_ DATE X8 29 SALES QTY J1 SALES TAX J2 39 SALES TOTAL J2 43 Capacity 608 16 Entries 0 Highwater 0 Bytes 46 In order to convert these dates you need to be able to put either a 19 or 20 in front of the yymmdd date depending on the value of the year Before you can do either of these you must confirm once again that you have no invalid dates gt base store dbold gt get d sales gt item deliv date date yymmdd gt item purch_date date yymmdd gt if Sinvalid deliv date or invalid purch_date gt list gt xeq Once you have confirmed that there are no invalid dates you can start converting the dates that you have Because there are two date fields in this dataset you must be careful to add the appropriate century for the proper field For this example assume that if a year is less than 1950 then the century should be 20 You can easily convert each date by processing each field separately by using an intermediate self describing file gt base s
25. Set Sortfast 0 cece Set Statistics STExport Set Statistics Suprlink oe ec eeceeeeeeeneeecteeneees Set Statistics Suprtool oo eeeeeecseeeeeecneeeceeeeeees Set ThousandSymbol x Set VALS UD sass cdevevssnccescesesycsGeus ee E i A Set Varsub STEXport ccccececseeseeseeeeeeeeees Set VarSubCompat Set VarSubDebug ce eeeeeeeeereeeeeee Set ZonedFix STEXPort cceececsceseeeeteeeeeeeeee shell commands shell script aseene ra Mal ee Sign command signed function Simple selections niinniin aioe Single QUOTES eran a areae EEEE R slash range of records a Software Research Northwest cccseseseseereereeee 145 SOM PLOCESS seeds a e e S 90 233 291 SOFt break ceiiriecssisiiinesiiiissirsieii siisii 30 sort break totals 203 Sort command ceeeeeeeteeee 196 sort information not retained 00 eeeseseeeeeeeeeeeeee 86 SOEKE Ss cse teh aT e anaes 278 Sortfast Set Option ceeeeeeeeeereeeeeeeeeeee Sorting files 3 cee vesspcekeliacsest ale ree Sorting records cceecesseseseesceseeeeceeesceecneeeceeseeeeens Spaces command spaces removing special Characters cceccesessesscseceeceenseeseeseeseeseees 329 Special Characters 0 c ccecesesecseceeceenseeseeseeseeneees 131 Index 357 special string test 0 eseseecsereeecneeeceecneeeceeeeeees 130 specifying input spool file CLLOLS ecececesseseeteceececesenseeeeseeseeneees SQL database Allbase roWS
26. Similarily the edit function will attempt to place the dollar sign correctly in most cases For example Suprtool will not format data in the form of Suprtool Commands 127 128 Suprtool Commands 123 50 Suprtool does attempt to fixup these cases and would format the data in the following manner 123 50 Overflow and floating dollar If the number of digits in the data is equal to the number of placeholder dollar signs then the dollar sign is dropped and not added to the edited field 12345 50 99 would result in 12345 50 Set CurrencySymbol If Set CurrencySymbol is not equal to then after the formatting has been applied whatever symbol s are defined within the set command are used to replace the symbol in the data For example if you have the Currency symbol set as CDN gt set currencysymbol CDN Suprtool will replace the after the edit mask has been applied with CDN provided there is room to the left of the dollar sign It is recommended that if you are using multiple characters for the dollar symbol that you leave enough characters to the left of the symbol For example if the CurrencySymbol is defined as CDN then you should leave two spaces to the left of a fixed dollar sign definition If there is not enough room to put in the currency symbol then the dollar symbol is blank Overflow and limits An edit mask is limited to 32 characters in total for both numeric and byte type fiel
27. Suprtool Open 5 7 User Manual by Robelle Solutions Technology Inc Suprtool Open 5 7 Table of Contents 1 Program and manual copyright 1981 2015 Robelle Solutions Technology Inc Permission is granted to reprint this document but not for profit provided that copyright notice is given Qedit and Suprtool are trademarks of Robelle Solutions Technology Inc Oracle is a trademark of Oracle Corporation Redwood City California USA Other product and company names mentioned herein may be the trademarks of their respective owners robelle solutions technology Robelle Solutions Technology Inc Suite 372 7360 137 Street Surrey B C CanadaV3W 1A3 Phone 604 501 2001 Support 289 480 1060 E mail sales robelle com E mail support robelle com Web www robelle com 2 Table of Contents Suprtool Open 5 7 Table of Contents Table of Contents 3 Welcome to Suprtool 15 Tint OCU CH OM aia ce AE EE E EAEE A A TAE 15 Suprtool Components seiras e e A A E E r E EEan 15 STEXport Data Export Utility sr h ee i aE a E e S 15 Suprlink Multidataset ACCESS 0 0 ehnan a E 15 DOCUMENtAtION Sanese 0 Sa terse si cons eels E R reve lous ae ee a A hese 16 IA KOTE LETO DESEE EPE OE TEE E A A OE above teat Sonne canteen image E EREE 16 Suprtool Version 5 7 18 Highlights in Suprtool Se Teose rennin eiiie eeo iai EEE EET e ESE PESE EEEE EEEE Sh 18 Installing Suprtool 19 QV ET VIC Wisi SEE CEE EE EREE CER EEEO E E EAN
28. after entering the Select command by itself on a line The entire command gets sent to the Select command parser after terminating with two slash marks or a blank line You might realize greater performance gains with the Select command if you specify only the columns that you need in your output file for either tables with many items or when you need only a couple of items from a given table The following Select command gt select coll col2 col3 from user account emp may be faster than gt select from user account emp Your mileage may vary Suprtool Open 5 7 Set Command S Enables or disables certain operating options within Suprtool These options are not reset by Xeq or Reset commands Suprtool Open 5 7 SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET ALLBASE ROWS number ARITHMETIC CLASSIC IEEE has no effect in Suprtool Open BASECLOSE ON OFF not supported in Suprtool Open BLOCKSIZE size has no effect in Suprtool Open BUFFER size has no effect in Suprtool Open CLEANCHAR lt string gt CURRENCYSYMBOL lt string gt DATE CUTOFF number DATE FORCECENTURY ON OFF DATE IFYY2000ERROR ON OFF DATE MAPTOPHDATES8 ON OFF DECIMALSYMBOL lt string gt DEFER ON OFF has no effect in Suprtool Open DUMPONERROR ON OFF EDITSTOPERROR ON OFF EOFREAD ON OFF has no effect in Suprtool Open FASTR
29. becomes gt if mytable key In order to rectify this all that needs to happen is you Escape Out the Environment Variable from being resolved by changing the script to be gt if Slookup mytable key When you do this UC4 and HP UX for that matter now knows that the lookup is not a token that needs to be resolved as an environment variable but the lookup is a literal String Byte Functions Suprtool has a number of functions that work on String Byte type fields In all cases 62 Suprtool Issues and Solutions Suprtool Open 5 7 the target and source of these functions are byte type fields and are treated as strings internally to Suprtool TRIM Works on byte type fields Purpose is to remove spaces from the beginning and the end of a field If Usage gt if Strim last_name ARMSTRONG This means that Suprtool will qualify ARMSTRONG ARMSTRONG ARMSTRONG etc Extract Usage target Byte type fields Example DEF lastname 1 16 byte EXT lastname trim last_name Data Examples Before and After gt IN STRINGS NEIL GREEN 0 gt OUT SNULL 0 LASTNAME ARMSTRONG ext lastname Strim lastname gt IN STRINGS NEIL GREEN 0 gt OUT SNULL 0 LAS TNAME ARMSTRONG LTRIM Works on Byte type fields Purpose is to remove spaces from the left side of the field Suprtool Open 5 7 Suprtool Issues and Solutions 63 If Usage if S ltrim first_name NEIL Extract Usage t
30. cceeeeeeeeeeceeceeeeeeees 81 Quick help uc cece Quiz report writer quote characters Quote COMMANA a eenas erare E quotes double ccccecesesssseeceeceeceseeseeeeeseeseeneees quotes none ie quotes SINE eee eceeceseeeeeseeeeceeceeceseeseeseeseeneeneees R random sampling sec seeeeeeeetereeeeeeeeeeeee 120 141 Tange Of fel ds ses ccsissi a ERS 97 range EXtracting ee eeeeeeceeeeeeeeeceeceeceseeseeecececeaeeaes 97 read nly mode secs its Mevarievactieereletinenis 183 reals CLASSIC aea a S aeseers oceans iaes record format output record length Record Mode List option ececeseseeteeteeteeneeee 156 record NUMBET ou cece ecsecccesceseecceeseceesecesseeeeeseeeesee 140 record number selection c ccccccsccesseeseeeeees 119 140 Suprtool Open 5 7 record number IMAGE cccceccccccssceeesceeeseeeeeee 119 record number Output record number XSORT ccccccsccccssceesseeeeseeeenee 181 records number of qualifying ee eeeeeereeee 166 Redo comman c cccecceeee 169 252 302 Redo number of commands Redos Setane reduced output Reflection 49 relative dates 133 relative field definitions cceceeeeeeseeeeceeceeeeeeeees 76 Remote Oracle Database ce ceeeeeeeesereeseeeeeeeee 160 removing spaces oF repeated fields 2 seassaneenctc adnan ies TEPOLUS E E 2ded setssasues Sosaiens ET Reset command
31. gt if table 2 gt if table 8 Character Subscripts Character string fields may have 1 2 or 3 subscripts after them Character string fields are allowed more than one subscript value If ADDR has the form 5X30 it consists of 5 substrings of 30 characters each ADDR 1 is the first 30 character sub item of ADDR ADDR without subscript is the same as ADDR 1 ADDR 2 is the second 30 character sub item of ADDR ADDR 2 4 is the second sub item starting with the 4th byte and extending for the remainder of the sub item 27 bytes ADDR 2 4 6 starts at the same location but extends for only 6 bytes Suprtool Commands 141 142 Suprtool Commands If NAME has the form X50 it is not a repeated field NAME is the same as NAME 1 NAME 1 4 6 is the first and only sub item starting at the 4th byte and extending for 6 bytes NAME 1 10 is a field that starts at the 10th byte and implicitly extends to the end of the field for the remaining 41 bytes gt if name 1 4 6 HAWAII gt if addr 3 VANCOUVER B C gt if addr 3 11 20 B C pattern matching Numeric Expressions Bit Selections The If command can extract and test any series of one or more contiguous bits in a field Suprtool allows bit extracts only on Integer or Logical fields of two bytes in length one 16 bit word To do a bit extract from another type of field first use Define to redefine the data as a two byte Logical field
32. lt gt or gt gt item enddate date yymmdd gt if enddate gt Sdate 4 21st century date Error Cannot use a date beyond 1999 for this format Suprtool returns this error by default but you can override it with the following set command gt set date ifyy2000error off This tells Suprtool to allow the previously described relative operations and suppress the error message While you can override the error checking the behavior of today and date is not changed How Do I Use Today and Date with yymmdd Dates If you need to have Suprtool select dates in YYMMDD format with Today or Date you need to use one of the following solutions Change the date storage format to include the century in all datasets and data files so you can use the following item command gt item invoice date date CCYYMMDD Use the stddate function that adds the century component to dates in a cecyymmdd format in a J2 container Also see Case 1 Converting a J2 Date from yymmdd to ccyymmdd on page 56 and Case 2 X6 yymmdd Data to X8 ccyymmdd on page 57 for more specific details on converting two digit year date formats into four digit year date formats aammdd Date Format The aammdd date format was developed by James Overman of HP for use in the MM3000 product This format is only available for the X6 data type The aammdd format is similar to yymmdd but the year portion of the date use a combination of numbers an
33. set varsub o call _suprtool2 amp MyControl i n amp MyControl i assign_cmd set varsub on amp MyControl i tr call_suprtool2 amp MyControl assign_cmd exit amp MyCon ol call _suprtool2 amp MyControl Installing the Suprtool2 Interface Installing There is no need to Install anything for the Suprtool2 Interface We provide two files for PA RISC machines Suprcall o and Suprcall sl a simple object file an a shared library The PA_RISC files can be found in the lib directory whereever you have installed the Robelle software typically opt robelle lib The same files for Itanium are found under lib itanium We provide three files named suprcall o suprcall sl and suprcall so Either can be used depending on your linking and or naming preferences and conventions Just link it in with your Cobol or C program 340 Installing the Suprtool2 Interface Suprtool Open 5 7 Suprtool2 Error Messages Error Numbers Suprtool Open 5 7 Suprtool2 returns error numbers in the status parameter of the workspace For most errors a message is also displayed on stdlist The following summarizes the form of Suprtool2 error messages and the error numbers returned Messages On Stdlist Most Suprtool2 errors result in a message being displayed on stdlist 1 Error Version of the control buffer is incorrect 2 Error Priority value in the control buffer is incorrect 3
34. EXP niser in E E ER OE E E AN r 107 Extract Command EXT hri a ee i A ae 108 Constants oeie i E E O ete ct abet Goebel tease dans os ote Bi eee EAEN e aS 108 Ate as cn econ etree Rae O etek gh eae ies xa an eared edu Meee ined edb T 110 Range or Fields i226 the ele E ek wooed ath Ride Ria ane ae 112 Nuimeric Expressions 8 aa c ed bene iterate withthe a nia E A E R 113 Sub Total Funct peiner tec caseves ees es el tei E a EE EE RES E S 115 LotalBunction iiss ceseen e ection iS ein een ies Mtn eel adeno 115 Counter Function ta nn a sik hea A Racin i een sess RMA EE Ga 115 Stine EXPLESSIONS s ascscvssicesstesshaceasaeseluevecessacticcuvaceltedee EAEE ENE E NEEN 116 Splitting Variable Length Strings e eesseseeseeseseeseeeesseeessrsrssreeserstseesrsressenessesesseens 117 Cleaning Your Dataisscccvicessdssccsccsacacts CEEE ATE EESE NEE EAEE is 118 Unie printables acensir niie E EEE E AE ES aE Ea a Ria EAEE AES 119 Clean Command Syntax ispisiri cenieni e EESE VEE OEE AEs 119 Setting the Cl an Character rinii oeii neari aE AEE EEE E Eai 119 Cleaning a Field rse pincisinisiiei iiini css e EEE E o SREE VEEE ESEA EE ais 119 Cleaning Your data scisccsiicsesisisscvececsaceet Ee AAE E Ena VEE EAEE 120 Extr ct froma Tables sianie dee eae a E eee E E a wee 120 Data COnVversionivessces cet esen iis EEEE E OEE EE E R EAER 121 N mber Functions 0 sire e ein ee E aie E E E 122 Numeric to Byte Conversion onson ee e EE EEE EE EE A
35. Each STExport formatting command applies to all fields of a specific data type i e you cannot specify formatting field by field only by type For example all numeric type fields can be formatted the same The main data types that STExport identifies are Byte Type STExport assumes that character information is stored in byte type fields By default all byte type fields are surrounded by quotes and trailing spaces are removed Numeric Type The numeric data types are integer logical floating point packed and display STExport converts the internal representation of each data type into a string of ASCH digits By default all numeric type fields have a leading sign and are variable length Where appropriate numeric type fields are converted with a decimal point Floating Type All commands that affect numeric type fields also affect floating type fields In addition you can use the Floating command to specify the format and decimal places for floating type fields 1 e Classic or IEEE floating point numbers Introduction to STExport 235 Date Type If a field has a date format STExport does extra formatting By default dates are formatted into yyyymmdd e g 20001125 Formatting Commands Use the following table to determine which command applies to which data type Command Data Type Date date type Floating floating type Quote byte type Sign numeric ty
36. If access to the O S has been disabled via the Set Limits command these commands are no longer passed off If the user does not precede the command with a colon we assume that the invalid command was meant for Suprtool If a colon precedes the command we assume that the command was meant for the operating system On non MPE systems an exclamation mark can be used in place of a colon Output ASCII not allowed with Duplicate None Keys Not all processing options are allowed in all combinations The ASCII option of the Output command which reformats the output record does not work with Duplicate None Keys Dup None Keys assumes that the output record has the same data definitions as the input record Xxxx is not the search field of Yyyy This message is issued by the Chain command when the search field specified Xxxx is not an index into the dataset Yyyy The field specified must be an Eloquence search field When Suprtool detects an unusual situation that it should bring to your attention it prints a nonfatal warning message For example Warning No input data specified Warning DATABASE must be RESTORED if System Crashes The following list explains the most common warnings Not all sort fields were extracted The sort information will not be written to the output Link file This warning occurs when you gt output filename link and are sorting by a field but the field is not included in the list of extracted fields Suprli
37. Result 35 0 in the Output command means to write the sorted input file back into itself gt input myfile key 1 10 gt output input MPE only lt Means Less Than lt in the If command means is one field less than another field or constant value gt if balance lt 10000 By combining lt and you get less than or equals gt if balance lt 10000 gt Means Greater Than or Enter A Command gt is used for two purposes in Suprtool As the Suprtool prompt character e g gt Input actrec To mean greater than in an If command e g if balance gt 10000 Combining gt and gives gt for greater than or equal to lt gt Means Not Equals In the If command use the two characters lt gt to mean not equals gt if status lt gt 01 Means Matches Pattern In the If command use the two characters when you want to check a field for a pattern of characters For example to select records where the customer name contains the word THOMPSON somewhere use gt if name THOMPSON Suprtool Open 5 7 Suprtool Open 5 7 gt lt Means Mismatches Pattern In the If command use the two characters gt lt when you want to select records that fail to match a pattern of characters gt if address gt lt CANADAQ Means Match Anything in a Pattern The At Sign character is used in patterns to indicate that Suprtool should accept anything in that position For
38. The Decimal and thousand symbols are only single characters The currency symbol allows for four characters Numeric to Byte Conversion Suprtool has several ways to convert binary numbers e g J4 I2 P8 into human readable ASCII form You can use STExport or Suprtool s Output Ascii or Output Display commands Suprtool Commands 123 If you want to convert only some of your numeric fields you can use Suprtool s numeric conversion to convert binary fields to display fields For example here is a conversion of a J4 field to an Z18 field define mynumber 1 18 display get dataset extract some fields extract mynumber binary number output filename xeq You can also use the Edit function to format and directly convert to byte format Edit Function Suprtool can format fields using edit mask features similar to edit mask features of Cobol Suprtool employs two distinct types of edit masks one for byte type fields and the other for numeric fields The type of mask utilized depends on the source type of the field If the source field is numeric then the numeric edit mask logic is applied if the source field is byte type then the byte edit mask logic and characters apply The target field must always be a byte type field Placeholders and Format Characters An edit mask consists of placeholder characters such as 9 for a numeric column and format characters such as for the decimal place Sometimes an e
39. a AEE E A EEE E E EEEE E 49 REIES a EEEE E E E E EEE ETE 49 Suprtool and Self Describing Files eee eescescecseceeseeeeecesseceececeseeesaeceececeeeseaaeeeeessaeeseeeeeneees 49 Create an SD File from a Table cee ceeeesccceccecseceeseeeeeeeaeceeeeceseeeaaeceaeeceeseaeeeeeeenas 49 Create an SD File from a Data File cece cececsceesceeeeeesseceeeeceeecaaeceaeecnreseaeeeeeeenas 49 SD Files as MPU 2 cite acs ceckcs seve es e enne e aa aa e tdacserts javthesbebetsnbure 50 TaStin eS D Biles es E Sadvetececa ts EE E ogusdoassesadee coh AT E 50 Decimal Places and Date Formats ccccescececcecseceeseeeeeeesaeceececeeecaaeceeeecneeeeaeeeeeeenas 50 Extended Field Name Sie ata ca eit inne eet eld aA adele es 50 Restrictions of SD Files niee o Acc eee ia A vets ev bdo Dav eect ed henselae 51 Suprtool and Sortine Files seed he Red a ek beh etna een ai eeeee ea hve dba R A RA 51 Suprtool and Personal Computers 0 cceeceessecencecseeeesceeeeeeseceececeeeecaeceeeeceeeseaaeeeeeeneeeeeeeeneess 51 Downloading tothe PC ra eo ede a eet ict eet oe A acai 51 Decimal Places 4 oneto eee akc K ogee ee K ve DLT edad RaT 51 Spreadsheets raie Ai ee Bhd a PAG hens eee av alae ale aoe duels 52 Two Digit Year Solutions gies 2 sie i ee bene Maaco ARERO advice Rav E NN R 52 What If I Have Four Digit Years ceceescccecceeseceesceeseeesaeceececeeeeaaeceneecneeseaeeeereenas 52 What does Set Date Cutoff do oo cee ceseesseceneecneceeeeeeeecsaeceeeceseeea
40. address 1 gt ext address 2 Sclean address 2 gt ext address 3 Sclean address 3 gt xeq The above task will look at the three instances of address and replace the tab linefeed null and bell characters with a space If you want to just remove the characters all you need to do is set the CleanChar in the following manner gt Set CleanChar lt null gt This means that the clean function will remove the characters specified in the clean command but not replace with any character which effectively shifts the text to the left and pad the equivalent amount of spaces at the end Extract from a Table Suprtool has the ability to load data into a table via the Table command and extract that data out of the table using the Extract command The Extract command can utilize the lookup function to return data The syntax for the lookup function would look as follows gt extract target Slookup table name key field data field The Table name key field and data field are all defined by the Table command which must be input before the Extract command A classic example your boss comes to you with a list of new prices for certain parts and asks you to update the Part Master dataset Just load the new prices into a Table index by the product number prodno then Extract the price field from each record and replace it with a lookup on the table Here is the code gt table newprices prodno file bosslist da
41. on page 109 for more details Suprtool Open 5 7 Use Command U Specifies a file of commands to be executed as a group USE Q filename Database Date Items A usefile makes your task easier by allowing common commands to be specified once in an external file A common reason for usefiles is to isolate Define and Item commands for a database in one place This makes future changes easier and prevents mistakes In this example we isolate all Item commands for dates from our database in a Suprtool usefile gt use store suprtool define delivered deliv_ date define purchased purch date item delivered date yymmdd item purchased date yymmdd Dataset Field Definitions In the store database the street address is a 2X25 item Suppose that you always wanted to refer to the first and second part of the address with different names The following usefile would access the m customer dataset and define the two necessary fields gt use mcust suprtool get m customer define street address 1 street address 1 define street address 2 street address 2 Quiet Execution By default Suprtool displays the commands in a usefile as they are executed The quiet option is not used in the examples above so that you could see the actual commands inside each usefile Suprtool can execute commands quietly using the Useq command Nested Usefiles Usefiles may be nested In other words a usefile may use another usefile to a depth o
42. 144 Date Selectiomnasreere Ae seca e A E ORTE TEE E a 147 Long EXPresSiOns asee inerte E E EAE lemaeeeenpaabeds 152 Input Command M rea en En Mea EEEO EE EN EAE Siew 155 Item Comimand T kense E EE E RTO E ERE eee 157 Date Formats eeen Eee a E AOE ATEA a 157 Decimal Places x ascccte arete R E E TE E REG 160 NOTES aei ent pE EOE A E O TA A eee the 161 Key Command K rnn E N EE G O E EE nti 163 Link Command LIN sn EE REE EE EE E 165 List C mmand Ehee eee ee Se ee E 166 JLO a E 1 PPE E EEE E E N E E 166 LaserJet Listin E S enn ieran E EEE E ETE TEETE ES 167 Headings in Listings ceecceescesseceseeceteeeneeceeeecseceeneesecesaeceeeeceaeseaeeceeeeeeeeeneenneees 168 Simple Reports recece e E EE cede ctdesigeuscsdebanesbasoptecdutusstacvecdevecbets 169 DASE DEVOE ene E E TEE EEEN REEE nET EEKE REES 170 Fast Filen iniinis Ter E N A a TEE TEER ES 170 Listredo Command LISTRED O Ee E EEA E E ET EO EE EEES 173 Numrecs Command N renni E O E EA E E ee 174 Open Command OP pirenen eien EE E EEE ER E EEEE ENE EEKE E EEES 175 Remote Databases and Oracle Issues ecccecesseceeeceeeeeesaeceeeeceaeeeaeeceeeecaeceeaeenntees 175 Output Command OJren nE E EEEE EEEE T EE ERKE ERE ETNE SEE ae EE Ei 176 P t Command P arn E E r ERr te 182 QComimand Q aer n a E E ESEE 183 Redo Commiand REDO saron a a E SEEE 184 R s t Command R eased ceieesesassieveccenseseuyesereeaves a EE E EE 187 select Command SEE reni E E KSEE tes 188 Set C
43. 15 v99 If you specify AS as the supr total type each total is formatted as an 18 byte string In this case you should specify the correct decimal precision in the Total command The exponent portion of real totals is truncated by the Suprtool2 interface Out Count After a successful call to the Suprtool2 interface the supr out count is set to the number of Suprtool output records The supr out count is only returned after the Suprtool2 call with the Exit command Workspace The supr workspace part of the record MUST contain spaces before the first call to the Suprtool2 procedure 334 Welcome to Calling Suprtool Suprtool Open 5 7 Examples of Calling Suprtool Copying the Examples Suprtool Open 5 7 This chapter contains some examples of source code that calls Suprtool2 You can copy the examples from the manual but typing them from scratch would be tedious and error prone COBOL Example Below is a sample COBOL program named TOOL2COB It calls the Suprtool2 interface procedure The purpose of TOOL2COB is to print selected item master entries from an inventory database sorted by item number The program uses Suprtool to create a disc file named SELITEM filled with the selected item numbers and their descriptions Then it reads the disc file and prints a report on the line printer The listing for the COBOL program is Examples of Calling Suprtool 335 Here s a control defi
44. 331 with another command such as Xeq your Suprtool tasks will be ignored Environment Variables There are two environment variables that help drive the Suprtool2 process ROBELLE The Robelle variable where the Robelle directory is Normally this variable is set in the following manner export ROBELLE opt robelle ROBSUPR The ROBSUPR variable tells the Suprtool2 process the name of the program file that it can launch If this variable is not set then by default Suprtool2 will launch the program file as being ROBELLE bin suprtool You can change the name of the Suprtool program file or even launch other programs by doing a export ROBSUPR bin supramxw You can even run Suprlink or STExport setting the environment variable to the appropriate name export ROBSUPR bin suprlink Control Record The user program must pass a special control record to the interface on each call The most common error in using the Suprtool2 interface is typing the control record incorrectly The definition of the control record with the proper initializing values are as follows 332 Welcome to Calling Suprtool Suprtool Open 5 7 Suprtool Open 5 7 Cobol supr control 05 supr version pic s9 4 comp value 4 05 supr status pic s9 4 comp supr ok value zeros supr bad msgfiles value 1 supr aborted value 2 supr create error value 3 supr bad total type value 4 supr command line ic x 256 value spaces supr flags 0 supr
45. 5 Basename is the name of your database Mode is the DBOPEN mode that you want i e mode 1 for shared updates mode 5 for shared read only and password is the DBOPEN database password When the password is included in the Base command it is always upshifted Use the option to specify lowercase passwords Suprtool opens the Base which remains open until you do another Base command a Reset Base or a Reset All even if you do several extracts from the database Examples The first example shows a typical Suprtool task A dataset in the Store database is read and a subset of the entries are sorted into a disc file gt base store 5 READER open for read access only gt get d sales select an input dataset gt if sales total gt 10000 choose a subset of all entries gt sort cust account sort by account number gt output salesout output has same structure gt exit as the d sales dataset Our next example opens the database with the Creator password which is the default No output file is produced instead we produce a formatted listing of the input dataset gt base store use the Creator password gt form sets you cannot remember the names gt get d inventory of the datasets in Store gt list print the dataset fields formatted gt exit no output file is created In session mode this command would prompt for the database password If none is entered or Suprtool is not running interactively the C
46. E A A EAE 208 Statisties abaya a e E E E E EE 208 SUDSYSUCIN anrea a A E E EEEE A OEE AA E ETEN 208 SA0 81A a18 ROPI E N TAE T TE E EEE ANERER 208 FhousandSymbo l ereen cis sedadecodesandessctescnstsceveseessgnes vacenhdacsisdssedncgersagbekesountbsatiee 208 TUET e11 AAE AE AE EE AAE AEE E E E E E ATE T ERN 208 Marsu Dc aea e aa a A a a E A a AA E AA E 208 Suprtool Open 5 7 VarsubCom pats ciss eenei aaa EEEE a N A EAEE dues ves ETON O EO OTE 209 Vars bDEDU T neea reinas EE E contain E E EEE E EASA 209 Warnih 8S oeer en eE AEE TER TT E E O E Tubes E E RER 209 S rt Command SO pem ee EE E E RE E EE E E i ei 210 Tabl Command TTA ra nn anen ea es dhe tiv ea E NEEE E 212 Adding Individual Values to a Table 0 0 ceeceesccesseceseecsteeeececereecseceeneeseeesaeceeneenaes 212 Adding Values from a File cc eceeccececceeseceeceseecececeeeecsaeeeneeceeeesaeceeneeneeesaeeeeeeenaes 213 TRanslate Command TR ren a Ea Ta E a E eaaet 216 Totalt Command Piszke E E E E A A eT et eaa 218 Update Command UR i eeii iTA EEA RT T eN 220 UseCommand Unie a ted cere R a a T a a a dead 221 Userpause Command USER neeeseeeeseeseeeseeseeseesseeserssesserssrssreserssrestessrsseessrestesressessressee 223 Verify Command V aina n E EEE ET E a E A a aa 224 Xeg Command X ae NE EEEE EA EE E E eT ETE 225 Calculator Command c cccsscccessscsssssecesseecesseceesasecsesececeeeceesesecseaeesseaaeceesesecesaeessneeeees 226 Suprtool
47. E A Ei 42 UNKLE n NOTS erse Aik ad oe ive tape endl Beate ete E EEA Seed EE EE 42 Shell Commands sats foc c sites sees Seek costs ose corpo ETA E bie Beaune a bbe ete Rebates 42 Hardcoded File Names and ROBELLE Variable ccc ceceecscescesseceececeneeeaeceeeecneeseneeeeneenas 43 ROBELELE Variable aera a Gas ie eee eee te Mee atte eee ee 43 4 Table of Contents Suprtool Open 5 7 opt robell supritigt moret rerne eG ee Hotes ses Renee 43 QULCOUIE Fien or ss eset a EE tes cee voce Kock E oe ee tanes E 43 Differences Between MPE and Open ececceesecssseesseceececseceeseeeeeeeaeceececeeeeaeceeeeceeeseaeeeeneenas 43 Record engl ss aene tastteteods EEE E toy telee cd E EE TE noch EE 44 Eine BOCAS arao Seed ee AE E EA E noes See eangs ceases ERS ene 44 DiipliCat OUI PUL FES srn iser nar E eoo E AEN EE RE EOR 44 Classic REM Sor a p E A E E E E N eehae ateuetas 44 Input fromneS td list oeei aenn EEE EAE EE E E T E EAA 45 Missing Features tees oa EEE E EE EE A ET AT 45 Suprtool Issues and Solutions 47 ALSUpEtOOL TaS Kania e ta aeree E EE e ies Gears AE A Y 47 Input CHOICES os ENA SE EAA AT ETE AS A SOA EET 47 Processin Selections siaran a n ove E Pere E EE at 47 OIIE S101 S10 te A EON ARE AIEA OAE A AE EEE E EE pasnseedsclaiodves 47 Suprtool and Oraclen eaa ean e e a e acs ea aiaa ae aa aaa d aaaea Eaa 48 IDEIEK A EIEEE AAEE E AA E NTN E ETEEN EA E 48 N mb r Data Type rre erene r aee a a a e a a EA 48 Order AAAS 0
48. E E 123 Edit FUN Ct On r ee EE ENR E E A E AE ee 124 Placeholders and Format Characters ccccccceccessceecceeseceseeceeeecseeeneeceeeeeeeeeaeeneees 124 Byte Type Formatting o sscec ic usaian Taen N EEE EEEE EE REAN E 124 8 Table of Contents Suprtool Open 5 7 Suprtool Open 5 7 Z placehold r for byte felds 23 ec cusi ns n e EE cee destin tree EEA 125 Overflow and MSi aein tic iea e concedan E EEEE EA EEEN ES 125 N merie field dit masks Torrsinanreninen oreo e e E E EO EEES 126 ETEA IEE AR E O E E A E E A 126 Decimal Places eisien reae AEE IE AE REEE E E a T ERE AESA 127 Datarand Edit masks mesentere tos debe a a EEE EOE RE EENE 127 Currency and Dollar SINS picie EEEE E EE E e ea aa 127 Overflow and floating dollar ce ceececeseesceceececseceeceeeeeceaeceeeceseteaeeceeeeeaeceeeeeeneees 128 Set Currency SVM DOL astei T EAEE ET CE tes E ven a aT at 128 Overflow and TIMUS onsin ie EAEE RE AEE EE Tne aa 128 IRESUMCHIONS 4 cas a E E eE AT TE E E a e a 128 Fori Command E Aena e E E TEE i ets 131 Get Command G A E ki E a E E E Rass a a A tet 134 Help Command H iiir EE ATERA EE A E e E a et a ea 136 Command Eh e a a a a E eee alee lass Pa a A dt 137 EXPrESSIONS ier eE AN EA E A A N e a e aa 137 CONSTANTS ee EEE ACOE EA E I E A ET tate ons nea Tieat 140 SUDSCTIPIS eaei ieee E e Ei cen ET a a a a a 141 Numeric EX pressions t3 0vaiedsnnie E E E ANETE EE E A 142 String EXPressionss ain En As T Ee EEE EEE AN EE eee E R
49. EEO E 19 Who Needs To Use These Instructions 0 0 0 ceeceeseeseceececseceeneeeeeesaecececeaeeeaaeceeeecneeseaaeeeneenas 19 Instructions for Installing ce secies isnie eien e Eite E E EENE TE TEEN EEEE 19 Quick Start Guide for Suprtool 20 How to Run Suprtool viccs ccccsscsessvcatnecs ccuatevsccesscsbva ccscaveecasvecuanecoabtcs inden cbdevasunsenebeccvsccebscscbanesnacses 20 What 19 8 Task cirine nirai E aE cect ccs cases EEO EE EEE EOE NS EEE AECE 20 Copying Filesmennr cesen ronin aE eE ENEE EEE EOE G AEE TEE EOE AEGEE 20 Copying Qne File kos oiriin eiii eE eA Ea A E EEEE aE EEVEE EAEE 20 Appending t a Files sisne nnise nine EEEE AE TE EE EGES 21 Fields in Data Files isein rocno nnion cecse cect ENEE OEE AEE TEE NEEE EEEE 21 What is a Self Describing File 00 cece esceceeeecneceeceeeeeesaeceeeeceseeeaaeceeeecneeeeaeeeeeeenas 21 Cr ating ani SD FIG si ccscicsenssct ces ccese seek E EAE ounta aiden sb bevada EE V EOE 21 Define Fieldsn a Data Files dvccosibesh eden etre horses Mev nee lei teeae teicones 21 Create an SD File from a Data File ce csssesscssssesceneccsssecnreveneeceasecscesnseesneenes 22 Repeating Commands ersinnen o e ee are EE se cen eden EE AO EEE EEE E taldelvevecnetedt cones 22 Repeating a Command nenien eeror s oono EK EE A EET 22 Selecting Database Records ves cet ccsvcevees iite ea S EEEE AE T AE evens 23 Select AM RE COPS asses cove eA TEA AEE EEE A EE AE T EEE 23 Look at the First Few Recordsin
50. Errors and Warnings 229 TWO Vy pes OT Messages oncore eoa E ANEN EE eRe EE EASE G Aaea AEAEE AS EENAA SEN 229 1 EEE KOI AS EITO AT A AE NOIE NI R AE EREA 229 Ware Sakri teal frees e EET aA ES EEE AES aE EEE A deuce se de aa NENEA ES AES E AEE EER Ea taai 230 Welcome to STExport 231 Welcometo STEXPO tentene a ETERA E T EE A O ETE a 231 Installing S TEXPO tinne EE AEE TEE O A a ATR 231 Accessing STExport 233 How TORUM SPEX Port erise E E E E E EE E EER 233 Howto Xega STEXpOrt Task misesta Ne eE EE EE EAEE E EEEE NAET ONR 233 Hardcoded File Names and ROBELLE Variable cee eeeecceesecesseceeeecnteeeneeceeeeeeeseneeeeees 233 ROBELIE Variable AAEE E AAE E E OE AOE AEE 233 Usine S FEXport im Batoh e aiceeicicescssadcacccodscdessceckesaashensectcntoncsopsestdaesusdesesausectigtedagecbuseustes 234 Command Hime Options eeen eneen eaea AEEA eik oaia o Cr OEE ER AE atat 234 Default Outcount File Name 0C cece eeseesceceeesseceeeeeeeecesaeceeeeceaeeeaeeceeeeeaeeeeneenatees 234 Variable Substitution V cecceeeccesseceseecsseeeeeceeeecseceeneessecesaeceeeceaeseaeeceeeeeaeeeeaeeetees 234 Introduction to STExport 235 Importing Data eseri e htc ere ts ta ede oo L vests a EOE de acim antes 235 put Pale sz cccse ees ccere does ez TEA ETE N Ge anate apaue vend a a a a e a a 235 Data TYPE Senari E EGO RTE TA AE E E a E e EA 235 Formatting Command aeoe a E E EATE E E EE E ATE TES 236 COMMAS oa E AEE TA AEE E a e e e 236 Performance Consideratio
51. Extract command 0 c 103 Counter Function Extract command 006 100 date function 95 132 date how it works etoa Extract function 00 0 cece eeesseeceeeecesseeesees 114 file Total command 20 0 0 cccccecceeesseecescecesseeessees 202 Suprtool Open 5 7 functions if command cceecececeeceseeceseeeeees Sinvalid ee eeceeeeeeteeteeees lookup data If command lookup function 0 c lookup Extract command ltrim null file Sull SQL va siscctsedssesstseaceavedessecsncdedersasvasouconsvnsseds number function 00 eee cece ceeeeceeteeeeteeceseeeees Number Extract Function number Old DU eee ceeceseeseceeceecnseesenseeseeseeneees read FUNCTION ce eecccceesccescecesseeesseecsscecssseeessees SSigned MUNCHOM 2 2 cs tives sacesesees iror i Split Function Extract command S8tddate sess 2 3 ei i E R e PStdinx file wn ceccccesiceccsccsssasccsestecsessenssscacededtosrcsncesters stdlist filenna ih Seen eee SubTotal Function extract command 04 100 today function Stoday how it works cceceseeseeseerceeeeeeeeeeeeeeeeees 54 Total Function Extract command c0cccce 100 AA SIZO PAPEL eececesceseesecsecsecceceneeeseeeeeeeeeeeseeaees aammdd date forimat ccccceeseseeseeeeeeeeeeeeeees abbreviating commands i Abort option on Exit sesseeeesesseseeseeseseeee absolute
52. Implied Decimal Places Il 5 2 10 B 15 14 19 Kl 5 K2 10 Suprtool Open 5 7 Suprtool Open 5 7 Pn n 1 You cannot specify implied decimal places for byte char or IEEE type items Once you define a decimal place almost every command in Suprtool is affected Suprtool accepts numeric values with decimal points or scales integers according to the number of implied decimal places e g specify two implied decimal places then enter 1 000 to represent 1 000 00 All formatting commands format fields with a decimal point when appropriate Constant Values When specifying numeric constants for a field with implied decimal places there are different formats that you can use For example assume that we use the Item command to specify two implied decimal places for an amount field The following are examples of constant values for this item Constant Interpretation 0 zero value padded as necessary 1 1 00 0 01 0 01 01 also acceptable for 0 01 Notes SQL Columns You must redefine any SQL columns before you can use the Item command gt sel from emp gt def salary sal gt item salary decimal 3 correct scale gt if salary gt 15 275 Compound Items When you specify a compound item the attribute applies to all elements of the compound item gt item monthly totals decimal 2 12 occurrences gt if monthly totals 5 gt 1000 00 You cannot apply an attribute to only one sub item of a compound item g
53. Once Suprtool extracts a bit string it always treats it as an Unsigned Integer a Logical and never interprets it as negative The format for bit extracts calls for a starting bit number and a bit count The 16 bits in a computer word are numbered from the left 0 to 15 The two bytes to extract from need not be on a word boundary i e they can start in any byte position See Define Command D on page 91 for how to define a two byte logical field field startbit bitcount gt define bitfield name 2 logical gt if bitfield 4 2 3 How to Check a Byte for a Numeric Value Because Suprtool does not have one byte integers it can be difficult to check a single byte for a specific numeric value Use a two byte integer Define field and the bit extract operator to solve this problem gt define word transcode 2 integer gt if word 0 8 13 See Character Constants on page 141 for an alternate method Decimal Places Use the Item command to specify the number of implied decimal places in an item If you do not do this you must scale all numbers in the If command For example let s assume that you want to find all inventory records with a cost equal to 80 59 If you do not use the Item command your If command would look like this gt if cost 8059 no decimal places By telling Suprtool about the number of decimal places in the cost item your If command looks more natural which usually means you will make fewer
54. Only option finds a record that duplicates a record already in the set it writes that duplicate to the output file Note that the first record is not written to the output file Here are two examples gt key 1 4 gt duplicate only keys Input Output Output TITI 2222 35 2222 35 2222 2222 42 2222 3333 Record Suprtool has two methods for comparing output records Record and Keys The Record option compares the entire output record This option can be specified without a sort but in that case the input file must already be sorted Note that there are two data fields in the records in the following example so that a comparison of the entire record yields no duplicates Suprtool Commands 99 gt duplicate none record Input Output 1111 1111 10 2222 2222 25 2222 2222 35 3333 3333 48 Keys The Keys option compares only the sort keys to determine whether an output record is a duplicate This option requires that at least one sort key be specified gt sort agent sort by agent gt duplicate none keys gt output agents create roster of agents The Keys Num option determines the level at which Suprtool compares sort keys This option controls which duplicate records get included in or excluded from the output file In the following example we sort by agent and by bill date in descending order but only check for duplicates at the agent level gt sort agent sort by agent gt sort bill date desc sort b
55. Open 5 7 Defines fields that can be used in the Duplicate Extract If Item Sort Table and Total commands With Define you can do selection on ordinary data files using the same kind of readable expression that you use with databases You can also access data fields that are not actually structured as defined in the database e g implicit subfields within an IMAGE field DEFINE field definition field is an identifier up to 32 characters long must begin with a letter and can consist of letters A through Z digits 0 through 9 or the following symbols 2 amp In the case where the field name is written to a self describing file only the first 16 characters are used definition can be in two different forms absolute or relative Absolute Definitions DEFINE field byteposition sublen type subcount Default type BYTE subcount 1 The byteposition is a positive integer giving the byte index where the field starts The first byte is always number 1 not 0 The sublen is the number of bytes in the field When the subcount is 1 default the sublen is the total number of bytes in the field When you specify a subcount the sublen is the byte length of each subfield See Data Types below for the definition of type gt input uxfile reclen 40 1f input from a disc file gt def qty 14 4 double double integer PIC S9 9 COMP gt def name 5 6 character string of 6 bytes gt sort name sort using the fiel
56. Open cannot handle all Oracle database concepts The current restrictions are Suprtool Open can handle varchar2 char date and number data types It cannot handle any other data type Because any Oracle Select command can be used it is possible to generate column names that are not compatible with Suprtool Open For example gt select sal comm from bonus This example produces a column called sal comm In some cases Suprtool Open correctly uses this as the column name e g the List command You cannot refer to this column by name in any Suprtool Open command that accepts field names as a parameter Suprtool and Self Describing Files A problem with data files is that there is no field information Self describing files solve this problem by providing field information about the file Suprtool reads and writes SD files Suprlink requires SD files as input and creates an SD file as output Create an SD File from a Table You request an SD file using the Link option of the Output command If you extract columns from the table only the extracted columns appear in the SD file gt select from sales input from a table gt output salefile link salefile has all of the columns from sales gt xeq Create an SD File from a Data File You must Define and Extract the fields you want to have in the SD file Use the Link option of the Output command to create the file as a self describing file Although Suprtool itself a
57. SENE ELESE nET DEE ENERE 35 Your First Report oeeie nieee EE EEr EEO EA Eein ET O EE AEE EET 35 Column Headings s i c cciceecccdsleinsises eE EEEE a ET E TA EEE 36 Printing Mailing Labels eeeesceececseeeenseceecececeeaeeeeeesaeceeeeceeeeaaeceeeecneeeeaeeeeeeenas 36 Running Suprtool 39 RUNNING Supri lasno anrai wane ise eek iva case Ee cok ade EEEE EES EEE EEEE EGEE 39 Setting Up a PATH for Suprtool occ cseccencecsscesecessecesseceeeecsseeesaeceaeecseeseaaenseeesaeeeeaeseseees 39 Bourne and Korn Shells 0 csecesessecnsessecesceseceecseesseessessnessaecsessaecsecaecseeaeeas 39 OST I EE E T EEE 40 Dynamic Loading eienn ra neea EE EEN EE EOE E EEE TEE NEEE AEREE 40 Control Characters anid Stty ssc sicsinissee ss ia civs cease si aE eE E AE TEE EEEE AEE 40 S prmer Configuration Files ccecceeccceseesseceececseceeseeeeeeenaeceececeseecaeceaeecneeseaaeeeeeenaeeseeeeeneess 41 On Line vs Batch ACCOSS eee eeescecscessecsecnsececeseeseceseeseceeeeeceeeseeseneseaseaessaessaesaessecaecssenseees 41 Command Line OPNS nornai ei s EEEE OEE EEEE TOE EEEE ATEGES 41 Initial Command Line cemdstring 0 0 0 cee ceccecsceenceeeeeeeeceeeeceeeeaeceeeecneeseaeeeeeeenas 41 Default Outcount File Name 0C cece eeeeesseceeecseceesceeeeeeaeceeeeceseeeaeceeeecneeseaeeeeeeenas 41 Exit with V Grit y V ienesa e aE A ee tee tees ees ev EES 42 Combining e And Vi esena iv ccenss toss E E N EEKE EAE A EOE 42 Loader Warn ES gece ance riese aE E E ER EE E
58. Similarly a means the previous year month or day For this example select all the sales Suprtool Open 5 7 Quick Start Guide for Suprtool 25 transactions for the prior month Note the use of the special keywords first and last to indicate the first and last day of the month gt input saledata reclen 70 nolf gt define purch date 11 8 gt select from sales gt item purch_date date yyyymmdd gt if purch_ date gt S date 1 first and amp purch_date lt date 1 last gt output result gt xeq Selecting by Lists of Values Sometimes you want to find records based on criteria contained in another file or table Finding Data Based on a List Suppose we want to find all orders for the customers 1234 9876 and 5555 We simply use a list of values after the equal sign in the If command A match is made if a customer matches any one of the values in the list gt select from order details gt if cust_no 1234 9876 5555 gt output orders gt xeq If we wanted to find orders for all customers except 1234 9876 and 5555 we would simply change the equal sign in the If command to a not equal sign A match is made if a customer does not match any values in the list gt select from order details gt EE cust_no lt gt 1234 9876 5555 gt output orders gt xeq Finding Data Based on a File If you have a large list of values in a file you can load them
59. Struncate stddev 100 1 07 This function will also work in the If command gt if Struncate stddev 100 1 07 gt 200 SubTotal Function Suprtool has the ability to keep a running subtotal for any numeric field based on a given sort key The target data must be a packed field with 28 digits in order to avoid overflow issues A sample use of the subtotal function could be gt def mytotal 1 14 packed gt get orders gt sort order number gt ext order number gt ext part number gt ext description gt ext sales amount gt ext mytotal S subtotal sales amount order number gt out sales link gt xeq This would result in a file containing a running subtotal in the field mytotal for a given order number You could then generate a simple report with the simple Suprtool commands gt in sales gt list standard gt xeq The basic syntax for the subtotal function in the extract command is extract targetfield subtotal field sort field You must specify the sort command before referencing the sort field in the subtotal function You can subtotal up to ten fields per pass and the subtotal function is also available in the if command however by nature it is of limited use Total Function Suprtool has the ability to keep a running total for any numeric field The target data must be a packed field with 28 digits in order to help avoid overflow issues A sample use of the total function could b
60. While these files are small they may clutter up a busy system so that is why the default file name is none Differences Between MPE and Open We have tried to make the MPE and Open versions of Suprtool as compatible as possible This section describes how Suprtool Open is different from Suprtool MPE Suprtool Open 5 7 Running Suprtool 43 Record Length On MPE Suprtool can obtain the record length of a file There is no concept of record length on many Linux and Unix based platforms because a file consists of a string of bytes In Suprtool Open there are two ways to determine the record length 1 Specify the record length with the Rec parameter of the Input command 2 Use self describing files If the specified record size is incorrect Suprtool Open cannot verify it The most common symptom of an incorrect specification in size is an offset of one or more characters in each field Line Feeds In MPE there is no separator between records in a file In Linux and Unix based systems there may not be a separator or there may be a line feed between each record For Suprtool to correctly read a data file it must know whether the line feeds are present You can specify whether or not a file has line feeds via the LF or NOLF options in the Input command Suprtool and STExport allow control over whether or not line feeds will be written to the output file or not For details please see the Output Commands for both Suprtool and STExport
61. a field use one of the built in trimming functions When creating string expressions string constants are created with the exact length of the constant For example the string constant abc is three characters long and Hat the string a is one Byte Fields For historical reasons comparing two byte type fields to each other is a special case If the two fields are exactly the same length Suprtool compares them completely If one field is shorter the comparison is done for the length of the shortest field Suprtool does not check for spaces in the trailing characters of the longer field For example Suprtool Open 5 7 Suprtool Open 5 7 gt define short 1 10 ten character field gt define long 11 15 fifteen character field gt if short long In this example Suprtool compares the ten bytes in the short field with the first ten bytes of the long field but ignores the last five bytes of the long field If the expression on either side of the equal sign consisted of more than one field using the operator or involved any of the string functions Supper Slower trim ltrim or rtrim Suprtool would have compared both sides of the equal sign by padding the shorter field with spaces It is only the case where you are directly comparing one byte type field to another that Suprtool uses the length of the shortest field for the comparison You cannot compare a byte field to a numeric type field If you have a byte
62. and upper Slower trim ltrim or rtrim To extract a string expression use this syntax EXTRACT target field expression Target Field The target field determines the byte length for the expression The data type must be Byte or Char The expression is extracted during the output phase and cannot be used by other Suprtool commands that accept fields e g Sort Examples gt extract id no warehouse no bin no gt extract full name first name last name Constants vs Expressions If you have an string expression that starts with a string Suprtool assumes that you are attempting to extract a single string value and not an string expression To specify a string expression that starts with a constant surround the expression with parentheses For example Incorrect gt extract name product desc Error Missing comma or invalid arithmetic expression Correct gt extract name product desc Variable Length Strings String expressions use variable length strings Suprtool keeps track of the length of every string and all operations are done using the actual string length For fields the Suprtool Open 5 7 Suprtool Open 5 7 length of the string is the length of the field If you do not want to retain all the spaces in a field use one of the built in trimming functions String constants are created with the exact length of the constant For example the mol string abc is three character
63. can use the Set redo command to specify a filename to save your redo commands Please see the Set Redo command for details 240 STExport Commands Suprtool Open 5 6 User Manual Clean Command CL Specifies what characters to clean from a byte type field CLEAN SPECIAL lt string gt lt range gt Default None STExport will automatically clean all the byte type fields for a given SD file To define what characters that need to be replaced you use the clean command with the character you want to clean in quotes Since most of the characters that you will need to clean are unprintable you can enter the decimal equivalent of the character This is denoted by entering the character in quotes preceding the decimal number of the character you wish to clean You can set the character with the command set cleanchar as shown below in mysdfile Sset cleanchar wow Sout myexport Sxeq Since the Cleanchar is by default set to space the above task could simply be Sin mysdfile Sclean dean praia OEA OMELET oy Sout myexport Sxeq The SPECIAL keyword automatically defines Clean characters of Decimal 0 thru to Decimal 31 Sin mysdfile Sclean special Sout myexport Sexit You can also specify a range of characters with the following syntax Sin mysdfile Sclean 0 10 Sout myexport Sexit The above task would clean all byte type fields of any characters from Decimal 0 Null to Decimal 10 Line Fe
64. cannot reset particular commands as you can do in Suprtool If you try to reset an individual command Suprlink prints a warning Suprtool Open 5 7 Suprlink Commands 319 Set Command S 320 Suprlink Commands Enables or disables certain operating options within Suprlink These options are not reset by Xeq or Reset commands SET MAPPED ON OFF REDO filename STATISTICS ON OFF VARSUB ON OFF VARSUBCOMPAT ON OFF VARSUBDEBUG ON OFF Mapped SET MAPPED ON OFF MAPPED has no effect within Suprlink Open Redo SET REDO filename Initially unnamed temporary file Commands entered at the Suprlink prompt are saved in something called the redo stack You can recall commands from the redo stack by using other commands such as Before Do and Redo By default the redo stack is stored in a temporary file and discarded as soon as you exit This temporary stack is not preserved across Suprlink invocations The new Set Redo command assigns a permanent file as the redo stack allowing the stack to become available for future Suprlink invocations For example to assign the Myredo file as a persistent redo stack enter set redo myredo If the file does not exist Suprlink creates it Otherwise Suprlink uses the existing file All subsequent commands are written to the persistent redo stack The setting is valid for the duration of the Suprlink session As soon as you exit Suprlink the setting is discarded Next time you run Su
65. case is read a record lookup the record in the table and retrieve the data item in the table If Suprtool does NOT find an entry in the table a zero will be returned if the data type is numeric and spaces will be returned if it is a byte type So using the case above if no entry is found in the table zero is returned and if int field is equal to zero then the record will qualify If you don t want to have any values returned from the table lookup you just preface the if with a standard lookup Suprtool Commands 139 Short circuit evaluation means that the If command does not always need to evaluate all the parts of the command 140 Suprtool Commands gt get ord details gt table cust table cust no file custlist data state code gt if lookup cust table cust no and amp lookup cust table cust no state code state code gt output orders gt xeq When using lookup to return data the lookup must always be on then left side of the expression If not Suprtool will stop with an error gt if id field Slookup mytable char field id field Error S lookup in this context data comparison must be on left side Performance of Lookup Due to the nature of the lookup function it can be at times CPU intensive however since the If command uses short circuit evaluation lookup should be specified as the last part of the If command For example gt if status 10 and Slookup cust table account
66. cecsseeccesceeneeeeceecneeseesecnecseeeeesecaeseeeeeeaeeaseeeeten 64 RTRIM Works on Byte type fields eceeccecseescesceesceseeeeecseecsecacesaecsaesecsecesecsenesereeseeneeenes 64 TE USA Sern ne e OET E tte vinta teens T O tes agece E E ne the fel T 64 Extract Usage target Byte type fields eee eeeeesceeeeeesteceeeeceeeeeaeceeeecneeeeaeeeeeeenas 64 Example a n eect clones ees sect tests varie Styn cs ent ag doce E E ete nereatty cate AE 64 Data EXAM lesen zicz inlets EE E E ce ewtepanatsee Ces agegetesenteetotabeea tus guas A tented 64 Data Result sits gees eise ese sl slay as ae hese eid aaa A cat ahaa en aes a aay 64 SUPPER Works on Byte type fields cccecccccesseseessescesceseeseesenecseeseesecsecseeseesecaecseesseseeseeeenees 65 Ti USA St RR a cea eoee enki E eean eae acca aoe abana ables ee E 65 Extract Usage target Byte type fields cece ceceesceeeeceseceeeeceneecaeceneecneeteaaeeeeeenas 65 Example a n a eso es eit cee Nal ity eect ee le a ee A ay cae pe as ad 65 Data EX ain Plessis czy cies vet Sc ows ge vaccines E ERE E abcd easy Sees EE EE E 65 SLOWER Works on Byte type fields cccccceccccesssescesceseeseesceeceeseesecsecsseseesecaecseneesseeseeeenees 65 Usapin ae ey Nicos ed Mad veveg ceeds AE eee tia Oe Sees sn een wees 65 Extract Usage is casconve OEE EA E ATE arene mais ee eels 65 Example asean a ied a ig ig ee es i ee A ph a a RRE 65 Data Exain ples aier ae T A ENE AEN arated nape aa ere ate 65 PRO
67. command in Suprtool will return an appropriate error message You can Set Limits Readonly on the command line using the c option For example the following command file can be used to restrict who has write access to a given database In this example only the root user is allowed write access if SUSER root then opt robelle bin suprtool else opt robelle bin suprtool c set limits readonly on fi List SET LIST option value Use Set List to configure default values for the List command You can configure the default date time and format for LaserJet listings List Date SET LIST Date number Initially 0 When you select page headings with the List command by specifying a title each page includes today s date By default this date is formatted as mmm dd ccyy e g Mar 20 2000 Use Set List Date to specify a different default date format for future List commands e g Set List Date 2 The valid date formats are as follows Value Format Example 0 default mmm dd ccyy Mar 20 2000 1 yy mm dd 00 03 20 2 mm dd yy 03 20 00 3 dd mm yy 20 03 00 4 dd mmmyy 20 Mar00 List PCL SET LIST PCL 0 1 2 3 4 5 6 Initial amp Default 0 Suprtool Commands 199 200 Suprtool Commands Use Set List PCL to configure the default format for LaserJet listings This option defines the List device as a PCL device and indicates the orientation and font for the report Set List PCL affects only the List command it is
68. command or the Examples section of the Table command Examples If all of your part numbers are in the file Partin you use gt table part table part file partin gt if Slookup part table part The following example uses Suprtool to create a file of sales orders for customers in arrears The orders data is in the database but the customer information is in a disc file Suprtool reads the disc file and creates a new self describing file of customer numbers that are in arrears This SD file is then used to select the orders for these customers from the orders table in the database The account item occurs in both the disc file and the database When the Suprtool table is loaded the account field information is obtained from the self describing arrears file gt input customers r 60 nolf disc file gt def account 1 8 display gt def status 40 2 gt if status 30 customers in arrears gt extract account status gt out arrears link self describing output gt xeg for the Table command gt open oracle demo reader gt select from orders sales orders gt table cust table account file arrears gt if Slookup cust table account gt output badorders gt xeq In this next example low inventory items from the Inventory table are saved in the SD file Invent We use this file to load a Suprtool table and select the records from the Product database table On the table command we use the sorted table keyword instead
69. command to minimize the link record size Link File Maximum Block Size 2048 Words See the description of the maximum input block size Link File Maximum Fields 512 See the description of the maximum number of input fields Link File Maximum Number Seven Suprlink will link one input file with up to seven Link files Suprtool Open 5 7 Limits Within Suprlink 329 Output File Maximum Record Size 4096 Words When linking many files together it is easy to produce large output records Once again using the Extract command to minimize the size of the input and link records will avoid large output records Output File Maximum Fields 1023 Internal Suprlink tables that keep track of the output fields are restricted to 1023 entries 330 Limits Within Suprlink Suprtool Open 5 7 Welcome to Calling Suprtool Calling Suprtool Suprtool including its Suprlink and STExport components is a utility program You run it either interactively or in a batch job and feed it commands to define a task to be done How would a user application program invoke Suprtool to perform a desired task Unfortunately the user program would have little control over when the batch job started or finished To solve this problem Robelle provides an interface routine that will run Suprtool for a user program and pass commands from the program to Suprtool the same commands you would type into Suprtool This routine procedure s
70. commands You may also want to use Suprtool to assist you in changing your actual data from two digit years to four See Can Suprtool Convert Two Digit Years to Four Digits on page 56 for more details If you do not include the century in your dates the second solution above you will have the following problems Selecting dates in yymmdd format will not produce the expected results in relative operations e g lt lt gt or gt You will need to change all of your If commands to use the stddate function Sorting dates that include both 20th and 21st century dates will not collate the way most users expect whether with Suprtool the COBOL sort verbs or HPs sort tools This is because Suprtool and all HP supplied tools sort based on the numeric value of a date To make this work correctly within Suprtool you will need to use the stddate function in an Extract command to generate a date with a four digit year then sort on this new date field with another Suprtool task What Is Wrong with Two Digit Years Currently the date format of yymmdd collates sorts correctly if the date is not beyond December 31 1999 Given the current date of 981210 numerically this is less than next year whose date value is 991210 At the turn of the century dates in the yymmdd format or yymm will no longer sort correctly because the value of December 10 2000 001210 is less than 981210 Consequently if we have a date beyond 1999 s
71. constants are expected for fields of type Z zoned decimal Suprtool Open 5 7 Suprtool Open 5 7 gt if field check for all blanks gt if field double quotes are okay gt if field so are single quotes If you want to compare for a quote itself you include two quotes in the string for each quote you want gt if field AB CD look for AB CD Character Constants Use the character to specify any ASCII character The number the actual ASCII value or letter A means control A must follow immediately after the character Suprtool treats character constants as strings When you compare the constant to a field longer than one byte Suprtool pads the constant with spaces gt define field 1 1 byte field gt if field 0 binary zero gt if field G Control G bell gt if field 27 escape gt if field 252 Roman 8 box To look for null values or low values in byte fields it is usually sufficient to check the first byte for a binary zero gt define first byte bigfield 1 byte gt if first byte 0 Subscripts Use subscripts to access individual items in repeated fields or to access substrings Numeric Subscripts For repeated numeric fields only one index is allowed If Table has the form 10J2 it holds ten double integers Table 1 is the first sub item Table is the same as Table 1 Table 5 is the fifth sub item 23 20 or table 4 30 31 and table 9 28 gt if table 5
72. current quote and delimiter settings in the heading STExport Commands 253 For example if you specify Column Account Column First Name Column Last Name Column City Column State and Quote Double and Delimiter Comma are in effect then the heading STExport produces will be Account First Name Last Name City State Notes You cannot combine the Add and Column options You must specify one or the other If you start with Heading Add and then later specify Heading Column STExport erases the heading you created with Heading Add and starts over with the first column that you specify with Heading Column Similarly if you start with Heading Column a Heading string or Heading Add will start over with a new heading 254 STExport Commands Suprtool Open 5 6 User Manual Help Command H Show what commands and options are available in STExport HELP command keyword section Default browse through the entire help file Command Help If you specify any parameters Help first assumes that you want help on a specific STExport command If you know the structure of the help file you can specify one of the keywords under the command name Shelp sign help on the Sign command Shelp sign trailing trailing section of the Sign command Keyword Help If we cannot find any help in the Commands section of the help file we assume that you specified one of the outer level keywords in the help fi
73. def new price ascii 6 8 display gt def new price 1 4 double gt item new price ascii dec 2 gt item new price dec 2 gt ext item number gt ext new price Snumber new price ascii gt out somefile link gt xeq The number function take the free format number and make it a valid display number It will determine the decimal sign and add leading zeroes It will round the number to the defined number of decimal places In the case of 1 545 number Suprtool will round the value to be 1 55 since the given number of decimal places is two and the preceding value is five or greater If you have a whole number such as 54 with no decimal point the value becomes 54 00 Suprtool will not accept data that has More than one sign More than one decimal place Spaces in between numbers Signs that are in between numbers Characters that are not over punch characters Fields that when edited do not fit in the defined space for the display field You can control the character that defines the currency thousand and decimal symbol for other currencies and formats using the following commands gt set decimalsymbol gt set thousandsymbol gt set currencysymbol Suprtool in the above case will strip the currency and thousand symbols and use the decimal symbol to determine the number of decimal places You can set these characters to any values you want but the defaults for each are used in the above set commands
74. defines the command For example Form can be abbreviated as FO or F since there are no other commands that start with F Duplicate however can be abbreviated only to DU since there is also a Define command in Suprtool gt i sdfile Input command gt 1 List command gt x Xeq command Uppercase or Lowercase You can enter the letters in either uppercase or lowercase because Suprtool upshifts everything in the command line except literal strings within quotes e g abc and disc file names These two commands are identical gt EXTRACT QTY gt extract qty Multiple Commands per Line You can enter several commands on a single line if you separate them with semicolons An entire task can be placed on one input line gt in sdfile out new xeq gt in sdfile if cust status lt gt 10 20 30 list x Caution Suprtool cannot distinguish between several commands on one line and several commands entered on several lines This is not a problem when using Suprtool in batch as Suprtool stops executing when an error occurs But when using Suprtool Open 5 7 Suprtool Open 5 7 Suprtool interactively specifying multiple commands separated by a semicolon Suprtool keeps on parsing the rest of the line after it finds an error For example if you misspell the fldname when you type the following gt get dsetname if fldname value delete out filename xeq Suprtool sends you an error message with the typo but contin
75. displays information about an Eloquence or SQL database or the current Select command or the fields in a self describing file The Form command is similar to the Form command of QUERY on the HP e3000 FORM SETS ITEMS PATHS dataset data item filename Default depends The Form command displays the structure of a database dataset table or self describing file When showing the form of an Eloquence dataset or a self describing file Suprtool shows the byte offset of each field after the subcount type and sublength The first field always appears at offset one If you have specified a date format or the number of implied decimal places with the Item command these attributes appear as part of the form listing Dataset List gt ba sample Database sample TPI Eloquence B 07 00 B 07 00 Set Item Entry Load Entry Sets Num Type Count Capacity Count Factor Length B F CUSTOMERS 1 MDX 355 i bala a 87 5 TEA PARTS 2 MDX 524 182 35 93 ID 3 MDX 2299 47 3 2 ORDERS 4 DDX 008 47 3 21 LINEITEMS 5 DDX 008 272 3 22 Suprtool shows the type of each dataset e g M for Manual master A for Automatic master D for Detail If you have enabled dynamic dataset expansion Suprtool adds DX to the type of the dataset e g MDX DDX Since Eloquence has these features available by default the Type of Dataset will always be either MDX or DDX Detail Datasets If you request information about a specific detail da
76. example gt if name ROBERT The matches lt null gt ROBERT is a valid match it matches one character ROBERTA is a valid match it matches multiple characters ROBERT M GREEN and The ROBERT E LEE are valid matches Means Number in Patterns is used in patterns to match a single numeric character gt if type REC look for REC followed by 2 digits is used in the Get and Input commands to read every n th record Means Alphanumeric in Patterns is used in patterns to match a single alphabetic or numeric character gt if type BASE look for BASE plus 2 alphanumerics amp Means Escape in Patterns or Continue Command Line amp is used in patterns to match one of the special pattern characters For example the character matches a single numeric character If you need to look for the character itself you would specify amp in the pattern gt if type REC amp look for REC followed by amp is used to continue a command line You may enter commands on multiple input lines by putting an amp continuation character at the end of the line gt if status 20 and amp continue the If command state AZ CA OR select several states Means O S Commands or Bit Selection Colon at the start of a command line indicates an operating system command gt listf gt ls Glossary of Terms 347 348 Glossary of Terms Colon is used in
77. expand the command line limit for an if command beyond 256 characters If Usage if Sread number 1 and number 3 and Suprtool Open 5 7 Suprtool Issues and Solutions 75 Date Functions TODAY DATE INVALID Purpose is to determine the current date If Usage If date field today 1 if date field today Extract Usage ext target date today The date field and target date must be defined as having a particular date format item command and in a proper container for that particular date type Purpose is to determine a given date If Usage if date field date Extract Usage ext date field date Date field must be defined as having a particular date format item command and in a proper container Purpose is to determine if a given date is valid or not If Usage item check date date ccyymmdd if Sinvalid check date Extract Usage Not typically used in extract 76 Suprtool Issues and Solutions Suprtool Open 5 7 STDDATE DAYS Suprtool Open 5 7 Purpose is to convert from any supported Suprtool date in any container to CCYYMMDD in a double integer container For date formats with only two digit years Suprtool will look at the value of Set Date Cutoff in order to determine what century to convert it to whether it be 19 or 20 If Usage item my yymmdd date date yymmdd if Sstddate my yymmdd date 20141213 Extract Usage i
78. extracted from the Input file and the Link files Suprlink combines the Input and Link records together in a fixed way dropping the duplicated key fields and appending the remaining fields of each file in the order specified You control which fields occur by using the Extract command in Suprtool but you have no control over their order Use the Form command to print out the final record format so that you can prepare COBOL COPYLIB or PowerHouse QSCHEMA definitions The Input file and Link files must be sorted by the same key field Their names do not have to be identical but they must be the same type and have the same length Suprlink does not support real or long type keys Selection logic can be tricky since it is distributed over independent Suprtool extract tasks the Suprlink merge phase and the final report program Suprtool Selection You can use the If command to select which records you want from each SQL table What you cannot do in Suprtool is check a field in a related SQL table You do have the option to select key values from one dataset then load them into a Table and use lookup to select related entries in another dataset It makes sense to use If on every SQL table since you have another selection possibility when the files are linked For example you might select all customers in California and all invoices with an amount greater than 2000 Suprlink Selection The Input file limits the scope of the Output file for Lin
79. feed as part of the data by increasing the record length by one character If you have an input file with 80 byte records and each record is separated with a line feed you would use gt input uxfile reclen 80 1f gt list char gt xeq Since Uxfile has line feeds the List command shows a dot as the 81st character of each record This dot corresponds to the line feed character To read every fifth record in Uxfile you would use gt input uxfile reclen 80 1f 5 gt list char gt xeg To examine a file which has no line feeds between records e g the Suprtool object code you would use gt input opt robelle bin suprtool rec 256 nolf gt num 10 gt list hex char gt xeq Suprtool executes the Input command immediately it does not wait for an Xeq command before opening the Input file INPUT file RECLEN length LF NOLF startrecord endrecord count Default all input records Input File The first example shows the most common use of the Input command An input file is specified as the input source to Suprtool We select a subset of the input data with the If command Before using the If command we must define a field within the input record gt input invent r 80 nolf input is from a disc file gt define a 11 2 int A is an integer that starts gt output outfile atthe 11th byte of Invent gt if a lt 10000 records with field A less than gt xeq 10000 are writte
80. field 10 1115 numeric field cost qty gt 10000 total lt qty price tax yymmdd date 100 mod 100 lt 03 first quarter Missing Features Arithmetic overflow in computations will cause Suprtool to abort Accuracy By default Suprtool uses floating point arithmetic to compute In some cases there can be slight inaccuracies due to rounding errors Numeric Truncation The accuracy of arithmetic computations is limited to approximately sixteen digits Suprtool may truncate four word integers quad or large packed decimal or display numbers when they are converted to floating point Suprtool does not produce any error or warning in this case Abs function Suprtool supports an abs function which returns the absolute value of a number For example if a field called Credit contains the value 547 83 the abs function returns 547 83 This function will work on a field or even on an expression such as Suprtool Commands 143 144 Suprtool Commands gt if Sabs credit 100 1 07 gt 500 00 This function will also work in the Extract command gt def newcredit 1 4 double gt ext newcredit Sabs credit 100 1 07 Truncate function Suprtool supports a truncate function which returns the number to the left of a decimal place For example if the field stddev contains the value 547 83 the truncate function will return 547 Note that there is no rounding This function will work fields and exp
81. forces Suprtool to produce a formatted listing with page headings page numbers today s date and the current time If you want just the date and page numbers use an empty string For example gt list title The following example prints a report on a LaserJet in Landscape sideways mode using the tiny Lineprinter font including a page heading with the title The physical command line limit is 256 characters As a result the maximum size of the heading is less than 256 characters because the List command and heading options need to be included in the command line gt in custs self describing file gt if status lt gt 10 20 30 40 the only valid values gt set list pcl 1 select LaserJet option gt list title Invalid CUSTOMER Records gt xeg include title on listing Changing the Date Format When you select page headings by specifying a title each page includes today s date By default this date is formatted as mmm dd ccyy e g Mar 20 2000 You can override this format with the Date keyword Use the Set command to specify a Suprtool Open 5 7 Suprtool Open 5 7 different default date format for future List commands e g Set List Date 2 The valid date formats are as follows Value Format Example 0 default mmm dd ccyy Mar 20 2000 1 yy mm dd 00 03 20 2 mm dd yy 03 20 00 3 dd mm yy 20 03 00 4 dd mmmyy 20 Mar00 gt list title Example Report date 3 gt xeq heading date is in dd mm yy format Ch
82. get d sales gt def cust accountx 1 6 byte gt ext cust accountx Sedit cust accout zzzz99 gt output tempsales gt xeq gt in tempsales gt sort cust acctx gt dup none keys gt output dsales gt exit Suprtool Commands 103 Edit Command ED This is not currently enabled in Suprtool Open 104 Suprtool Commands Suprtool Open 5 7 Exit Command E Exit Suprtool in one of two ways EXIT ABORT XEQ Default XEQ Users are often frustrated when they exit Suprtool after specifying only part of a task because Suprtool starts processing the task To exit Suprtool without executing the current task use the Abort option Typing Exit with no parameters means Exit Xeq Suprtool recognizes special command names which specify both the Exit command and an exit option e g EA means Exit ABORT Exit Abort EA Cancels the current operation and terminates Suprtool The Exit command without parameters always attempts to perform the task currently specified while Exit Abort cancels the task and terminates immediately Thus Exit Abort is similar to Reset All Exit Examples You began to specify a sort stopped for coffee and decided to cancel the task on your return gt You began to specify a sort stopped for gt coffee and decided to cancel the task gt upon your return gt open oracle demo reader gt select from customer gt sort name_last sort name first coffee break
83. he Resolving Variables cccseseeeeeeeees 194 256 306 Resolving Variables like MPE 0se0 256 305 ROBELLE variable e ss ROBELLE LP variable Roman 8 characters HTML output eee 241 Roman 8 vs ASCII running out of disc space in SOFt eseseseereereeee 197 running STEXPOrt cece sees eesseeeeeeeseteeseeeeeeeeees 217 running Suprlink running Suprtool S Scientific format enicsnsen i na o SD Ple Seenen SD files date formats SD files decimal places SD files extended names SD fil s MPU oa aaa a nii SD files listing m SD files restrictions cccccccccceeseceesecesseceesecceeseees SDExtname Set oo ccc ccccccssecesseecseeecesteceseeeeneeeees SDEXtname Set Command Select by list of vales ccceccseeseeseersereeeeeeeeeeeeeees Select command 0 cececceseseeseceeceeceseeeenseeseeseeneees Select command Allbase rows Select performance ccecesesccesceeceeeeeeseeseeseeseeee Select Long commands cceccecesseeteeteereeseeeeeee Selecting by date selecting multiple values ceceeeseeteeteeteeteeeeee Selecting non matches Suprlink cece 282 Selecting records selection by date Selection lOGIC ceeeccececceseeteeecececeseesenseeseeseeneees selection using arithmetic 06 self describing files field name limit self describing file format cccceeeeeeeee self describing files
84. if you are uncertain By default whether Suprtool writes out a line feed depends on the input source For example if the input source has line feeds then line feeds will be written out at the end of each record When filling up PowerHouse subfiles some versions of Quiz will abort if no line feeds are found at the end of the record It is recommended that when you write to a PowerHouse subfile you should always use the LF option on the Output command Examples One reason to use stdlist as the output file is to obtain a quick listing of the ASCII fields in the input source The following example lists the Account Lastname and Firstname columns of the Customer table and separates them by two spaces gt open ora demo reader input from a database gt select from customer use the Customer table gt extract account account number will be first gt extract two spaces gt extract lastname the customer s last name gt extract two more spaces gt extract firstname the customer s first name gt output output the records to stdlist gt sort account sorted by the account number gt exit The following examples demonstrate other combinations of options on the Output command The entire ssues chapter of the manual should be reviewed for extended examples using the Output command Many Output options were intended for specific application areas 180 Suprtool Commands Suprtool Open 5 7 gt output newfile
85. ignored by the Output command PCL stands for Printer Command Language which is an HP standard for printers The LaserJet is one of the first PCL devices to be released by HP By default Suprtool assumes that your List output device is not PCL compatible List PCL 0 PCL 1 To print the Suprtool List output in Landscape mode across the wide part of the paper with the tiny Lineprinter font 16 66 pitch or 8 lines per inch you should do the following this setting prints 175 columns per line gt comment Maximum of 175 columns with this font S gt spet Trst pel T gt comment You will need LaserJet with proper font cartridge gt list device laser123 PCL 2 To print the listing in Courier font Landscape mode 6 lines per inch and 100 columns wide use gt set list pel 2 gt list device laserjet PCL 3 This option selects the standard Portrait orientation with the Courier font of the LaserJet 80 columns across by 60 lines You would use Set List PCL 3 when you insert a Font cartridge that overrides the default font e g 92286F cartridge PCL 4 Selects Portrait orientation and Lineprinter font of the L cartridge and others This option prints 132 columns across the page by 80 lines PCL 5 Prints 80 columns on A4 paper by slightly narrowing the space between columns PCL 6 Prints tiny letters in Landscape mode on legal size paper This gives you 223 columns per line The PCL options with the exception of PC
86. input source for the next extract You must have read access to all fields in the dataset entry Only one Chain Get or Input command is allowed per extract task Get always reads the dataset serially GET setname __ startrecord endrecord count Default all records Dataset Input The first example shows the most common use of the Get command An input dataset is specified as input to Suprtool We select a subset of the entire input dataset using the If command gt base store gt get d inventory serially read dataset gt if unit cost lt 10000 the UNIT COST field is gt output outl automatically defined by Get gt xeq FastRead Suprtool Open can read Eloquence datasets in two modes one is with dbget mode 2 serially and the other is a large blocked fast read method The default method used depends on your version of Suprtool Suprtool has two flavours in terms of which set of Image intrinsics it uses The first or regular version loads the Eloquence libraries by using the SHLIB_PATH or looks for the Eloquence libraries in their default location This setting must be turned on prior to the Base command See the Set command for details Selection by Record Number The startrecord endrecord parameter permits selection of input records on the basis of the Eloquence record numbers These numbers always start with 1 and the endrecord parameter is assumed to be the last record in the dataset if it isn t s
87. is adjusted Data and Edit mask 102 3 ZZZZ 99 will result in the final data being 102 30 Similarly if the data has three decimal places and the edit mask only has two then the data will be rounded appropriately with the same rules as outlined in the number function You can specify more than one decimal place in an edit mask However Suprtool will print a warning and it will utilize the right most decimal place for data alignment The decimal place character is defined by a set command gt set decimalsymbol If you define another character as the decimal symbol Suprtool will use that character as the point to align the decimals If you define a decimal symbol that is not an allowed edit mask character with Set Decimalsymbol Suprtool will assume that the field has zero decimal places and adjust the data accordingly Currency and Dollar signs Suprtool edit masks support both fixed and floating dollar signs Logic for floating dollar signs will be invoked if more than two dollar signs are defined in the edit mask A floating dollar edit mask attempts to put the dollar sign at the left most position of the significant data For example if you have the following data and edit mask 0001234 54 the data would end up as 1234 54 Suprtool will not however put the dollar sign to the right of the decimal place If you had the same edit mask and the data was 09 the data would end up being formatted as 09
88. keyword to specify the alignment of the numbers The two keywords are mutually exclusive The last one that appears on the command line is the one that is applied LaserJet Listings There are two methods to select different printing options for a LaserJet and other PCL compatible printers You can permanently set the PCL option for all listings by using Set List PCL or you can use the List command to select the PCL option for just one task PCL stands for Printer Command Language which is an HP standard for printers The following is a summary of the PCL values PCL Font Orientation Dimensions 1 Lineprinter landscape 175 cols 60 lines 2 Courier landscape 100 cols 45 lines 3 Courier standard portrait 80 cols 60 lines 4 Lineprinter portrait 132 cols 80 lines 5 Courier A4 tight portrait 80 cols 60 lines 6 Lineprinter legal landscape 223 cols 60 lines See the Set command for a complete description of the PCL options By default Suprtool assumes that the List output device is not PCL compatible List PCL 0 If you use the List command to your terminal with a global Set List PCL value other than zero your terminal screen may be cleared To avoid this situation you can explicitly specify the PCL setting along with the device Suprtool Open 5 7 Suprtool Commands 167 168 Suprtool Commands gt get d sales gt list serialp pcl 2 gt xeq A4 Size Paper Most of the PCL options with the exception of PCL 5 were designed and tes
89. mistakes Suprtool Open 5 7 Suprtool Open 5 7 gt item cost decimal 2 gt if cost 80 59 decimal places included Numeric Conversion The If command can compare two numeric fields to each other not just one field to a constant All relation operators are supported lt lt lt gt gt and gt However you cannot compare a byte field to a numeric type field Suprtool usually converts the field on the left side of a relational operator to floating point Then the floating point number is converted into the type of the field on the right side of a relational operator and the comparison is done The exceptions to this tule are integer to double packed to packed and display to display comparisons which use a direct comparison algorithm Truncation errors can occur when Suprtool converts from one field type to floating point See also Accuracy and Numeric Truncation Arithmetic Expressions You can specify arithmetic expressions for any numeric data type in the If command Arithmetic expressions involve the operators and mod The Mod operator returns the remainder between a dividend and a divisor Arithmetic expressions cannot start with a numeric constant e g if 2 a 10 is invalid Arithmetic is not allowed on byte type fields If you have a byte type field that consists entirely of numeric digits redefine the field as display type and use the redefined field name in the If command Examples
90. neuronin ene i a e ie e 23 Selecting DY Criteria o Srne rnEeE EE ET E E EE EEE SEE EE coon 24 Simple Citer aooe E EE EE E E ATE EE 24 Complex Criteria ei eenas ata T A E E ET R ETR 24 Sine Of DIEIS T A EAEN EEEE TE dene EE 24 Suprtool Open 5 7 Table of Contents 3 Selecting by Dates vincent An rne ne aE KE EATE E an sceubeseunek peste E TN cee 24 Sel ct py Today s Datensiiriennsi ieat Tnne EE EEEE A EEE 25 select by Particular Da terse sinner eenn Eea EE A E e 25 Select DY VC ar nioe e eA E AEE TAA EEE E EE EE TEE AT EEEE 25 Select Prior MOM ernieren oe E teers E OE LEE NORE E O KA 25 Selecting Dy Lists OF Values erneten errian aeir OE AE EEO E AE EEE A 26 Finding Data Based on a List sseeeseeeesseeserssseseesereseeseesetssestessesstessesstestesseseessesse 26 Finding Data Based on a File ssneeseeseeeeesseeessessesereseseesrtsseesessesseessessteseesserseessesse 26 Finding Data Based on Another Table s Criteria eseeeesseseesrersererrsirrrsreersresreens 27 Finding Data in a Data File iieii iiaa eeina i E E EE E 27 Sorting Database Records csccsscssseessesseesceseeeecesceneceseeeeecaeecsecaaesaecaaeaecaeceaeesensesereeeeeneeeats 27 Sort RECOLAS oss era aa E E EE EA chases touetee Ses couse say E E eban soothes 27 Sort Records in Descending Order cee eeccecssceecseseeceececeeeeenaeceeeeceeeseaeeeeeeenseeeeeeeeneees 28 Sort by Multiple Keysin ere n e a EE a R a 28 Duplicate ReECOLd
91. of file because the Invent file is already sorted We then create a new file Lowprods with all the product information of the low inventory items Suprtool Open 5 7 gt select from inventory gt if on hand qty lt 10 select records gt sort product_no sort by key value gt out invent link later use this file gt xeq in the Table command gt sel from product contains product description gt table product table product_no sorted invent gt if Slookup product table product_no gt sort product_no gt output lowprods gt xeq Suprtool can load up to ten tables either from separate files or the same file The following example assumes that the files are self describing gt input customer gt table cust table custno file custfile gt table zip table zipcode file custfile gt if Slookup cust table custno and S lookup zip table zipcode gt output newcust link gt xeq Keep in mind that using multiple tables may be more memory intensive and require more resources Data Example Your boss comes to you with a list of new prices for certain parts and asks you to update the Part Master dataset Just load the new prices into a Table index by the product number prodno then Extract the price field from each record and replace it with a lookup on the table Here is the code gt table newprices prodno file bosslist data price gt get part master gt if Slookup newprices prodno gt up
92. output format of the date The today function accepts one optional argument which is the number of days before or after today The maximum number of days in either direction is 9999 Oracle dates include both the date and the time If you extract an Oracle date using today the time is always 00 00 i e midnight Extracting Relative Dates The Extract command provides the same relative date features as the If command see Date Selection on page 147 for a complete description of the options of Suprtool Open 5 7 Suprtool Open 5 7 date You must first use the Item command to identify the field name as a date Suprtool uses the field type and length along with the date format to determine the output format of the date Note that the three parts of DATE are always specified in year month day order regardless of the date format of the field gt item field date mmddyy gt extract field Sdate today s date gt extract field Sdate 1 01 start of last month gt extract field S date 1 last end of last month Oracle dates include both the date and the time If you extract an Oracle date using date the time is always 00 00 i e midnight Stddate Similar to the If command the Extract command is also capable of utilizing the stddate function This will allow for conversion of any of the supported Suprtool date formats to be converted to a date in the ccyymmdd date format in a double integer containe
93. priority ic x 2 value spaces 88 supr priority cs value CS 88 supr priority ds value DS 88 supr priority es value ES supr maxdata pic s9 9 comp value 0 supr print state pic x 2 value ER 88 supr print on error value ER 88 supr print always value AL 88 supr print never value NE supr total type pic x 2 value co 88 supr total cobol value CO 88 supr total ascii value AS 0 supr other flags pic x 18 value spaces supr totals pic s9 17 sign is trailing separate character occurs 15 times supr out count pic s9 9 comp supr workspace pic x 20 value spaces typedef struct SuprControl SuprControl struct SuprControl short version short status char command 256 char priority 2 char maxdata 4 char print_state 2 char total_type 2 char other flags 18 short totals 15 9 int out_count char workspace 20 Status The supr status field returns a 0 if the command line was sent to Suprtool without incident or one of the error numbers shown as 88 levels Command Line The supr command line can contain any Suprtool command Use the same format that you use in typing commands into Suprtool You don t need to enter commands as a single string of 256 characters in a single call to the interface You may use to send several commands in one string or you may use the amp mechanism to continue commands The final call must have Exit as the command alone and left justified in
94. record per student To select the desired record for each student Suprlink matches the students cmaj against the cmaj in the link record Suprtool Open 5 7 Secondary Input Key It is possible that the second key field has a different name in the input file and the Link file The FROM clause lets you handle this case t input students key name is ssn link majors by ssn cmaj from ssn curmajor Note that you must specify the Input file key field as part of the FROM clause This example is identical to the previous secondary key example but in this case the current major field is called curmajor in the students file and cmaj in the majors file Optional Linkage If there is more than one link record with the same key value Suprlink will select the first one it finds You can sort by another value such as date time to force a certain record to be first Please note that this is unlike Quiz which does a hierarchical expansion to include every record accessed If there are no link records for a given key value of the input file that input record is dropped from the output file this is the default option REQUIRED To make the linkage optional specify the OPTIONAL keyword When you use OPTIONAL and Suprlink does not find a matching link record in the file Suprlink fills in the linked fields with default values The default for byte type fields is spaces for zoned type the default is ASCII zeros 0 and for all other types the de
95. redo stack print all rm commands print all rm xx commands print all with rm anywhere print ALL relative numbers gt 1 AE gt li gt li gt l Sli S14 S14 gt 1 Saving to a File Saving the Listredo commands to a file is not supported in Suprtool Open Notes The Listredo command can be abbreviated to BJ as in Qedit or to comma comma as in MPEX You cannot use a semi colon to combine commands on the same line Persistent Redo Redo commands can be saved in a permanent file and can therefore be used from another session You can use the Set redo command to specify a filename to save your redo commands Please see the Set Redo command Redo on page 206 for details Suprtool Open 5 7 Suprtool Commands 173 Numrecs Command N Limits the number of records selected and the size of the sort scratch file NUMRECS size percentage default size 10 000 or EOF of input source Parameters To limit the number of records selected from the input source and to reduce the size of the sort scratch file use the Numrecs command If you select more than size entries Suprtool prints a warning message and ignores the rest of the input records However the output file will have the records that were selected Use a percent sign to specify the Numrecs as a percentage of the input file size The percentage can range from 1 to 500 but values over 100 have no effect on non MPE operating syste
96. replaced with the number of records that will be created by the Suprlink run The default numrecs is 1023 when the input limit is set to 0 Step 2 Output Erase in Suprlink Once you have created the PowerHouse subfile use the Erase option of Suprlink s Output command to load the file This will overwrite any data in the subfile but it will not touch the PowerHouse mini dictionary in the user labels tinput invoices created by Suprtool t link customer sorted by custnum toutput invcust erase created by QTP texit Step 3 Report with Quiz The INVCUST file contains the sorted records for the Quiz report Quiz knows the structure of this file because of the initial QTP commands that we used to create the file Now use Quiz to generate the report Suprtool Open 5 7 Introduction to Suprlink 299 300 Introduction to Suprlink quiz gt access invcust gt report gt go Notes on Subfiles One of the advantages that Suprlink has over the link function in PowerHouse is that Suprlink does not require the key field in the link files to be a database key Because Suprlink uses a serial merge approach its files only need to have a common field with the same data type and length If you do use Suprlink to link files that do not share a common database key you need some extra steps to create the PowerHouse subfile Since Suprlink cannot currently write to NM Ksam files you cannot directly write to PowerHouse indexed
97. s function Suprtool can extract the desired fields from the desired records of the sales detail dataset and put them in a disc file Then Suprtool can extract the desired fields from the customer master dataset and write them to a second disc file If Suprtool sorts both files by customer Suprlink can link them together producing a third file whose composite record consists of the related fields from both files This file is just what we need to feed into the report program For example a sales report program might read a disc file whose records consist of sales transactions plus customer information This file has been sorted by customer number and date If there are several sales for the same customer the customer information is just repeated in each record The report program reads the records checks for level breaks and formats and prints the records The user manual contains the full description of all the Suprtool suite of products including Suprlink STExport and Suprtool2 as well as usage tips and commands for each The manuals are up to date with all the latest changes To see only the changes in the latest version see the What s New section of the manual or see the change notice You can download our manuals and Change Notices in various formats and even order printed hardcopy manuals from our web site at http www robelle com library manuals The Suprtool documentation uses a common notation in describing all comm
98. set ROBELLE variable in the following manner Accessing STExport 233 export ROBELLE users robelle Using STExport in Batch You normally run STExport as an on line session You type STExport commands on your terminal and STExport prints responses on your terminal If you redirect stdin or stdlist STExport assumes that it is in batch STExport in batch is almost identical to STExport on line except for answering questions When STExport asks a question in batch no one is there to answer it Therefore STExport does not expect an answer from stdin STExport assumes that you want your batch task to complete so it always selects the option that will complete the command successfully This is normally a YES answer as in yes purge the file STExport prints the question on stdlist as well as the answer that it has selected for you Command Line Options 234 Accessing STExport STExport has command line options which help control certain features Default Outcount File Name oc If you want to know how many records Stexport has processed use the oc option This option sets the file name for outcount to sxoutcount After a successful task Stexport writes the number of output records to the sxoutcount file You can then use this file in shell scripts to check for specific record counts For example suppose that you want to check for at least ten records from a Stexport operation You would write a shell script in the follo
99. signifies the end of file Once you have changed the Suprtool Open 5 7 control character remember to use Control E for the end of file at least Control E is easy to remember since end of file starts with the letter E Suprmgr Configuration Files When you run Suprtool it automatically uses this configuration files if it exists y p y 8 opt robelle suprmgr The system manager usually creates opt robelle suprmgr and puts Suprtool commands in it to set Suprtool options To check the options for your site examine this configuration file On Line vs Batch Access You normally run Suprtool as an on line session You type Suprtool commands on your terminal and Suprtool prints responses on your terminal If you redirect stdin or stdout Suprtool assumes that it is in batch Suprtool in batch is almost identical to Suprtool on line except for answering questions When Suprtool asks a question in batch it does not expect an answer from stdin because no one is there to answer Suprtool assumes that you want your batch task to complete so it always selects the option that completes the command successfully This is normally a yes answer as in yes purge the file Suprtool prints the question on stdout as well as the answer that it has selected for you Command Line Options Suprtool Open 5 7 You can invoke Suprtool Open with various options The syntax for invoking Suprtool Open is suprtool cv Initial Command Li
100. structures has the ability to change date fields Suprtool can convert data in Image databases flat files self describing files and KSAM files Case 1 Converting a J2 Date from yymmdd to ccyymmdd The stddate function can convert six digit date formats to ccyymmdd But what if all the dates are not actually dates but some dates are filled with 9s as a flag to an application Consider this dataset with two date fields J2 items and in the date format yymmdd Database STORE DB GREEN D SALES Detail Entry CUST ACCOUNT M CUSTOMER DELIV DATE PRODUCT NO M PRODUCT PRODUCT PRICE 21 PURCH_ DATE 25 SALES QTY 29 SALES TAX 31 SALES TOTAL 35 Capacity 602 14 Entries 10 Highwater 10 Bytes 38 First we need to know and understand our data Are there any invalid dates If so does the value have some other logical meaning 56 Suprtool Issues and Solutions Suprtool Open 5 7 gt get d sales gt item deliv date date yymmdd gt item purch_ date date yymmdd gt if Sinvalid deliv date or Sinvalid purch_date gt list gt xeq gt GET D SALES 9 gt OUT SNULL 0 CUST ACCOUNT 10010 DELIV DATE 999999 RODUCT NO 50513001 PRODUCT PRICE 19220 URCH_DATE 999999 SALES QTY 2 ALES TAX 269 SALES_TOTAL 21910 GET D SALES 10 gt OUT SNULL 1 UST ACCOUNT 10010 DELIV DATE 125213 RODUCT NO 50513001 PRODUCT PRICE 19220 URCH_DATE 1 SALES QTY 2691 ALES TAX 21910 SALES TOTAL 21910
101. subfiles You can use Suprtool to load file to the Indexed KSAM file Defining Fields in QTP In our example above custnum can be used to link the d_invoice and m_customer tables in QTP because custnum is an index in the m_customer table If custnum was not an index you could try declaring the record structure for the subfile with the QTP Define command Srm invcust Sqtp gt access d_invoice gt define name character size 20 gt define address character size 20 gt subfile invcust keep size numrecs include amp gt custnum invdate amount invnum amp gt name address gt set input limit 0 gt go You must be careful to ensure that the data definitions of the Defined fields are correct Note that you cannot assign default display specifications such as Heading or Picture specifications for Defined fields in QTP Linking Subfiles by Record Number Another approach which guarantees that the subfile will contain the correct data definitions and default display characteristics is to create temporary subfiles with QTP for each dataset then link them together by record number Srm invcust Sqtp gt access d_invoice gt subfile invtemp size 1 include amp gt custnum invdate amount invnum gt set input limit 0 gt go gt access m_customer gt subfile custtemp size 1 include amp gt name address gt set input limit 0 gt go gt access invtemp link to record 0 of custtemp gt subfi
102. table keyfield gt output result gt xeq Report Only the Duplicates and Their Originals This performs the opposite function to the one outlined above It keeps only the duplicates and their originals Input Result 1111 a 2222 b 2222 b 2222 c 2222 c 2222 d 2222 d 3333 e Once again you have to use two Suprtool tasks to accomplish this The first task creates an intermediate file Dupfile that contains the keys of the duplicate records The second task creates the output file Result that contains only duplicate files and their originals from table keyfield keyfield only keys dupfile link from table dup_table keyfield sorted dupfile S lookup dup_table keyfield result Deleting Duplicate Data File Records The following tasks read the file datafile and create two new files The file named result does not have duplicate records The other file named archive has only the duplicate records Task 1 Identify which records to delete 30 Quick Start Guide for Suprtool Suprtool Open 5 7 Decimal Places gt input datafile reclen 38 nolf gt define keyl 1 8 gt define key2 13 12 gt define rec 1 38 gt ext rec gt sort keyl gt sort key2 gt dup only keys gt out dupfile gt xeq length of the record link Task 2 Write records to archive gt input datafile reclen 38 nolf gt table duptab rec sorted dupfile gt if Slookup duptab rec gt output archive
103. the If command for bit selections gt define bitfield 1 2 logical gt if bitfield 4 2 3 Means O S Commands at the start of a command line indicates an operating system command This only works on Suprtool Open gt du gt Is Means Multiple Commands Semicolon is used to string several Suprtool commands together on a single line gt input a output b xeq complete task is in one line Means a List Comma in Suprtool commands is used to separate parameters gt base actrec data 3_ open the database exclusively gt key 1 4 double specify a double integer key gt if acct 764523 456732 98765 Commas are optional in some Suprtool commands e g Output but are required in others e g Extract 1s the abbreviation for the Redo command is the abbreviation for the Do command is the abbreviation for the Listredo command or Means String Quotes or are the string delimiters in Suprtool IF NAME BOB Strings that start with must end with gt if name BOB is the string delimiter here Means Start Parameter Left parenthesis is used to specify a subscript see subscript below or to select a specific range of input record numbers Left parenthesis always comes with a right parenthesis gt input actrec data 10 20 choose records 10 through 20 gt total budget 2 total second repeated field Suprtool Open 5 7 Means End Parameter Right parenthesis
104. the shell script Suprtool and STExport will finally be executed A status code and a file name will be returned to Perl It will print either an error page or the extracted information depending on the status code There is a lot more you can do with CGI scripting and Suprtool You could pass parameters to extract information out of different tables in Oracle and Allbase or specify the sort sequence and the selection criteria Suprtool Open 5 6 User Manual STExport Commands 263 Input Command I Specifies the primary input file INPUT filename There can be only one Input file per task The Input file must be a self describing file which should be created by Suprtool using the Output Query or Output Link option If you want STExport to format date fields and implied decimal places you must use the Output Link option of Suprtool when you create the file for input to STExport Every record in the input file is formatted into a corresponding record in the output file It is best to have Suprtool Extract only the fields you actually need Only those fields needed for import into the final application should be present in the Input file 264 STExport Commands Suprtool Open 5 6 User Manual Listredo Command LISTREDO The Listredo command displays any of the previous 1000 commands LISTREDO start stop ABS OUT file string REL ALL UNN Default display previous 20 commands BJ and are short for LISTRE
105. to display zoned decimal PRN Personal computer format NOLF Do not write out Line Feeds to the end of the Suprtool Open 5 7 Suprtool Open 5 7 record LF Write out Line Feeds to the end of the record DATA DATA is the default output records are the same length and format as the input records ELSE ELSE tells the output command to output any records to the else file that do not qualify under a certain if command If you have a task that looks for all records with an amount gt 0 then the records lt 0 will end up in a file with the same name as the output file but with the extension else The ELSE option cannot be used with num or key or any duplicate option or command KEY KEY creates output records containing only the sort keys concatenated from left to right major key to minor key NUM NUM creates output records of four bytes in length containing the double integer record number of each input record The record number of the first record is 1 for database tables and 0 for disc files NUM KEY NUM KEY creates output records containing the four byte record number followed by the sort key values concatenated from left to right major key to minor key NUM DATA NUM DATA creates output records containing the four byte record number followed by the full data record This can be useful to create transaction files from detail datasets that will later be updated back to the database after a processing
106. type U To append to the end of the line use gt xxx To delete from the end of the line use gt DD To replace at the end of the line use gt Rxxx And to erase the rest of the line use D gt If you prefer Qedit style editing Control D etc use the Before command instead of the Redo command Examples 1l fille fille is a typo ille not found redo redo most recent command L fille last command is printed d you enter changes to it file edited command is shown you press lt return gt listredo all redo 5 redo 5th command in stack Sred redo previous command redo 2 redo command before previous red redo 8th through 10th red redo 10 through last red redo last rm command red redo last rm temp red redo last containing temp 268 STExport Commands Suprtool Open 5 6 User Manual Reset Command R Cancel the current task RESET Reset closes the current Input file then resets the Output file name to Output Formatting options are not reset only the task related commands are reset If you try to reset an individual command STExport prints a warning Suprtool Open 5 6 User Manual STExport Commands 269 Set Command S 270 STExport Commands Enables or disables certain operating options within STExport These options are not reset by Xeq or Reset commands SET CLEANCHAR lt string gt MAPPED ON OFF REDO filename STATISTICS ON OFF V
107. width of each data type Output fields with implied decimal places see Decimal Places on page 160 are formatted with a decimal point in the correct position Like the ASCII option Suprtool reserves two extra columns for each output field with implied decimal places Suprtool Commands 179 Lotus 1 2 3 accepts records only up to 240 bytes long Because the PRN option leaves room for the maximum value of any field you may need to restrict the number of output fields using the Extract command While some PC software allows alternate characters to be used to delimit character fields Lotus 1 2 3 accepts double quotes only Since Lotus 1 2 3 rejects character fields that contains a double quote Suprtool removes all double quotes from character fields when generating the PRN format Suprtool removes quotes by replacing them with a space See STExport for a method of including header lines in the file to be down loaded NOLF If you need to ensure that line feeds are not written to the end of each record then you should specify the NOLF option It is usually preferable to specify the LF option LF If you need to ensure that line feeds are written to the end of each record then you should specify the LF option When extracting from SQL databases Suprtool writes out records without line feeds Files with line feeds are usually processed more easily by most other applications or import programs so it is advisable to use the LF option
108. 11 11 gt IN FILE1SD NEIL GREEN 1 gt OUT SNULL 1 22 22 B 00 022 22 CR00022 22 D 0022 22 xyr 22 227 F 22 227 Signs As shown in the example above there are also numerous format characters for numeric edits including four ways to specify the sign You can specify a sign with or the typical accounting specification of CR and DB You will note in the example above that the cr in the mask was up shifted to be CR This is because the entire mask is up shifted as the mask is being parsed You can specify more than one sign in a numeric field edit although Suprtool will give you a warning that having two sign edit mask characters does not really make sense Cobol gives a Questionable warning when compiling an edit mask with two sign characters Suprtool will apply the sign in both places Keep in mind that most data has three states e Postive 126 Suprtool Commands Suprtool Open 5 7 Suprtool Open 5 7 e Negative e Neutral Any neutral data will not display the sign If you specify a sign in the edit mask n and the data is negative it will of course display a sign Decimal Places For numeric type edits Suprtool attempts to adjust the data according to the number of decimal places in the edit mask when compared to the number of decimal places defined in the field For example if the data field has one decimal place and the edit mask has two decimal places then the data
109. 1993 10 15 50513001 192 20 1993 10 15 0 01 26 91 219 10 10016 1993 10 21 50521001 24 59 1993 10 21 0 03 10 33 84 11 10016 1993 10 21 50532001 139 85 1993 10 21 0 01 19 58 159 42 There are no byte type fields in the input file so all fields are converted from their internal numeric representation to a string of digits All date fields were converted from their internal yyyymmdd format to the external yyyymmdd format with a dash separator between day month and year All fields with implied decimal places have been converted with a decimal point Load Data Into Oracle If you need to load the export file into an Oracle database you can use Oracle s own SQL Loader Files created with STExport can be processed immediately with SQL Loader Suppose we want to load the data extracted in Salefile We would use STExport to format the information and store the results in Expsale opt robelle bin stexport input salefile self describing input file date yyyymmdd dates with a dash separator Soutput expsales output to a file Sxeq If the Oracle database resided on an HP 9000 we would need to transfer Expsale How you transfer the file is not important as long as it gets there in the same format including line separators Also note that the file should have an extension SQL Loader expects a dat extension by default The Oracle table should have all the necessary columns To create a table with the fields in Salefile yo
110. 4 1924 2024 25 1925 1925 26 1926 1926 99 1999 1999 We recommend that you always provide a four digit year when using date However for reasons of backward compatibility we introduced Set Date Cutoff See Date ForceCentury on page 193 for more information Stddate and Set Date Cutoff When stddate has to convert from a date in only a two digit format the conversion to the four digit date will use the value in Set Date Cutoff For example gt input salesdetail a self describing file gt set date cutoff 15 range is 1915 2014 gt def new ship date 1 4 double gt item ship date date mmddyy gt ext order no sales amount gt ext new ship date Sstddate ship date gt out salesinfo link gt xeq In this example if any ship date has a year of 14 or less then the century applied to the new ship date field will be 20 Ship dates with a year of 15 or more will have a century of 19 applied Date ForceCentury SET DATE FORCECENTURY ON OFF Initially OFF Set Date ForceCentury On will not allow a yy date to be entered in the date function it will force the user to enter a full ccyy date gt set date forcecentury on gt item date field date ccyymmdd gt if date field gt date 00 12 10 Error You must specify the century or Set Date ForceCentury off The default value for Set Date ForceCentury is off Date IfYY2000Error SET DATE IFYY2000ERROR ON OFF Initially ON By default Suprtool consi
111. 6 Capacity 211 7 Entries 20 0 P P P P Additional Third Party Indexes SI LAST NAME X16 Self Describing Files The Link output option produces an SD file with information about how the file was sorted what fields are compound and the date format or the number of implied decimal places for any fields The Form command shows all of this information File custfile SD Version B 00 00 Has line feeds Entry Offset CHAR_FIELD X5 lt lt Sort 1 gt gt REPEATED I1 311 compound field DATE FIELD J2 lt lt YYYYMMDD gt gt COST _FIELD J2 lt lt 2 gt gt Entry Length 20 Blocking 1 Default Form If a Chain Get Select or Input command of a self describing file has been entered a Form command without parameters shows the fields in the current input source If a Base command has been specified but no input source a Form command without parameters does a Form Sets If an Open command has been specified but no input source a Form command without parameters shows the tables in the SQL database Form Keywords The Form command shows items paths and sets before it searches for a dataset or file with these names Use a string e g sets to display the form of a dataset or file that matches one of the Form keywords gt form paths paths is the name of a dataset Suprtool Commands 133 Get Command G 134 Suprtool Commands Selects an Eloquence dataset from a previously opened Base as the
112. 7 SIGNED When the target of an extract conversion is a packed or display type field Suprtool always converts positive values to a neutral number To ensure that expressions with positive values have a positive result use the Ssigned function IF Usage Not commonly used Extract Usage extract packed field Ssigned int field extract display field signed dbl field 10 Arithmetic Operations mod Suprtool has the ability to perform any and all Arithmetic functions on numeric fields If Usage if sales total lt gt sales qty unit price sales tax Extract Usage ext sales total sales qty unit price sales tax Conversion Formatting NUMBER Suprtool Open 5 7 Purpose is to convert a freeform number to a number that can be put into an actual numeric field The target must be numeric and the source field must be a display type field even though it can have non numeric characters in it Suprtool Issues and Solutions 73 EDIT If Usage if number disp field 500 Extract Usage define disp field byte field display define byte as display with same length define newdouble 1 4 double ext newdouble Snumber disp field Data Examples 5 00 gt 500 Notes Suprtool will try and match the decimal places of the defined by the item command of the numeric target to the decimal places in the actual data and handle the data properly For example if the targe
113. ARSUB ON OFF VARSUBCOMPAT ON OFF VARSUBDEBUG ON OFF WARNINGS ON OFF XMLTAGCHAR ZONEDFIX ONJOFF CleanChar SET CleanChar lt string gt Initially set to space Sets what character is used to replace a Clean character If you just want to clean the fields and replace the bad character with no character then you need to set the CleanChar in the following manner gt Set CleanChar lt null gt See the Clean command for more details Mapped SET MAPPED ON OFF Mapped has no effect within STExport Open Redo SET REDO filename Initially unnamed temporary file Commands entered at the STExport prompt are saved in something called the redo stack You can recall commands from the redo stack by using other commands such as Before Do and Redo By default the redo stack is stored in a temporary file and discarded as soon as you exit This temporary stack is not preserved across STExport invocations Suprtool Open 5 6 User Manual Suprtool Open 5 6 User Manual The new Set Redo command assigns a permanent file as the redo stack allowing the stack to become available for future STExport invocations For example to assign the Myredo file as a persistent redo stack enter SSet Redo Myredo If the file does not exist STExport creates it Otherwise STExport uses the existing file All subsequent commands are written to the persistent redo stack The setting is valid for the duration of the STEx
114. Canadian postal codes e g V3R 7K1 gt in postal gt form File POSTAL NEIL GREEN Entry Offset POSTAL CODE X6 1 Limit 10000 EOF 2 Entry Length 6 gt def postl1 1 7 byte gt def post2 1 7 byte gt ext postl Sedit postal code xxx xxx gt ext post2 Sedit postal code xxxbxxx gt list gt xeg gt IN POSTAL NEIL N 0 gt OUT SNULL 0 POST1 L2H POST2 L2H 1L2 gt IN POSTAL NEIL N 1 gt OUT SNULL 1 POST1 L2H POST2 L2H 1L2 Z placeholder for byte fields The Z placeholder character works differently for byte fields than for numeric fields For byte type fields if the Z placeholder and the corresponding data is 0 then the zero is suppressed regardless of the position This is primarily for suppression of zeroes in byte type date fields ext a Sedit date field xxxx zx zx The above edit mask would then edit a byte type date of 20031005 to be Overflow and limits An edit mask is limited to 32 characters in total for both numeric and byte type fields If data overflows the edit mask by default Suprtool will fill that field with asterisks There is an option to have Suprtool stop when it encounters a formatting overflow gt set editstoperror on will force Suprtool to stop if there is data left over after applying the edit mask With byte type fields leading spaces do not cause overflow Therefore if your data consists of Suprtool Open 5 7 Suprtool Commands 125 and your edit mask
115. DO Commands are numbered sequentially from one as entered the last 1000 are retained You can display a single command a range of commands all 1000 or all the commands whose name matches the string You can print the commands with ABSolute line numbers the default RELative line numbers 5 4 or UNNumbered You can write the commands to your terminal The Out option is not currently supported on STExport Open If you want to redo any of these commands see Do Redo and Before Examples print all Help commands print last ten commands print entire redo stack print ALL relative numbers print all rm commands print all rm xx commands print all with rm anywhere 1 1 Sli S14 Sli Sli Sli Sli 14 Notes The Listredo command cannot be abbreviated but BJ and comma comma are accepted as a short forms Persistent Redo Redo commands can be saved in a permanent file and can therefore be used from another session You can use the Set redo command to specify a filename to save your redo commands Please see the Set Redo command for details Suprtool Open 5 6 User Manual STExport Commands 265 Output Command O 266 STExport Commands Specifies the Output file OUTPUT filename ERASE LF NOLF By default the Output file is named Output If you specify Columns None the output file will have variable length records When Columns Fixed is specified STExport creates th
116. E T NTA ee e dt nein 249 Floating Command EL een Eae E E E e E a at ar Ts 251 Borm Command E knne a a a E abel T A PA eee N det 252 Heading Command HEA rreren ea e e E E A a ete s 253 Help Command H ie aa EEE E taken tine E E a E a a e 255 HEMEL Command HT k erea a e a EE A EE E R a E Ei 256 Dynamic Web Pages gu ieee e lene E R E E SR 258 Web Serv emerat Ae Wig tl TA E E EE GR 258 Shell Seip taie io n Au wis dene Cae ec auras eee Oe ae 259 P rl Script erora oaee She Seg ina R E anes aes Cees abe ancy Season eter pate 261 CGE SP l rei a aee Ae ie duane aeons Ginna al anp ee eRe 262 Input Command M e i ss ast TAE EEEE GERON ak aay eases eee 264 Listredo Command LISTREDO cccccccccccccsseceesseeceeeeecseeeeeesececeeseeecneeeensesecesaeeseeeeens 265 Output Command O aaae a E EET ERE EAE AA E ate 266 Quote Command Q esane R E AEE GEE O EE EE 267 R do Command REDO n cec ce ii iiei EE G O E E A E 268 Reset Command R naese r E EE RE ilies esis tides eee 269 Set Command Sh een a R E E A a e EE 270 Clean Char eorna E ETE EE EEE EEE EEES EET EOE EEEE 270 Mapped eiiie ER E E EN EAEE E ETE ETETE 270 RedOne na RE EE E DTE E REEE REEE NEET EEKE ESE EEE 270 STALISTICS 0 ERE EEEE E E E E E O NLE EEEE A E 271 DETE l o EE EEEE EE EAE E E E E TA E 271 VarsubCompat gesog prhe E EEEE EAEE E a TEE EEES EES 272 VarsubDeDus PA EEE P AE E E EE AEE TA E TET 212 Waning S fo 5cc cccssvsseeeesteveeaSeeceeds deuvtaucs EPEE EREERE
117. EAD ON OFF FILECODE number not supported in Suprtool Open FILENAME Help Link Edit Hint Export Outcount filename FIRSTREC 0 1 has no effect in Suprtool Open HINTS ON OFF has no effect in Suprtool Open HPUXCndErr lt string gt IFCHECK ON OFF IGNORE ON OFF has some effect in Suprtool Open ITEMABBREVIATEDATE ON OFF ITEMLOCK lt fieldname gt INTERACTIVE ON OFF LABELLEDTAPEREWIND ON OFF has no effect in Suprtool Open LIMITS Mpe ON OFF ReadOnly ON OFF Tablesize size LIST DATE number LIST PCL 0 1 2 3 4 5 6 LIST TIME number Suprtool Commands 189 190 Suprtool Commands SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET SET LOCK number has no effect in Suprtool Open MAKEABSENT ON OFF has no effect in Suprtool Open NLS number NUMBUG ON OFF OPENMODE number has no effect in Suprtool Open ORACLE ROWS number not supported in Suprtool MPE ORACLE INTEGER ON OFF not supported in Suprtool MPE ORACLE OPENFIX ONJ OFF not supported in Suprtool MPE ORACE ZERONULL ON OFF not supported in Suprtool MPE PATTERN NEW OLD PREFETCH number not supported in Suprtool Open PRIVMODE ONJOFF has no effect in Suprtool Open PROGRESS Percent number Minimum number PROMPT character REALMAP ON OFF RECOVER ONJOFF has no effect in Suprtool Open REDO filename SDEXTNAME ON OFF SORTFAST ONJOFF has no effect i
118. EELE E E A AEE 60 Oracle Performan Ce ssa ic erah aa Steet aves cov T E E E E A O EER 6l Analyzing Performance Dataic cvecsisesee cenit eae en e EE E T ETAD 6l Variable Substitution mererien de OR een eee es eee eee 61 Suprtool Open 5 7 Table of Contents 5 6 Table of Contents SUPO FUNCUONS wiv ec se Leceves cots set aE sd dev cece snes evens annceubuseuted paste piesa ies abveeest TOETS 62 UG4 Scripting and Functions seeren eaen ebb Gees eee EEOAE ae ene Gee 62 String Byte Functions eeinetan cg eetn were ein eon teed E ees eae ae 62 TRIM Works on byte type fields 0 ce eceeceeseecesseeseeseeesecseecsecsaesaecsseaecneeeeecsensesereeeeeneeeaes 63 TRU Sa AEA E ES E E ethene te eve nawees cava yes snes A 63 Extract Usage target Byte type fields eee eeceesseeeecesteceececeteeesaeceeeecneeteaeeeeneenas 63 EXAMI ple ssc sies sed uss e EAEN ET ER TEE sted hte bests A R eg te a 63 Data Examples Before and After 00 ccc ecesceceseceeceeeseeeeeeecnessaecseesaecsecaeeneeaeees 63 LTRIM Works on Byte type fields cceeccecceescessessceseeesecaeecsecaceesecsaeaececnsecsesseeeeeenteneeenes 63 TEU SASF svcaccorcetvcscoussssteenneice tees csunle teee ATO A coat Testes lege te ee steTateee ate AT 64 Extract Usage target Byte type fields cee cecceesceeeeeesteceeeeceeeeeaeceeeecseeseaeeeeeeents 64 EXAMPLES 2 3 5 sdb sez nes E T tea sak oee nce a tata sone teas EE aereedteagede A 64 Data Examples before and after 0 0
119. ER EEEE LEETE Eea 272 Xmltage hatiin ene tEn E EEE E EEEE ERTE ESEE A SNE E E E 273 ILAT 1 D EE EE AEE EE E E EE EEE E 273 Sien Command SI e e e E E EE EE EE E REESE ETEEN ERE 274 Spaces Command SP kenean EE AE EENEN 275 Us Command U seae ses cesses eeseetes vex cvete cepeievesieee atevtewecte ov chews canes chest iaswestashyeaeeetevteevased eben 276 VerifyComimang V atiss wesseeessereceeneestirevapeaevbenepentevin vd ahsuatens NE EEA AA A 277 Req Command IX rani ae E r EE anche O E A EEN 278 XME Comimand XML s e E E bas AEE E evince 279 Zero Command Z eers a E E A a ENE E 282 Example of STExport Output 283 Examples seceded ves ae Er AE SE E E E E E E A 283 Limits Within STExport 287 MaxiMUMS ce 05scceecoced en enne E S EEE EEES E T EET EE EE s 287 12 Table of Contents Suprtool Open 5 7 Welcome to Suprlink 288 Welcome to Suprhink siaren eiiie seve och EEEE aE india ETE E NETRE EE ESS 288 Terminology and HP UX ersinnen enii e NE E E aR Ea TRE EEEE a E e 288 NOtatOnsccsseesseectscevesc ei e eE E aA E EEE AE ENTE AEE EE e ECE EEEE 288 Installing Suprlink insnoeien ieoi n EENE AEE EEE a E n TREE EEEE AEEA 289 Hardcoded File Names and ROBELLE Variable cceecceescesseceeeecseeeaeeceeeeeaeeeeneenatees 289 ROBELLE Variable soc cscvea veces anini ienien a E AE E TE EEEE ais 289 Accessing Suprlink 291 How To R n S prlink seis aeeai r e EEE EE EE EET i EEKE a as 291 How to Xeq a Suprlink Task arenero n EEE EE ETE
120. HOLD DATA field 1 field2 field3 Parameters itemname The item determines the data type and length of the key values in the table You can only load a table from a self describing file Suprtool first checks for the field in the self describing file FILE vs SORTED The File option assumes that the file of table values is not sorted Sorting a large file of values is slow If the file is already sorted use the Sorted option Suprtool checks the records to make sure they are in ascending order filename A valid self describing file Hold By default the Xeq command resets all tables Use the Hold option when using the same table in more than one extract task When Hold is specified the Xeq command does not reset the table Hold applies to individual tables not all tables Suprtool Open 5 7 Suprtool Commands 213 214 Suprtool Commands gt table part table part file partin hold Data The Table allows for data to be loaded along with matching key values gt table partab part file partin data cost desc You can specify up to 20 data fields as long as the total size of the key fields and data does not exceed 256 bytes The Table file must be Self Describing to use the data option When loading data into a table Suprtool will eliminate the duplicate entries based on the key value so some data values may not be loaded into the table For information on how to retrieve data from the table please see the Extract
121. Help Command H The Help facility has been disabled in Suprtool Open 136 Suprtool Commands Suprtool Open 5 7 If Command IF Suprtool Open 5 7 Specifies a subset of records to select from the input source during the next extract task The If command supports full logical expressions with comparisons between all data types between data fields and constant values or between one data field and another The If command also provides partial string compares bit field extracts subscripted IMAGE fields AND OR NOT operators and parentheses to override precedence You can use arithmetic expressions involving any numeric data types IF expression Note The examples below show multiple If commands These are for illustrative purposes only Suprtool does not permit multiple If commands in a single task Instead you can combine multiple conditions using AND and OR Alternatives to the If command There are a few selection criteria that the If command cannot perform In these cases you need to use other Suprtool commands If you wish to select by record numbers use the record number options in the Input command If you wish to limit the number of records selected use the Numrecs command There Is No Else Clause The If command in Suprtool does not have an Else clause but the output command does To write out the records that do not match the If criteria you can use output else to get both the selected data and the data that was not s
122. IF ADD TO Y MOVE TO SUPRTOOL COMMAND ADD TOY MOVE SORT MEMBER nbr TO SUPR ADD TO Y ADD TO Ys MOVE OUT DIR_TEMPDATA mep083 TO SUPRTOOL COMMAND LINE Y ADD 1 TO Y MOVE EXIT TO SUPRTOOL COMMAN 2100 EXIT EXIT Here s the code to call suprtool2 KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK Execute Speed Demon commands fr kkkxkxkxkxkxkxkkkkkxkxkkxkkkkkkkkxkxkkkkkkkkxk 3000 CALL SUPRTOOL PERFORM WITH TEST AFTER VARYI 3i dat ERASE D LINE Y KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK om memory table kkkxkxkxkxkxkxkkkkkxkxkxkkxkkkkkkkkxkkkkkkxk NG X FROM 1 BY 1 UNTIL X 30 Examples of Calling Suprtool 337 IF SUPRTOOL COMMAND LINE X gt SPACES MOVE SUPRTOOL COMMAND LINE X TO SUPR COMMAND LINE DISPLAY SUPR COMMAND LINE MOVE 0 TO SUPR STATUS CALL suprtool2 USING SUPR CONTROL IF NOT SUPR OK DISPLAY Error Unable to call suprtool2 DISPLAY DISPLAY Suprtool interface error number SUPR STATUS DISPLAY SUPR COMMAND LINE GOBACK END IF END PERFORM 3000 EXIT EXIT C Sample Below is a C program to invoke Suprtool through the interface routine 338 Examples of Calling Suprtool Suprtool Open 5 7 Suprtool Open 5 7 include lt stdio h gt include lt stdlib h gt include lt sys types h gt include lt sys wait h gt include users robdev ux include defines h define cmd_max_len 256 define filename_len 36 typedef struct SuprControl SuprContro
123. IMAGE cceeceseeseeeeeseeeeeeseeceeeeenenes 180 endrecord parameter cceceeecesceceteeteeeenes 119 140 Environment variables Suprtool2 eee 316 Eofread Set Option ccceeesceeceeceseeteeeeeeeeseees 180 equal to sign Erase option of Output cece eeeeeeeeeeeee 283 301 erasing fil s 2 cos ctsccsescseatetas ats ads sieneksi error block size error messages in Suprtool eee eeeeeeee 213 328 error messages Suprtool2 cececeseeteeteeteeeeeeee 325 error code overflow error data overflow escape Character cceccecceseeeeeeceeceeceteeeeeeeeeeeees Escape Command ues Euro currency symbol eceecceccesceseeeeeseceeceeeeseeaes 95 example of Suprlink 00 cece eseeeeeeteteeeeneeeeeees 278 exclamation ay exclamation mark sssesssssessesesseessrsersrsessssesesrrseses 286 Exit command cccceseeeseeeeeeeeeeee 90 209 233 262 Exit command importance Of seseeseeeeeereeeereese eee 315 Exit command Suprlink eee eeeeeeeee 291 309 exit with Vei neei woke eho ee 40 275 exiting from batch jobs cceseseeseeseeeeceeceeeeseenes 90 Export command snesen 92 Extract command ccccceeeeeeees 32 93 Extract command decimal places cee 94 Extract from a table oo eeeeececceeceteeteeeeseeseeneeee Extract functions and Sort OXtTACtINS ATAN GE 4 6 cde cescnsycceessecdesseavesencetiesevergedvesderose extracting bits enna tae ceeds aes extra
124. If u is placed anywhere other than column one of the current line then a simple replacement is performed Undo makes sense only if you have a line on which you have performed some editing that can be undone Simple replacement Any other character not i r d d gt gt gt d gt r c or u will be put into the current line at the position above where it is placed replacing any existing character Simple replacement also occurs for the editing characters i r c or gt if they are not followed by text or if gt appears at or beyond the current end of line Hpmodify Examples Here are examples of the MPE style REDO sub commands in action Edit Action 5 lt i iss s siOY u First occurrence undoes the previous edits The u must be in column one u Second occurrence undoes all edits on the current line The u must be in column one Replaces the current text with xyz starting at the position of r Replaces the current text with xyz starting at the position of x Inserts xyz into the current line starting at the position of the i fddd Deletes three characters one above each d Suprtool Commands 185 186 Suprtool Commands d xyz Deletes a single character above the d skips one space then replaces the current text with xyz starting at the position of x ddixyz Deletes two characters then inserts xyz in the current line starting at the position of the i Deletes one character above the first d ski
125. Input file key field as part of the FROM clause This example is identical to the previous secondary key example but in this case the current major field is called products in the ordhist file and prod in the orders file Optional Join If there are no join records for a given key value of the input file that input record is dropped from the output file this is the default option REQUIRED To make the join optional specify the OPTIONAL keyword When you use OPTIONAL and Suprlink does not find a matching join record in the file Suprlink fills in the linked fields with default values The default for byte type fields is spaces for zoned type the default is ASCII zeros 0 and for all other types the default is binary zeros For example t tinput custfile key name is custno t join addrfile optional don t drop customers toutput custaddr 1f there is no address texit Suprtool Open 5 7 Suprlink Commands 313 Link Command L 314 Suprlink Commands Link the Input file to another Link file maximum of seven input files LINK filename BY link keys FROM input keys OPTIONAL REQUIRED Default REQUIRED File Name The Link file should be created by Suprtool with the Output Link option it should only contain the fields that you actually need in the final report plus any sort fields If you do an file of the file it should show another file with a sd extension This file contains a description o
126. L 5 were designed and tested with North American letter size paper Suprtool can adjust the number of rows and columns for each option to match A4 if you add 2000 to the PCL code You can also select the ASCII character set instead of the default Roman 8 character set by adding 1000 to the PCL code See List Command L on page 166 for more details Here is a complete table of the PCL codes PCL L P Font A4 paper _Letter size Notes Rows x Rows x Columns Columns 1 L Ip 58 x 188 60 x 175 2 L courier 43 x 110 45 x 100 3 P courier 64x 77 60 x 80 standard 4 P Ip 85 x 128 80 x 132 5 P courier 64 x 80 60 x 80 A4 squeeze 6 L lp 60 x 223 60 x 223 legal size L and P mean Landscape or Portrait orientation Suprtool Open 5 7 Suprtool Open 5 7 List Time SET LIST Time number Initially 1 When you select page headings with the List command by specifying a title each page includes the current time By default the time is in 24 hour format e g 23 02 Use Set List Time to specify a different default time format for future List commands e g Set List Time 2 The valid time formats are as follows Value Format Example 0 none 1 default 24 hour 23 02 2 AM PM 11 02PM List FormFeed SET LIST Time On Off Initially Off The command Set List FormFeed On will enable Suprtool to write a form feed to the list file at the end of each task This way if you append an additional report to the list file the next report and wil
127. MPNO Number ENAME Varchar2 JOB Varchar2 MGR Number HIREDATE Date SAL Number COMM Number DEPTNO Number Integer Byte Byte Integer Oracle Date Packed Packed Integer 4 10 9 4 KKKK KKK SQL Database If an Allbase database is open and no input file has been specified the default Form command shows all of the tables in the database If a Select command has been specified the default Form command shows the columns in the Select command The exact format of the Form command is different for each SQL database Suprtool Open 5 7 Suprtool Open 5 7 Third Party Indexing If the database is enabled for indexing the Form command shows any third party index that corresponds to an IMAGE Eloquence field When doing a Form dataset each field is checked to see if it is a byte type or Z type third party index If it is the comment lt lt TPI gt gt is shown Indexes that have a name other than an Image item name are shown at the end of the form listing The Form command only shows those indexes that can be referenced by the Chain command For example gt form m customer M CUSTOMER Master Set 1 Entry Offset CITY X12 1 lt lt TPI gt gt CREDIT RATING J2 13 CUST ACCOUNT Z8 lt lt Search Field gt gt lt lt TPI gt gt CUST STATUS X2 NAME FIRST X10 lt lt T gt gt gt gt gt gt gt gt NAME LAST X16 lt lt T STATE CODE X2 lt lt T STREET ADDRESS 2X25 lt lt T POSTAL CODE X
128. NEIL GREEN 0 gt OUT SNULL 0 LAS TNAME ARMSTRONG LOWER Works on Byte type fields Purpose it to make all relevant bytes Lower case If Usage if Slower first_name neil Extract Usage ext byte_target Slower byte source Example def newfirstname 1 16 byte ext newfirstname lower first_name Data Examples gt ext lastname lower lastname gt IN STRINGS NEIL GREEN 0 gt OUT SNULL 0 LASTNAME armstrong Suprtool Open 5 7 Suprtool Issues and Solutions 65 PROPER Works on Byte type fields Purpose is to make the relevant bytes either Upper or Lower Case in an intelligent manner It wi Upshift the first character in a field and anything following a space or dash If Usage if Sproper first_name Neil Extract Usage ext byte_target Sproper byte_source Example def fullname 1 30 byte ext fullname proper first _name Data Examples gt ext fullname Sproper fullname gt IN STRINGS NEIL GREEN 0 gt OUT SNULL 0 FULLNAME Neil Armstrong SPLIT Works on Byte type fields Purpose is to extract a string into a byte type field that begins at a certain character instance and ends and a second character instance Commonly used to reformat name fields and read CSV files If Usage Not that commonly used 66 Suprtool Issues and Solutions Suprtool Open 5 7 Extract Usage extract field split field_from start_pos instance end_pos instanc
129. OTt eects eeeeteteeeeeeeeeeeee 187 negative value eee 106 NLS option Set command cceceeseeseeseeeeeeeeees 187 NOSQUOLES iseenese ye rA E EE NEONO 251 NOLF E Non Collating Date Types sseseseeeeereeseeeerereee 137 nonprinting characters cccececeeceseeteeteeteeeeeeee 126 non SD Files and duplicate cece eeseeeeeeeeeeeereee 86 NOt equal tO lt gt eeeecceccecceseeteeeeceeceeceseeseeseeseeseeneees 330 NOT operator MUI VALUES aeneis iii ie numeric bytes Suprtool numeric constants NUMEeET C CONVETS ON ceeceeseeseeeceeceeceseeseeseeseeneeneens 128 numeric CXPTESSIONS ceceeseeseeseeseeseeeeeeeeeeeeeees 98 127 numeric JUSTIFICATION eeeeeeeceeceeceteeeeseeseeneeneeee 152 numeric string test cee 130 Numeric to Byte conversion 108 numeric truncation 128 Numrecs Command cccccccscscesseeseeeeeseeseeeeeeeeeees 159 O O S commands oeie ienr annsi 65 HOC Oph ns iener dks Mie E E 39 Offset PAarAMeter eceececeeseeeeeceeceeceeeeeeeeeceeceeceaeeaes 76 Open command se optional command name ee eeeeeeeeseteeeeeeeeeeee 149 optional Join Option eee eeeeeeeeeeeeseeeeeeeeeees optional Link option cece eeeeeeeeterereeeeeeeeeees OR Operator ean e aE eon Oracle applications Oracle database onice aiiis hai betes Ofacle datasty pesisccsvesiccvclinchesteis sexcietcsresesncnyadey seed Oracle date format cceeeeesceece
130. Options cee eeeeeeeeeereeeeeeeeeeee 276 command line STExport commands 1 220 commands formatting 1 220 commands multiple 0 ccc eeeeeeeeeereeeeeeeeeeeenees 63 COMMENTS ss scesiersdenelevccs riseiras iena ea Ae 221 286 Comparing against Key and Data eee 124 comparing strings as NUMDETS cece eeeeeeeeeee 22 Complex criterias sinso E E Ea 22 compound items s ssesesseseseseeseseeessrsessreesrsrese 93 196 configuring Suprtool ssssessesesrssesesisrerersrsreressesrrees 39 constants oe constants in arithmetic expressions 00 99 101 constants in the output file 0 cece eeeeeereeenees 93 continuing commands eeeceeceeceteeeeeeseeseeneeee 285 controlibreak sasesuieskiili asia ead hiatal hes control characters wis control record for Suprtool2 ose eeteeeeeeereeeeee Control D in Modify eee seseeeeeeeereeeeeeeeeenenees Control Y viii ed eed eats CONVENU ONS asen a EN aee convert from binary to ASCII Converting dates onneen i Eia iaaa copying files s sssesesseessessesessseesstrssesessesesseresrserseses copying to another database count duplicate records Count paraMeter eee ceeeeeeeseseeeeseeeeeeeeeee count qualifying records eeeeeeeetereeeeeereeeees Count output restrictions 0 cece eeeeteteeeeeeeeeeeeee D data sCONVETSION csicsvesnsexsevaceiay saiia n e Data option Data option Table data overflow e
131. Oracle Type Suprtool Type CUSTOMERNUM Number DELIVERYDATE Number PRODUCTNUM Number PRICE Number PURCHASEDATE Number SALESOTY Number SALESTAX Number SALESTOTAL Number Double Double Double Packed Double Packed Packed Packed Fe oe ee 00 COOVYoOoVrYyY Dates and Decimal Places We use Suprtool s Define and Item commands to identify which of the fields in the sales table are dates and which fields have implied decimal places Suprtool Open 5 6 User Manual Example of STExport Output 283 gt def deliv_date DELIVERYDATE 8 display gt def purch_ date PURCHASEDATE 4 double gt def product_price PRICE 4 double gt def sales _ tax SALESTAX 4 double gt def sales total SALESTOTAL 4 double gt item deliv_date date ryyyymmndd gt item purch date date ryyyymmdd gt item product price decimal 2 gt item sales tax decimal 2 gt item sales total decimal 2 Salefile We now produce a file called salefile using Suprtool s Output Link option The Link option produces a self describing file complete with the date and decimal place information gt open oracle custdb dbpass gt select from sales gt def deliv date DELIVERYDATE 8 display gt def purch_date PURCHASEDATE 4 double gt def product_price PRICE 4 double gt def sales _tax SALESTAX 4 double gt def sales total SALESTOTAL 4 double gt item deliv_date date ryyyymmdd gt item purch_date date ryyyymmndd gt item product
132. PER Works on Byte type fields eccecceccesceescesceeseceecsecseeaeesaesecseceeeesenseeeresereneeenes 66 TE USA ER EE EE loeveusents cancnsadecacvsveceavecudetevedcuveesuveusuisuonnectneetnea stevens tases 66 Extract USALE ian r E E EEE E EE A EE TEES 66 EXAMPLE ensenen krni rrer casted bocsupencedecccboes deve Ko rS EESE hop Erea ESE EOT EEEE EES 66 Data Exam plese secccccccussseiesacgedsdesvsieeste EEEE EE A EE ATE EEE 66 SPLIT Works on Byte type fields Jcn nensi rene n E E E E 66 If Usa perene inen EE EE EE E A EAE TETEE EE 66 Extract Sages onn ierre E EE EEEE E E ETE EEEE 67 Data Example S ereccion s aE o ETATE EREE E EE EEA 67 Data EX MPlES ann orninn ia EEEE E REEE E EEE EET E EEEE EE 67 FINDCLEAN Works on Byte type fields cceccccceseesecscecseceeeeseceseesececnseeseneseeeeeeeneeeaes 67 TE USA B62 i coves cecnacisves ectedevawclcaees cash E E E EEE ET EEEO 67 CLEAN Works on Byte type fields cccccccessesesssescesceseeseescescseeseesecsecasesensecsecseesesaeeseeeesees 67 If Usage Not Commonly USE eroten sntys shaud nE E EET NEEE As 68 Exact USAGE merae a A neues vectuuabens E teaenee E A OAS 68 Example nisen easa e a E OE A E E EE 68 Data Examples miega naear r a E E E E A OAS 68 TRANSLATE Works on Byte type fields s nseseeesesseseessesessesesstersseestseesesessesessrereseesesees 68 IPUSa SE E ahotara enr a E E E AAS 68 Extract USAGE Emain E E E EE E AAS 68 Data Examples Using above COde 0 eceesccces
133. Qedit style control characters for modifying the commands The default mode is to replace characters To delete use Control D to insert use Control B If you prefer HP style modify D R I and U use the Redo command instead of Before Examples SIL fd sd is not spelled right fd not found Before redo most recent command ll fd last command is printed s you enter changes to it IL 8d the edited command is shown you press Return listredo 10 before 5 redo 5th command in stack bef 8 10 redo 8th through 10th b 1s redo last Is command b ls redo Is command Sb redo last containing Sbefore 2 redo command before previous Sbefore 5 2 redo by relative lines Modify Operators If you wish to change any characters within the line the modify operators are the regular Control Codes used in Qedit Any printing characters replace the ones above Control D plus spaces deletes columns above Control B puts you into insert before mode Control A starts appending characters at the end of line Control A Control D plus spaces deletes from the end Control T ends Insert Mode allowing movement to a new column Control G recovers the original line Control O specifies overwrite mode needed for spaces Suprtool Open 5 6 User Manual STExport Commands 239 Persistent Redo Redo commands can be saved in a permanent file and can therefore be used from another session You
134. RN for individual users When the URL contains a user construct the server knows it has to look for the default directory under the user s home directory Let us assume the default is public_html You could create a public_html directory under the home directory for the userid specified in the configuration file Another option is to create a new user on your system with the same directory structure whose sole purpose would be to hold these dynamic HTML files For example create a user called htmluser whose home directory would be users htmluser Create a users htmluser public_html directory Directory permissions should be read write for user group and others The URL to read these would then be http www mycompany com htmluser filename html Shell Script Suprtool and STExport will be executed from a Korn shell script Let us call it sx_orders ksh It can reside in any directory that has appropriate permissions to execute Do not forget to assign eXecute permission to the file chmod x sx_orders ksh You can run this script manually from the prompt to see if there are any problems STExport Commands 259 bin ksh Make sure the PATH variable includes opt robelle bin where Suprtool and STExport usually reside PATH PATH opt robelle bin Create a temporary logfile and get a file name for the temporary extract file temp_sxlog mktemp touch temp_sxlog temp_sxdata mktemp Run Suprtool and e
135. S oe hoten E EET E SAE RTE A A E AET 28 Report without Duplicate Records esseessesseessssseseseeseeseteseeseessesseessesstestesseeseessesse 28 Report Only the Duplicate Records esseessessesssessesesesseesesseeseessesseessessreseesseeseessesse 29 Report Only the Unique Records c cc ceeeessecescecseceeeeeeeeesaeceececeeeeaaeceaeecneeseaeeeeeeenas 29 Report Only the Duplicates and Their Originals ccesceececeseeesteceeeecseeeeeeeereenes 30 Deleting Duplicate Data File Records eecceccecssceesseeeeeeeeceeeeceeeeaaeceneecneeeeaeeeeeeenas 30 Decimal Places seis vases asses eg AA acy Be eeheg Meee as oles Salen NA a on sac Pe sap So al 31 Converting NUMDELS ric gana hs Seg E EET OENE EAA E 31 Counts and Subtotals cta cs ced acl nde Ae EE OERE E TO ane ees 32 Count and Subtotal on Sort Keys cee ceeeesscceeeecseceenceeeeeesaeceeeeceeeeaeceeeecneeeeaeeeeeeenas 32 Sort by Count Or Subtotal ait cist E e E EAR weenie ie 32 Total by Fielde arein SE O E tag Satay EE eden eens 33 Running Totals seere heee E R E ainda wave E E E 33 Running S bTotals sen arinei nena E O OE EA E E 33 Listing Records ane e E ETE EO E A E A a EE 34 Changing the Output Record Format ssesssessesssessesssesseeseesseeseessessetssesstestesstestessesstessesseesres 34 Producing a Condensed Table Listing cccccccessesscesseesceseeeeceseeeeeeseeeeecaeesaecseesaeeaeenaeeneeeseeas 35 Simple Reports aneso inerte E nE E E E
136. SE APPEND Default DATA only new file New Files The filename is the name of a new disc file to be built by Suprtool Output xxx If Suprtool cannot Save the new file because of a duplicate file name you may purge the old file or give the new file a different name If Suprtool is running in batch mode it renames the new file as Outputan where nn is the lowest number between 00 and 20 that makes a valid new file name The Outputzn file is built in the same directory as the duplicate output file and not in your current directory Existing Files The filename is the name of an old disc file to erase Output xxx erase or to append to Output xxx append Output xxx erase does not purge the existing file it simply overwrites the contents of the file Stdlist Specify output to stdlist by a single asterisk Output Use this filename with the ASCII option for a quick listing of a file or database table Format Options The format and length of the output records is determined by which of the following format keywords is selected Keyword s Format DATA Default ELSE Records not qualified by if condition KEY Sort keys only NUM J2 record numbers only NUM KEY J2 record numbers plus sort keys NUM DATA J2 record numbers plus data record QUERY Self describing file LINK New format self describing file NUM QUERY Query numbers format ASK COGELOG ASK select file ASCII Convert numeric to ASCH DISPLAY Convert numeric
137. Suprtool but only through roundabout methods These are too case specific to document here If you need to do this call Robelle technical support for assistance Self Describing Files When you are using the Count or Total options the sort information is not retained in the output file This means that if your output file is in LINK format there are no sort keys If you are going to use this file from Suprlink use the BY clause of the LINK command to manually specify the sort keys Non Self Describing Files If the input file is not a self describing file and you are using Count or Total you also need to extract all the fields from the file You can quickly extract the fields by defining a new field that contains the entire record For example if your records are 56 bytes long then you do the following to extract all the fields Suprtool Commands 101 gt define entire 1 56 byte gt extract entire Output Restrictions When you are using the Count and Total options the only Output formats that you can use are Data Data Num Query and Link If you want to quickly see the Count or Total results without using a second pass use the List Standard command gt select from table gt sort key field gt duplicate none keys count total data_field gt output result link gt list standard gt xeq Notes The option of Only or None must be specified before the option of Record or Keys Reversing the order causes a syntax er
138. Suprtool Commands Add and Subtract Dates With the days function you can generate a date that is n days before or after any date In the following example we show you how to get the previous day s date gt input YOURFILE gt def origdate 1 8 gt def yesterday 1 8 gt item origdate date yyyymmdd gt item yesterday date yyyymmdd gt ext origdate gt ext yesterday Sstddate Sdays origdate 1 or 7 for next week gt out tmpfile link gt xeq Sample output ORIGDATE YESTERDAY 19990101 19981231 19991231 19991230 19990301 19990228 Date Limits The date function in Suprtool can generate dates between the years 1583 and 2583 Some date formats have limits based on their particular format such as 2027 for a Calendar date and 2259 for the aammdd aamm mmddaa ddmmaa dates Range of Fields Extracting a Range of Fields You can specify a range of fields to extract using the following Extract Field1 Field4 This feature only works with Eloquence fields input files equated to an Eloquence dataset and for self describing files If you specify a range Suprtool extracts all 4 of the field names between field and field4 inclusive When specifying a range of a self describing file that has been equated to an Eloquence dataset the Eloquence dataset definition takes precedence gt get d sales a self describing file gt ext product no sales qty gt out dsales gt xeq is exactly the same as d sa
139. X disc space reduced cece seeseeeeeeesetereeeeeeeeees display constants ie erse s ner sie e display fields maintaining the sign Display Option ssssseesesessseeetesestsetetrrsrsrersrrerreresseser Do command ce eeeeeeseeereeeeeeeeeeeeeeeeeees documentation dotble quotesisant icacealkhe i 251 double sided printing ccceececeeceteeteeteeteeeeeeeee 153 downshifting strings Dumponerror Set Option ceeeeeeseneeeeeeeeeees 180 Duplicate and non SD files eee eeeeeeesceeeeeeeeeees 86 Duplicate command B duplicate field names eceeececeeceteeteeteeeeeeeeeeee 301 duplicate keys order Of sort 0 cee eeteeeeeeeeereeeeees 49 duplicate output file ee cess eeeeeneeeeeeeeeeeenees 42 Duplicate records 26 84 167 duplicates removing 00 eee eteeeeeeeereeeeeeeeeenenees 84 duplicates SAVING oo eee anaiai e 84 dynamic dataset expansion 116 117 dynamic Web pages 0 cceessesseeeeeeteneeeeteeeeeeees 242 E EBCDIC conversions cccsecceccesceeeteeseeseeseeseees 114 Editicommand x sicie dela inaecetincnveiasee 89 Suprtool Open 5 7 Edit mas Kiser ii iE EE EEA editing databases EditStoperror Set Option ececceceseeteeteeteeteereeee 180 EDS date enaena a AEA 144 Bloquences seen E E E E 60 Eloquence loading 0 cesses seeseeeeseeeteeeeseeeeeeeees 38 Else clause of the IF command eee 122 Bl se Option srie 162 end of file
140. _price decimal 2 gt item sales tax decimal 2 gt item sales total decimal 2 gt extract customernum gt ext deliv date gt ext PRODUCTNUM gt ext product _price gt ext purch date gt ext SALESOTY gt ext sales tax gt ext sales total gt output salefile link gt xeq IN 8 OUT 8 CPU Sec 1 Wall Sec 1 gt form salefile File salefile SD Version B 00 00 No linefeeds Entry Offset CUSTOMERNUM 2 1 LIV DATE Z8 5 lt lt YYYYMMDD gt gt ODUCTNUM I2 13 ODUCT PRICE I2 LP oe O D RCH_DATE I2 21 lt lt YYYYMMDD gt gt LESQOTY P12 LES TAX I2 lt lt 1 2 gt gt LES TOTAL i2 lt lt 1 2 gt gt Length 38 Blocking 1 Notice how the Form command correctly identifies which fields are dates and which fields have implied decimal places STExport uses this information to format the file STExport Output We then use STExport to read the self describing Salefile to produce our sample output on stdlist To demonstrate how dates are handled we insert a separator in each date field 284 Example of STExport Output Suprtool Open 5 6 User Manual opt robelle bin stexport input salefile self describing input file date yyyymmdd dates with a dash separator Soutput output to stdlist Sxeq 10020 1993 10 05 50511501 98 31 1993 10 01 0 02 27 53 224 15 10003 1993 10 15 50511501 98 31 1993 10 15 0 01 13 76 112 07 10003 1993 10 15 50512501 145 62 1993 10 15 0 01 20 39 166 00 10003
141. a E E aaie as 291 Suprtool Link Command erpe sireeni ii EEE EE KE ETETE EEE SEARES 291 Exit with Veri ne e R E T E E R 291 Using S prlinkin Batchicicscicictacscaecivisiiasaniteiveestele atecnedeiceenrestet E EE EEE 292 Command Line Options ennerien E E EE EEE EE EEE ETE a LE E a e as 292 Default Outcount File Name 0C 0 0 eeseescecsecesseceeceeeeeceaeceeeeceaeseaeeceeeeeaeeeeneeneees 292 Variable Substitution V cceeceeeccessccessecsseeeseeceeeecseceeceeseeeesaeceeeeceaeseaeeceeeeeaeceeeeenatees 292 Introduction to Suprlink 293 How Report Programs Work 0 ccccceesesseceseceeeecseeenceceeeecseceeneeaeeesaeceeeecaeseaeeceeeesaeeeeaeentees 293 aput FIEst iinn enai xis s E E SEEEN iee EEEE SRE e OCETA EES EE iE ee 293 Dank Piles oish eiiiadi ton sdntsi ath avian re Eea EEEE ATE EEEE OEE NEE OSEE i E 293 Output Files iesin ienne nnion Er E EEEE EEE aee EEEE REE e EET DETE EERS 294 SLO CD EEEE EE AERA E T E EE 294 Selection LOGIC en einas onei ioie EEEE EE S cals Ee OETA EEEE AREE A EEEE Ea i Eea 294 A Tink Example niinen ninure i er aei aaraa EEEE E TSE E EEE EEO EEEE 294 A Jom Example ne eenen evita iaire E Ea ei EETA EEE EAE E EEEN EEE i Ea 295 Performance Considerations misni nesie eenei eona ETER S EET E DEE E i EE 296 Another Example ninen ai en e a a a AE E a aides e meted wees 297 Megal Diris drna rae Ero EEAS EE TOENE AT EEE EE A aes ENEE EN 297 Selecting Non Matehesimeenoe nenit beckons E EEEE ot teen idee T AEA 298 S pilink wit
142. abase Suprtool reads more than one row at a time when processing the input source By default Suprtool fetches 100 rows at a time You can vary the number of rows that Suprtool fetches with Set Allbase Rows The minimum number of rows is 1 and the maximum number is 990 You must specify Set Allbase Rows before entering the Select command Arithmetic SET ARITHMETIC Classic IEEE This command has no effect in Suprtool Open Baseclose SET BASECLOSE ON OFF This command is not supported in Suprtool Open Blocksize SET BLOCKSIZE size This command has no effect in Suprtool Open Buffer SET BUFFER size Initially depends Default no change This command has no effect in Suprtool Open CleanChar SET CleanChar Default space Suprtool Commands 191 192 Suprtool Commands By default Suprtool will replace any of the characters specified in the clean command with a space You can specify what character to use to replace any of the characters that qualify with the following set command gt set CleanChar This will set the character to replace any of the qualifying to be cleaned characters to be a period If you want to Clean a field and not replace with any character you just need to set the clean character in the following manner gt set CleanChar lt null gt CurrencySymbol SET CurrencySymbol Default period This setting is used to change the Currency character which is used to
143. able substitution has occurred This setting only works if Set Varsub is on and Set VarsubDebug is on export outfile amp GREEN SUPRTEST filename 901234567890123456789012345678901234567890123 45678901 opt robelle bin suprtool SUPRTOOL OPEN Copyright Robelle Solutions Technology Inc 1981 2013 Version 5 6 Internal gt set varsub on gt set varsubdebug on gt in filelsd suprtest vd in filelsd suprtest gt output outfile link temp vd output GREEN SUPRTEST filename 90123456789012345678901234567890123 vd 2345678901 link temp The output is formatted into 74 byte chunks and printed with a preceding vd so the substituted line is clear The above example shows Suprtool however the same commands apply in STExport and Suprlink Warnings SET WARNINGS OFF Initially ON Suprtool normally prints warning messages out to stdlist You can turn off these messages when you are running from batch by issuing a Set Warnings off command If you are simulating batch mode with the Set Interactive Off command you must do the Set Warnings off after the Set Interactive Off The default for this setting is On Suprtool Open 5 6 User Manual Suprtool Open 5 6 User Manual Xmitagchar SET XMLTAGCHAR we woe gee Initially In XML the tags that surrounded the data can not have any special characters other than hyphen underscore and period _ So STExport replaces any of the invalid special chara
144. ad of Output Suprtool sets the Output to null so that only a listing is produced LIST OCTAL HEX DECIMAL CHAR NOREC LABELS RECORD DUPLEX ONEPERLINE LP NONAME NOSKIP STANDARD DEVICE name DATE format TIME format PCL format LEFTJUSTNUM RIGHTJUSTNUM TITLE string HEADING string string FILE filename APPEND RECLEN number Default Octal Char or Formatted If Suprtool knows about the fields in the input source e g because you have used the Extract command the list records are formatted with field names and internal binary data types e g integer are converted to ASCII You cannot combine the Ask or Query Num output options with the List command Here is a typical use of List to find any entries in the Customer table that do not have a valid value for status gt open oracle demo reader input from a database gt select from customer read this table gt if status lt gt 10 20 30 40 the only valid values gt list print bad entries gt xeq Format You can override the defaults with a specification in the List command e g List Hex Char If the input source is not self describing and no Extract command is specified the default output format is Octal Char which also shows both input and output record numbers Decimal Places The List command formats numbers using the implied number of decimal places For example the fo
145. aeceeeecneeseaeeeeeeenas 52 stddate and Set Date Cutoff 4nsnacniiondi EE E ine ulania einen kee 53 What does Set Date ForceCentury do ceccceccecsseeeseeeeeeeeeceececeeeenaeceeeecneeseaeeeeeeenas 53 What If I Have Two Digit Years c cc ceccessececcecseceeceeeeeesaeceeeeceseeeaaeceeeecneeeeaeeeeeeenas 53 What Is Wrong with Two Digit Years ceccecsceesceeeeeesseceeeeceneeeaeceeeecneeseeeeneeenas 54 How Do Today and Date Work ccccccessesccesceeecesceeeeeseeeeecaeeseecaeeeecsecsaeeneeaeeas 54 Will Suprtool Generate an Error for Two Digit Year Dates o n 55 How Do I Use Today and Date with yymmdd Dates 00 0 cccceceeceeseeseeeteeneeeteees 55 aammdd Date Format ceeceeeccesseceeeecseeeeeeceeeeceeeeaeeeeeesaeceeeeceueesaaeceeeecneeseaeeeeeeenas 55 Invalid Dat s ineeie nininini eiiie iee Ea casi ovtadea sh savas lessees ivibeavtes mace Sioa 56 Can Suprtool Convert Two Digit Years to Four Digits 0 0c cece eeseceseeseeeeneeeeeeenes 56 Case 1 Converting a J2 Date from yymmdd to cceyymmdd ee ceeeeeeeeeneeeeeeeees 56 Case 2 X6 yymmdd Data to X8 CoyyYMMAdd eee eeeeceesseceeeeceteeenaeceeeecneeeeaeeeeeeenes 57 Case 3 Different Date Formats X6 MMDDYY Data to X6 YYMMDD 59 Performan Enora Reeve sd cates cies Te EN E Besa te AA apenas abet dark aes tase ethene Re ees 60 Eloquence Performancen sin en ote cevke etre O EE E EE 60 Sort Performan E seon eirian hs aE NEA EEE
146. ample overflows the data space gt define char 256 1 256 gt if char 256 a b c Error Data Overflow In this example Suprtool attempted to create three 256 byte constants There wasn t enough room for the last constant Solutions to this problem include If possible define short fields If you have long field names you may want to use the Define command to define shorter subfields Use tables and lookup for many values Split the extract task into multiple passes On the first pass use an If expression that results in the fewest possible number of output records Use the output file from the first pass as input to the second Apply the remainder of your If expression during the second pass Error Code Overflow Suprtool translates If commands to an internal machine representation There is a limit on the size of this code When an error occurs there is little you can do except use tables and lookup wherever possible and when this fails use multiple passes Read in Usefiles When you specify read in a usefile Suprtool expects the If expression to appear in the usefile This provides a method for storing and executing complicated If commands You can also manipulate Suprtool into prompting for portions of an If command When the If command with read is the last command in a usefile Suprtool satisfies the read from stdinx The read function can appear anywhere in which a space can appear so you can use this to
147. amples eenen oE o EEE EEEE EERE ERE EEEE EET E EEEE 74 Other FUNCtONS sesssoeie iss nee EEEE or esie eeose E KSEE ESES RoE E VASES ESAE ESES rE NEES Eea 75 SLOOK UP E E EE E E E 75 RO R E NOAR EAE TE EE EE EAA 75 Exact Usage rosee sE E RE E A EEEE EEE 75 SNUKER aeina tee n ai E a E E E ROR 75 PREA Di aE arae a A A O EE E E E S 75 Usate nges E A E E E E OE A E 75 Dat F ncfiohS nesre agan ane a a EA E A R NEE EA 76 STODAY pogron a a a E E E read ate vets a A E OR aly 76 AOE EP A O T E A AET 76 Extract USAR mitano E A E E E E E R EAE NE 76 SDARE orea a E E E taal stan E 76 Usate inneoin a N E E EA E AE S 76 E S iVe BA USA U o EET EEE AE E EE TA E E EEO OO 76 SEIN WAST AAE E A E E TAE TAE E EE EEA 76 TE WSA N EAEE sea dak AEE EE A A E E E AE O 76 Extrae Usa e rae a ETA ERA AAAA Nes TEE AA AEE 76 Table of Contents 7 BSED DAT BE rir ea nE estes sav So AEE E there obs cava EET ANE A 77 MUSAE eneen AEEA vine cuiete tic vv eves T A E E EEE EE E E 77 Extract Usage a oee thtecviecs ices steee sees tweens aut eve cue coev vanes Duoue E ae EA EEn 77 SDAY Sein fesse e eee AEC aa ed ies ee a oan co tev cae ce Reseed tees es te eee nee eases 77 TP USA EEA A A E A EE E awn Nata eebeanere eek 77 Extract OSA BOs oe oea cs theaevey sa ouss teose ks oud tev sho cbceynek owe eaeaet eave dauesecoovtbewectouh coved hh Suprtool Commands 78 Genra Not Suennen aa E TE E iene a hnhat cele aie E A E dant ie 78 Abbreviation ar E EE ot lee e
148. ance of STExport Perl Script cccceceseesereeee Permanent red0 eeeeeceeceseeeseeereeeeeeees Persistent redo eceeeeeseeeeseseeeeeeeeeeeeees personal computers e PHdate option Item command positive value as POWELHOUSE ietie ee aE EAEN PowerHouse applications se sssseeeesisereeseeeeresseeeeees PowerHouse dates PowerHouse subfiles 0 eee eeeeeeeeeee Prefetchys seus acteviee actin sean anette nies preformatted HTML option cece eeeeeeeeeees Printer Command Language printer attached to terminal i printing reports isesi asie PRN Opto ns 252080 nent eiss Processing selections cececeseeteeseceeceeessenseneeeseees PFOQTESS MESSAGES 0 0 eee sceceseeeceeeeeeceeteveeeseeeeeeeees prompt character nes Prompt Set Option cccceeceseecceeceeceteeteeteeeeeeeees Prompting USING QUIZ eee eeee ete teteeteeeeeeeteeees pseudo batch tasks Put COMMANA 0 ec eceeseseeeeeseeeeceeceeceeeeeaeenee Q OrcommMand sree R Es 168 Qedit program occ ceeeceeseeteeteeeeeeeeseeteeeeees 49 70 223 Qedit program and Suprlink Qhelp vice da Adenia hE cette 239 OTP for Subfile cs esvcevesisckstvachiassestessertedavessrxcoreewtenseetss 51 QTP Cognos ce eeeeeeseeeeee 283 QUERY numbers format 163 Query OPTION ee ceeeeesereeeeeeeeeee 162 question mark database password s cecceeeseeees 68 question delete all records
149. and gt set date ifyy2000error off gt item trans date date yymmdd gt if trans date gt date 2004 01 01 Century and Date Suprtool needs to generate a date or today date in the ccyymmdd format If you specify a two digit year in the date function Suprtool needs to assume a century for the given date gt item trans date date ccyymmdd gt if trans date gt date 01 01 01 Suprtool assumes 20 for the century if the specified year is less than the Set Date Cutoff value and 19 if the specified two digit year is greater than or equal to this value Oracle Dates Oracle dates contain both the date and the time The date and today functions check the date but ignore the time Date Limits The date function in Suprtool can generate dates between the years 1583 and 2583 Some date formats have limits based on their particular format such as 2027 for a Calendar date and 2259 for the aammdd aamm mmddaa ddmmaa dates Suprtool Commands 151 Non Collating Date Types You can use the stddate function to convert the non collating date format to a J2 data item with a date format of ccyymmdd For example to select the purchases by the field purch_date for November 2000 in a ddmmyy X6 field you would use the stddate function as follows gt item purch_ date date ddmmyy gt if Sstddate purch date gt date 2000 11 first and amp stddate purch date lt date 2000 11 last Dynamic Dat
150. and specify the various options and tags themselves in order to generate a file that is acceptable to their tools Version You can specify the version tag at the beginning of the XML file with the following command xml version xml version 1 0 encoding ISO 8859 1 STExport will put the lt and gt around what is specified in the version string Suprtool Open 5 6 User Manual STExport Commands 279 280 STExport Commands Doctype A Document Type Declaration can be made at the beginning of the file via the DOCTYPE specification This typically tells whatever tool that is parsing the xml file where the DTD for the file resides In STExport you can specify simple one line doctype specs with the following command xml doctype DOCTYPE address book SYSTEM address book dtd This will write the doctype specification at the top of the output file directly after the XML version specification File You can customize the file tags with the following command commands xml file orders STExport will put the lt and gt around what is specified in the File string Record You can customize the record tags with the following command commands xml record Details STExport will put the lt and gt around what is specified in the Record string Example You can enter multiple XML commands per task to set the XML options you require Sin filelsd Sxml version xml version 1 0 encodi
151. and then with Suprtool Oracle sorts data gt select from emp order by ename Suprtool sorts data gt select from emp gt sort ename Analyzing Performance Data It is better to test Suprtool with your own database and your own application needs rather than trust a generic performance test The ideal test is an actual production report whose bad performance is causing you a problem If you obtain improvements by using Suprtool you know that you can achieve better speed in practice as well as in tests Use Suprtool as a front end to your problem report producing a small extract file that contains just the fields and records needed for your final program Once you get that working consider linking in data from other files or datasets using Suprlink For comparison purposes run the Suprtool test at the same time as you would normally run the original program Comparing a standalone midnight run against a mid day run does not give valid results nor does comparing two runs in succession Variable Substitution Suprtool Open 5 7 Suprtool supports environment variable substitution To use this enhancement you must do a gt set varsub on Due to how Unix Linux processes work with environment variables any variables must be exported prior to running Suprtool STExport or Suprlink All of these modules support variable Substitution Suprtool Issues and Solutions 61 export tablefile abcdefghijklmnopgqrstuvwxyzabcd expo
152. andled correctly so the Form command shows compound fields just as you would see them in IMAGE The Item command in Suprtool identifies the date format of an item The Link output option saves the date format and any decimals as part of the field description 308 Suprlink Commands Suprtool Open 5 7 form datafile File datafile SD Version B 00 00 Has Linefeeds Entry Offset CHARACTER x5 1 lt lt Sort 1 gt gt REPEATINT 311 6 compound field DATE J2 lt lt YYYYMMDD gt gt DOLLAR P6 16 KE OSS Entry Length 16 Blocking 1 Notes If you do an datafile it should show another file with a sd extension This file contains a description of its own record structure this allows you to refer to the field names and Suprlink can compute where they occur in the record Formout File The Form command writes all output to the file Formout This file defaults to stdlist form custfile writes to line printer Suprtool Open 5 7 Suprlink Commands 309 Help Command H The Help command has been disabled in the Open version of Suprlink 310 Suprlink Commands Suprtool Open 5 7 Input Command I Suprtool Open 5 7 Specifies the primary input source and the name of the key field by which it is sorted INPUT filename BY key field There can be only one Input file per linkage task but up to seven Link files The Input file should be created by Suprtool using the Output Link option and must be sorted by ke
153. ands Here is a sample command definition EXTRACT field subscript value UPPER case letters literal symbols to be used in the command as they appear e g EXTRACT Lowercase underlined or italic variables to be filled in by the user example field Each such variable is defined elsewhere in terms of literal symbols consult the index In the help file underlining and italics are not available and variables appear simply in lowercase Brackets enclose optional fields example subscript Suprtool Open 5 7 Braces enclose comments in examples For example gt INPUT ACTREC input from a data file Braces can be used for comments in actual Suprtool commands Up lines separate alternatives from which you select example Set Ignore On Off sometimes the alternatives are shown listed on several lines Dot dot dot indicates that the variable may be repeated many times in the command Other special characters literal symbols that must appear in the command as they are shown in the format example the comma above Some commas in Suprtool are optional In examples there is an implied carriage return at the end of each line Suprtool Open 5 7 Welcome to Suprtool 17 Suprtool Version 5 7 Highlights in Suprtool 5 7 18 Suprtool Version 5 7 Suprlink now has it s own Suprmgr file Suprlink will process all the commands in opt robelle linkmgr on startup STExport n
154. anging the Time Format When you select page headings by specifying a title each page includes the current time By default the time is in 24 hour format e g 23 02 You can override this format with the Time keyword Use the Set command to specify a different default time format for future List commands e g Set List Time 2 The valid time formats are as follows Value Format Example 0 none 1 default 24 hour 23 02 2 AM PM 11 02PM gt list title Example Report time 2 gt xeg time will be in AM PM format Simple Reports A Fast Method for Producing Simple Reports For self describing files datasets and database tables the Standard keyword is equivalent to List Noname Noskip Norec Rightjustnum with default column headings For data files the Standard keyword is equivalent to List Octal Char In either case the Standard keyword provides a default title that describes the input source You can override the title date format time format or any other option selected by the Standard keyword by specifying them in addition to the Standard keyword For example Suprtool Commands 169 select from customer gt list standard use all Suprtool defaults gt xeq gt select from customer gt list standard date 3 override the date format gt xeq gt input uxfile reclen 80 nolf gt list standard char override the format options gt xeq gt input uxfile reclen 80 nolf list standard leftjustnum left justify number
155. ank line The string of up to 253 characters is printed on stdlist The string is truncated to the record width of stdlist The string must be embedded in quotes Either single quotes or double quotes are permitted The quotes are not printed on stdlist Examples The Q command is often combined with the Userpause command The example is a usefile that provides an explanation of how long a task takes gt q gt q We will select all transactions over 10 000 Since gt q there are many transactions this task will take gt q some time usually more than fifteen minutes gt q gt userpause Press any key when you are ready to start Suprtool Open 5 7 Suprtool Commands 183 Redo Command REDO 184 Suprtool Commands Enables you to modify and repeat any of the previous 1000 command lines REDO start stop string ALL Default redo the previous command Comma is short for REDO The Redo command allows you to modify the commands before it executes them If you don t need to change them use the Do command Commands are numbered sequentially from as entered and the last 1000 are retained Use the Listredo command to display the previous commands You can redo a single command a range of commands or the most recent command whose name matches a string The Redo command uses MPE style editing logic D I R U and gt The default mode is to replace characters To delete type DDDD
156. annot save the file it produces an error The Append Erase and Temp options are the same as in the Output command although the TEMP option in Suprtool Open is simply ignored and a new file is created If you want the totals written to the end of the List device the output of the List command specify list as the file file name All other options are ignored when list is specified To write totals to the output file use Total file xxx Append where xxx is the name of your output file Appending totals to the output file only works if the output file is a disc file Examples The first example prints the totals for a single field gt in filel r 40 nolf gt def amount 1 5 gt total amount TUE OCT 10 2000 4 30 PM 611105 The next example is identical to the previous one except that we qualify the total with the number of decimal places 218 Suprtool Commands Suprtool Open 5 7 Suprtool Open 5 7 gt in filel r40 nolf gt total amount 2 gt xeq Totals TUE OCT 10 2000 4 31 PM AMOUNT 6111 05 The previous example specified the number of decimal places by using the Total command The next example is the preferred way to specify decimal places because it qualifies the balance field with two decimal places for all Suprtool commands This example also totals two fields gt input filel r 40 nolf gt def balance 11 4 integer gt def overdue 21 4 integer gt item balance decimal 2 gt item o
157. ans stdinx stdlist file command filename s25 vowels les Sees ra RA MEANS StLING ensa EE AEA s 332 r means range of records eseeeeeeeee 119 140 333 MM CANS StrIN Bs oesi esiin n EE EAE as 332 olosed tables c cs c ccictassnveys eae 198 means range Of fields ce eceseesecseeseeneeneeneeeseees 97 350 Index Suprtool Open 5 7 amp amp continuation character cccccccecccesseeeseees 285 331 amp means escape pattern eeeeeeceseeeeeesteeeeeeeees 331 matches number eeeeseeseesesesseessseeseesereeseeseseesee 331 means every n th record 120 141 331 Yo MEANS percentage ee ceeeeeeeceseeeseceteeeeeeneeeeeeneees 333 A means character Constant ccccccceeseeesseeee 95 126 lt lt means Jess than isis icticts dees risen tee hse 330 lt gt means not equal tO eeeeeeceeceeceteeeeseeseeseeneeee 330 means Calculator ierosin e 330 MEANS equal tO eeeeeseeeseseeeeceecececeeseeeeeseeseeseees 330 set name parameter eee eeeceeeeeeeeeeeeeeee 114 330 means matches pattern ceceseeseeteeseeteeneeee 330 gt gt changing the prompt character eee 191 gt is the prompt character 330 gt means greater than 330 gt lt means doesn t match pattern 0 0 eee 331 abs function atoe Extract function Clean FUN Ct Ot sce essere neste enone Clean Function
158. arget Byte type fields ext byte _target ltrim byte source Example DEF lastname 1 16 byte EXT lastname ltrim last_name Data Examples before and after gt IN STRINGS NEIL GREEN 0 gt OUT SNULL 0 LASTNAME ARMSTRONG ext lastname ltrim lastname gt IN STRINGS NEIL GREEN 0 gt OUT SNULL 0 LAS TNAME ARMSTRONG RTRIM Works on Byte type fields Purpose is to remove spaces from the right side of the field If Usage if Srtrim first_name Neil Extract Usage target Byte type fields extract byte target rtrim byte source Example def lastname 1 16 byte ext lastname rtrim last_name Data Examples gt IN STRINGS NEIL GREEN 0 gt OUT SNULL 0 LASTNAME ARMSTRONGbb gt IN STRINGS NEIL GREEN 0 gt OUT SNULL 0 LASTNAME ARMSTRONG It is difficult to show what SRTRIM does in a simple instance however it is perfect for constructing merging two separate fields into on as in ext fullname Srtrim first name Strim last name Data Result Neil Armstrong 64 Suprtool Issues and Solutions Suprtool Open 5 7 UPPER Works on Byte type fields Purpose is to make all relevant bytes Upper case If Usage if Supper first_name NEIL Extract Usage target Byte type fields extract byte target Supper byte source Example def lastname 1 16 byte ext lastname Supper last_name Data Examples gt ext lastname Supper lastname gt IN STRINGS
159. ave a data file with lines that look like this 12345678John Rutherford lt 32 gt 98765432Catherine Smith lt 29 gt It l Account First name Last name Age 8 byte 12 byte 16 byte 2 byte integer Use these Define commands to tell Suprtool about the fields Quick Start Guide for Suprtool 21 gt input datafile reclen 38 1f gt define account 1 8 byte gt define first_name 9 12 byte gt define last _name 21 16 byte gt define age By 323 aint field name Length Start Data type position Now you can use the field names account first_name last_name and age to refer to the corresponding parts of the line just as if this were a database record gt input datafile gt define gt if age gt 65 gt ext account last _name gt output result gt xeq Create an SD File from a Data File To create an SD file from a data file follow these steps 1 Define the fields that you want to include in the SD file 2 Extract the fields in the order you want 3 Use the Link option in the Output command to create the SD file gt input datafile reclen 38 lf gt define account As 1 byte gt define first name 12 byte gt define last _name 21 16 byte gt define age Bi 2p ANE gt extract account age first _name last_name gt output result link gt xeq Repeating Commands Repeating a Command Use the Listredo command to see a list of your most recent commands Use the Do
160. ave a redo stack called myredo for your Suprtool commands If you exit Suprtool and run Qedit and supply the same Set Redo command your Qedit commands will be written to the same file that was used for your Suprtool commands SDExtname SET SDExtname ON OFF Suprtool can create SD files with extended names when you set SDEXtname on By default Suprtool will behave as normal and truncate field names at 16 characters If SDEXtname is on Suprtool will write out the fully defined field name or if the input source is Oracle the full Oracle field name up to 32 characters to the end of the sd file Suprtool will use the extended names whereever possible The Suprtool List command does not take advantage of the new extended names at this time Suprlink will merge the extended names and create the proper information in the output SD file but will not use the extended name when linking two files Suprtool Commands 207 208 Suprtool Commands Sortfast SET SORTFAST ON OFF This command has no effect in Suprtool Open Squeeze SET SQUEEZE ON OFF This command has no effect in Suprtool Open Statistics SET STATISTICS ON OFF Initially OFF STATISTICS causes Suprtool to print statistics at the end of each task This can be useful for determining the effectiveness of Suprtool s If and Sort command versus similar options on the Select command Subsystem SET SUBSYSTEM ON OFF This command has no effect
161. ave access If you cannot open your Oracle database check with your system or database administrator so that your environment can be set up properly Once Suprtool has opened the database use the Form command to obtain information about the tables in the database Use the Select command to choose what data to read from your Oracle databases Oracle access is available as a separate add on module to Suprtool Data Types When you specify a Select command Suprtool figures out how to translate the Oracle internal data types so that Suprtool can process them Not all Oracle data types can be processed by Suprtool The following table lists the Oracle data type and the corresponding Suprtool data type Number Data Type Oracle numbers are translated into a variety of Suprtool data types The translation depends on the precision of the number and the number of decimal places The following table describes the translation for each case Precision Decimal Places Suprtool Data Type 2 byte Integer In packed decimal translations Suprtool uses the precision of the number to determine the size of a packed decimal number 48 Suprtool Issues and Solutions Suprtool Open 5 7 Order By vs Sort Oracle s Order By statement on the Select command does not always generate the same results Specifically sorted fields with null field values appear at the beginning when they are sorted by Suprtool s Sort command Restrictions Suprtool
162. ay be empty if you stop before the sort phase is over Many sites use Control C as the interrupt key instead of Control Y Use the stty command to display your intr setting You may see some Suprtool messages indicating Control Y is the key combination to enter when in fact you will need to use whatever you have defined in stty 80 Suprtool Commands Suprtool Open 5 7 Add Command Add Suprtool Open 5 7 Specify an SQL table to which you wish to Add records Add tablename Add Ownername tablename Use the Add command to insert records into an Oracle table You must specify at the very least the Oracle tablename and you must have opened the Oracle database to which you wish to add records The tablename specified must be a valid table and not a view The fields from the input source or the extracted names must be the same as the column names in the table to which you wish to add records You do not have to specify all columns in the table unreferenced columns will be given default values depending on their data type You cannot currently add records from another SQL table However you can extract the records you want into a file and then add from that file In the case where you have two target tables of the same name you can Insert records via the add command into the proper table by specifying the Ownername Tablename Notes Suprtool cannot currently support integers larger than two words The Ownername Table name
163. begins the extract from the input source XEQ Notes After the Xeq Suprtool processes the task and accepts commands to specify another task Compare this with the Exit command which stops Suprtool after processing the input After an Xeq command all parameters of Suprtool are reset to their initial values except any database that is left open the Set options and the Defined fields even though their calculated offsets are not guaranteed to be correct for the next file processed Examples gt open oracle demo reader gt select from customer gt output mcstfile gt xeq copies Customer to Mcstfile gt select from orders gt output allorders gt xeq copies Orders to Allorders gt exit terminate no task to do last Xeq could have been Exit Suprtool Open 5 7 Suprtool Commands 225 Calculator Command 226 Suprtool Commands Evaluates an expression and prints the result in one of several formats expression O D B H A Any command that begins with an equal sign is treated as an expression to be evaluated An expression consists of numbers and operators followed by an optional display format The operators can be addition subtraction multiplication division or exponentiation The value of the expression is printed immediately on stdlist 5 add two numbers together lt 35 0 multiply the same numbers lt 5 0 divide print precise result 5 E 5 subtractio
164. bility reasons users may wish to disable this error checking by turning Set Ifcheck Off Ignore SET IGNORE ON OFF Initially OFF This command tells Suprtool to continue processing if there are errors in these situations duplicate key errors in writing to an IMAGE master dataset chain head errors in deleting entries from an input dataset or putting records to a detail dataset a record changed before Suprtool could delete it Traps on divide by zero or bad numeric data are not available as yet InitExtents SET INITEXTENTS ON OFF Initially OFF Set InitExtents has no effect on Suprtool Open ltemAbbreviateDate SET ITEMABBREVIATEDATE ON OFF Initially ON The specification of the Date format within the Item command by default expects the entire keyword For example for the date format of Calendar you would have to specify the entire token of Calendar If you Set ItemAbbreviateDate On you would only have to specify CAL for the Calendar date format ItemLock SET ITEMLOCK lt fieldname gt Initially Spaces Item Level locking on Deletes and Updates can be invoked during a task with the Set itemlock command For example Ssuprtool base order 1 get dline set itemlock item num del out save link exit The Set command must be specified after the Base and Get Chain have been specified This field setting is reset after each task Item Level locking is not invoked for PUT operations Suprtool Commands
165. by using the None option of the Duplicate command Input Result lllla 1llla 2222b 2222b 22226 3333 2222 d 28 Quick Start Guide for Suprtool Suprtool Open 5 7 3333 e gt select from table gt sort keyfield gt dup none keys gt output result gt xeq Report Only the Duplicate Records This is an example of keeping only the duplicated records the original is not kept This example is the opposite of the previous example Use the Only option of the Duplicate command to do this Input Result 1llla 2222c 2222b 2222d 22220 2222 d 3333 e gt select from table gt sort keyfield gt dup only keys gt output result gt xeq Report Only the Unique Records This example shows how to report only those records without duplicates That is if the records have duplicates both the originals and their duplicates are omitted from the report Input Result llll a lllla 2222 b 3333 2222 c 2222 d 3333 e You have to use two Suprtool tasks to accomplish this The first task creates an intermediate file Dupfile that contains the keys of the duplicate records The second task creates the desired output file Result that contains only the unique records Suprtool Open 5 7 Quick Start Guide for Suprtool 29 gt select from table gt sort keyfield gt extract keyfield gt dup only keys gt output dupfile gt xeq gt get dataset gt table dup table keyfield sorted dupfile gt ift not Slookup dup
166. c constant or a date constant specified with date or today See the next section about Constants for more details Constant Type NATHAN ARMSTRONG string constant 12345 numeric constant date 00 07 09 date constant July 9 2000 Relations A relation is one of the size comparison symbols Suprtool does not use words like EQUALS as in QUERY Relational operator Means equal to gt greater than lt less than gt greater than or equal to lt less than or equal to lt gt not equal to Complex Expressions Complex expressions can be made by combining the AND OR and NOT operators arithmetic operators and mod and parentheses The order of precedence of operators from highest to lowest is Operator Precedence Highest NOT Take the opposite AND Both must be true OR One or the other must be true z Unary minus xy Higher than addition and subtraction Suprtool Open 5 7 Suprtool Open 5 7 Lowest Use parentheses where necessary to change the order of evaluation gt if status 1 and amount gt 100 or purchased 000115 gt if status 1 or status 2 and amount gt 100 Multiple Values You can check a data field for several test values without using the AND and OR operators After the equals or not equals sign list the alternate values separated by commas The OR operator is equal sign Instead of IF A 5 OR A 6 OR A 7 use IF A 5 6 7 This selects a record if A is equal
167. ccccccsesseesseeseeereees 176 SQL database inserting records eeeeeeeereeeeee 66 SQL database Select command ccceeeeeeeerees 173 SQL database specifying ce ceceseeteeteeteeteeeeee 160 SQL database Structure cccccecsceteeteeteeteeeeeeee 117 SRN Chronos date cccccccccccesseeesssecsseecssseeessees 145 startrecord parameter ccceeceesecseeeeseeeeeeeeeees 119 140 Statistics Set option 0 ceceseseseeseereeee 193 255 305 Stddate function cece ceseeecsseesseesseeseeeseaes 96 134 Stddate Set date cutoff Stdlist input frOM 0 ceeeeeceeeeceeceeeeceeeeeeeens 43 STEXPOrtivsicscssdetese Makes ae e aa string constants String CONVELSION ceceecesceseeeeceeenecceeseeceeseeseeneees 101 String CXPFOSSIONS eeecesceteeeeceecececeeceeceeseeseeneees 129 string of digits string replacement Hpmodify 0 ce eeeeeeseereeee 170 String tPUMCALION ce cececeseeteeeceeceecceecenseeseeseeneees string as a delimiter string heading command ccceeeseeseeteeteereeeeee 237 SINE Sani iei e i E aa eai stty terminal settings te s btotalin Seek ease scat Actes oer st R SuBfile scriptis ea tedious coi 51 subfiles PowerHouse ccccccccsccessecesseeeeees 51 282 subscript parameter cceeeeseeeeeeeeeeeeee 93 202 329 subscript parameter character cccceseeseeseeseeseeee 126 subscript parameter Define ceeceseeeeeeeee
168. ccecseceseeteeeeeeeeeeee bit extracts block size Blocksize Set option 176 BOT and BACKSPACE errot 183 Drac Eset e rE KEO A tetera chads Buffer Set option BY part of the Join command seseeseseeeeeseeereeseeee 296 BY part of the Link command eceeeseeteereeee 298 byte fields comparing cece eeeeeteseeeeeeeeteeeees 129 Byte to Numeric Conversion c ceceseseeseeteereeee 107 bytelen parameter es byteposition parameter c cc cceceseeeeeeeeeeeee 76 148 C c cmdstring OPTION eee eceeeeceeeeeceteeeeeeeceeceeceseeaes 39 C invocation of Suprtool ecececeseeseeteeteeteeeeee 322 Calculator vaessveis rnr een 210 222 286 326 Calendar intrinsic date format cccccccseeeereees 144 Calling Suprtoo lesee e reien aaRS Century and date a CGT SCTiptisi siecessiece check cceciactecsbesacticuecssdenceadeccesaueesda Chain commandsss dtscsati cis arava a E chained access character constants Clean command STExport CleanChat cccccseseeeees a Clean Ghar Set sieno erea eos teehee Cleaning data Suprtool 0 0 cececeteeteeteeteeeeeeeee COBOL invocation of Suprtool A Cobol edit masks cccccccceessceesececseeessseeeeseeeesee code overflow errot oo eee seeeeteeeeteeeeeeeseeeeeteeeeeeee column headings List command Columns COMMANG cece sess cess teeeeseeeeesenes 352 Index command line
169. cecseceeceeseeesaeceececeeesaaeceaeecneeseaeeeeeeenas 68 SE DOA Go ETAT a hee A T oe vets uate S E 68 Extract USACE mefus a EE te anyoters EAE E EE AAS 69 DA TOE DREE ERP EEE A E T T E EAEE E 69 Extract USA eoe eneo uA AA CEECEE decods ERAN EE ELERA tsuebestes tees vaeesuessistasadack cvs E EEE R ERE iesi 69 Sine Addition Assie ane aA Ea cscs cscs EE ALERE A EENAA AEn EEA EEE ENERET 69 Extract U Sape rr eiee aaaea e TA cates EE a AAA EEI aa AAA EEA 69 Suprtool Open 5 7 Suprtool Open 5 7 Data RE SUl sa o in e a aE ten cece tvauce kasd EE bes aees tunes sean teud EEN coats 69 Numieric BUnCtions sca kee o Hab Sauce eerie Sam een EE hie Beavenvo teem RRR 69 STRUNGATE paced a eet E O a cet ald E ect Des ods E aentuites O beter sted ean 69 TEA SA E E E E cveke wenden eb ethene to E tyes tne bane ebean eect roves 70 Extract USA ge meian ear ip cov cote gona A thos RE EE Satyee devas tues R O ENA 70 SABS ot E ROT tees E T sostoatve Peer E EE E nrcavioewe Cee esta eae set toate 70 TESA Te AEE EET E E ee ats fad oten uelibotes 70 Extract USAGES iea eT EAEE A AT OE OA AOA E tecTieaeesths AA 70 S TOTA Eo enion eT EEE tees E A O E E a a TR 70 TE USATE SE EAEAN O O OA E E AAT 70 Extract SA SCs u E EE EAT EE E EA N AE A AT 70 SSUBTO RAG terat E EA A TE E AT E a AER 70 TESA SCs cots T ETE E ET E A N A A AAT 71 Extract Usage uria veces nE EA E EE E OT A OE E AOT 71 Example of STOTAL and SUBTOTAL sssesseesssesessesssrsesersrsrrsresess
170. command gt set date MapToPhdate8 on changes only the reference to phdate8 in the Item command It does not change references that already exist in self describing files nor does it change the data With this setting enabled any Item command reference such as gt item mydate date phdate will actually mean phdate8 DecimalSymbol SET DecimalSymbol Default period This setting is used to change the Decimal character which is used to edit the data in a field used by the Number function gt set DecimalSymbol The default character for the Decimal Symbol is a period Defer SET DEFER ON OFF This command has no effect in Suprtool UX Suprtool Open 5 7 Suprtool Open 5 7 DumpOnError SET DUMPONERROR ON OFF Initially ON With DUMPONERROR Suprtool attempts to produce a formatted listing of records that cause a database error The information printed may include the input record number the output record number and the data values of the record Suprtool uses current options of the List command to print the data values If no List command is specified Suprtool uses the List defaults EditStopError SET EDITSTOPERROR ON OFF Initially OFF An edit mask is limited to 32 characters in total for both numeric and byte type fields If data overflows the edit mask by default Suprtool will fill that field with asterisks To have Suprtool stop when it encounters an overflow when applying the edit mask ju
171. command we use the Sort command to specify the sort field If the disc file changes only the Define command must be changed gt input invent input is from a disc file gt define a 11 2 int A is an integer that starts gt output outfile at the 11th byte of Invent gt sort a sort the input records by the A field gt exit With the dataset form of the Input command we can have even greater flexibility to use the Sort command We assume that the file Mcust has the same structure as the m customer dataset We sort the file using the first of the two street addresses in m customer Suprtool Open 5 7 Suprtool Open 5 7 gt base store gt input mcust m customer same format as m customer gt sort street address a repeated field but only gt exit the first address is used Notes The Verify command shows all of the current command values and the Reset command cancels them If you have not defined any sort fields before the Xeq or Exit command Suprtool performs a copy only no sort Suprtool uses some temporary files during a sort It creates the files in the directory specified by the TMPDIR environment The size of the files will be equal to the size of the output file If Suprtool runs out of disc space during a sort you can try to specify another directory for TMPDIR It is important to note that if the field being sorted is the result of a function then you may not be sorting on the value of the fie
172. command to repeat a command or use the Redo command to modify a command before repeating it 22 Quick Start Guide for Suprtool Suprtool Open 5 7 gt listredo 20 most recent commands gt listredo input most recent Input commands gt input result Sey gt xeq gt do input repeat previous Input command gt input result gt if quantity gt 10000 Drees gt redo if modify previous If command then repeat If you have used two commands that begin with the same letter you have to be careful when repeating those commands Make sure you use enough letters to identify each command distinctly from the other In the following example if you wish to repeat the Input command instead of the If command you need to use do i s instead of just do i gt i somefile gt if lt expression gt Soki gt xeq gt do i s repeats previous Input command Selecting Database Records These examples show you how to get records from an Oracle table It assumes you have opened the database with the Open command The results are written to a data file called result which can be read either by a program or by a report writer opt robelle bin suprtool gt open oracle demo reader Select All Records This example extracts all the records from the table Note that we didn t specify any selection criteria so Suprtool selects all the records gt select from sales input table gt output result output file gt xeq Xe
173. cters with a by default You can change the default character To be something else with the following set command Set xmltagchar _ STExport will only allow the hyphen underscore and period to be set with this command ZonedFix SET ZONEDFIX OFF Initially OFF Set ZonedFix has been added to fix a zoned field that when converted to byte results in meaning that the source field has some characters that were not expected in a Zoned field If Set ZonedFix is On STExport zeroes out the field after an attempted conversion of the field yields characters that cannot be converted The default for this setting is Off STExport Commands 273 Sign Command SI Specify what should be done with the sign character for numeric fields SIGN NONE FLOATING LEADING TRAILING Default Floating All numeric type fields except logical fields have a sign Integer and floating point fields can have either a space for positive values or a negative sign Packed and display type fields can have a space neutral a plus sign for positive values or a negative sign Specify Sign None to cause STExport to completely ignore the sign If you specify Sign None no error or warning message appears if any numeric types have a negative value Leading vs Floating If you specify Columns Fixed it is easy to see the difference between a leading versus a floating sign A leading sign always appears in the same co
174. cting dates extracting records 0 eee eeeeeseeeceeceeceseeseeeeeseeseeneees F Fastread Set option ssesessssseseseseseseseseseseseresssssees 180 field parameter field Ype ici nanan cid hei eee eee Fieldname Heading command ee eeeereeeeee 237 file name parameter file names hardcoded ccccccseeseeeseeeee 41 217 273 File option in List cece cess eeeseeeeeeeteneeeeeeeeeeeeee 186 file system errot 1213 Filecode Set option 180 filename parameter 0 1328 filling unmatched join fields filling unmatched link fields finding invalid dates 134 Firstrec Set Option s cesceceseeesereensseeeeeerereneres 181 fixed COLUMMS nocens eiia 251 fixed length output file 1 226 Floating Command eceeeeeesceeceeceteeeeseeseeseeneees 235 floating point Classic see eeseeeeseeereeeeeeeeeeeenees 42 Index 353 flO ating Siei nennen ai iii floating point numbers Form Command cceccecseeseeseeeeeeeeeeees Form command default ccccccccccseceesceeeseeeenee 118 Form command keywords c cecceseseeteeseeseeneeee 118 formatting commandsS s seseesssssseeeeeseerissrerrrsrererees 220 FormFeed Set Listessi a e E E 186 Formout feceris 293 four digit years oe eee eee FROM part of Join command eee eeeeereeeeee 296 FROM part of Link command ceceeeeeeseereeee 299 G Geticommaand as
175. cust_table cust_no gt output orders gt xeq Finding Data in a Data File So far the examples have looked up data from a table If you want to look up information in a data file you need to tell Suprtool about the fields Use the Define command to do this The following example gives you some idea of the byte size of one kind of record in a data file John Smith 12345678 Anna May Richardson 98765432 12 bytes 16 bytes 8 bytes If you want to look up customers based on a list of customer numbers in the self describing file Custlist use the following task Notice how the start position and number of bytes is entered into the Define command This defines the position within the input file not the table file gt input flatfile reclen 36 nolf gt define cust_no 29 8 byte gt table cust_table cust_no file custlist gt if S lookup cust_table cust_no gt output result gt xeg Sorting Database Records Suprtool Open 5 7 Sort Records To tell Suprtool to sort table records you can either use any valid SQL command e g select order by or you can select the records and use a Sort command Here are two examples where Suprtool extracts all records from the Sales table into a data Quick Start Guide for Suprtool 27 file called result The records are sorted by the field cust_account Both tasks produce identical results but one way may be faster than the other Sorting in the Select command gt selec
176. custsale Join two files texit 1nto custsale Join Keys Suprlink allows files to be linked by up to two keys a primary and a secondary key field By default Suprlink assumes that the key field to the Join file is the same key field specified for the Input file If the Join key field is different from the Input key field use the BY clause to specify the correct key field t input customer key name is custnum t join sales by custno new name for the same field You would also use the BY clause if the Link file was created using the Suprtool Output Query option instead of Output Link Secondary Keys Suprlink has an option that allows you to select which join record you want by matching a second key field in the master JOIN filename BY primary key secondary key This option forces Suprlink to compare both the primary key and the secondary key when comparing an input record to a join record For example tinput ordhist key name is cust join orders by cust prod Orders contains prod This example says that the file Orders is sorted by both cust and prod fields The join will occur on those records that match both keys Secondary Input Key It is possible that the second key field has a different name in the input file and the Join file The FROM clause lets you handle this case Suprtool Open 5 7 t input students key name is ssn join orders by ord prod from orders products Note that you must specify the
177. d name gt total qty total all the values of the field QTY gt exit Relative Definitions DEFINE field fieldname subscript offset sublen type subcount Default sublen type same as fieldname The fieldname is a field from an Eloquence dataset specified in Get or Chain or a column from a table specified in Select or a field from a self describing file or another Defined field Relative definitions are similar to COBOL s Redefine verb The sublen and type are optional They default to the total byte length and type of the fieldname The subscript parameter is an optional sub item index for arrays such as Eloquence compound items like 5J2 or 4X20 The first sub item is number 1 and if no subscript is provided Suprtool uses the first sub item The offset parameter is optional and specifies a byte offset from the position that would otherwise be used This allows you to define fields relative to other fields The offset starts at 1 and not at 0 i e FIELD 1 is the first byte of the field Suprtool Commands 91 To define a field that corresponds to the second index of the address array of the customer file you would use gt in customer self describing file gt define city address 2 gt if city Vancouver gt list gt xeq Data Types Here are the valid types Type Description BYTE printable ASCII characters INT INTEGER two s complement DOUBLE two s complement IEEE IEEE floati
178. d Set VarsubDebug is on export outfile amp GREEN SUPRTEST filename901234567890123456789012345678901234567890123 45678901 opt robelle bin suprtool SUPRTOOL OPEN Copyright Robelle Solutions Technology Inc 1981 2013 Version 5 6 Internal gt set varsub on gt set varsubdebug on gt in filelsd suprtest vd in filelsd suprtest gt output outfile link temp vd output GREEN SUPRTEST filename90123456789012345678901234567890123 vd 2345678901 link temp The output is formatted into 74 byte chunks and printed with a preceding vd so the substituted line is clear The above example shows Suprtool however the same commands apply in STExport and Suprlink 322 Suprlink Commands Suprtool Open 5 7 Use Command U Specifies a file of commands to be executed as a group USE Q filename Examples A usefile makes your task easier by allowing common commands to be specified once in an external file For example the following usefile contains all the commands for creating the invcust file tuse usecust input invoices sorted by custnum link customer combined with customers output invcust produces the file we want exit Suprlink prints the lines in the usefile including the comment lines This allows you to include instructions and reminders in the usefile In the example above there were no commands for the user to enter Notes Usefiles cannot be nested in Suprlink The usefile may be any u
179. d determines the byte length data type and repeat count for the expression The expression is extracted during the output phase and cannot be used by other Suprtool commands that accept fields e g sort To avoid confusion it is best to define a new field name for the target field instead of using an existing field name Examples gt extract budget99 actual98 1000 gt extract total cost qty gt extract day ccyymmdd date mod 100 In the following example the field total is used twice In the first case it is used to tell Suprtool how to format the arithmetic expression In the second case it is used in the sort command Warning In this example the output file is sorted by the value of total as it appears in the input record It is not be sorted by cost qty Suprtool Open 5 7 Suprtool Commands 113 114 Suprtool Commands gt extract total cost qty gt sort total sort by input total Restrictions You can only use one expression in each Extract command and the expression must be the last item If you want to extract several expressions or more fields after an expression you need to use several Extract commands Incorrect gt extract name i sales tips c cost expense dept Correct gt extract name i sales tips gt extract c cost expense gt extract dept Constants vs Expressions If you have an arithmetic expression that starts with a constant Suprtool assumes that you are at
180. d letters of the alphabet to represent years beyond 1999 By substituting a letter of the alphabet in the first position of the year we can extend a six digit date and also ensure that the dates collate correctly For example YY of AAMMDD CCYY A0 A9 2000 2009 BO B9 2010 2019 C0 C9 2020 2029 Suprtool Issues and Solutions 55 Because letters are greater than numbers in the collating sequence we can ensure that aammdd dates beyond 1999 will order correctly Suprtool also supports other date formats with this two digit year representation These formats are aamm mmddaa and ddmmaa Invalid Dates The If command has a invalid function to find all invalid dates for a particular field An invalid date is any number of a particular date format whose date equivalent cannot be found on the calendar For example a date with a month of 99 will be considered invalid gt base store demo Database password gt get d sales gt item deliv date date ccyymmdd gt if Sinvalid deliv date gt out baddates link gt xeq Can Suprtool Convert Two Digit Years to Four Digits Suprtool is capable of converting dates from one format to another using a variety of Suprtool features We will show how Suprtool can convert common dates without the century to those that have the century included While Suprtool can convert your data it is up to you to change your programs Adager a third party program for changing Image database
181. d repeats without changes any of the previous 1000 commands DO start stop string ALL Default repeat the previous command Commands are numbered sequentially from one as entered the last 1000 of them are retained Use the Listredo command to display the previous commands You can repeat a single command do 5 a range of commands do 5 10 or the most recent command whose name matches a string do list Ifyou want to modify the commands before executing them use Redo or Before Examples listredo do do previous command again do 39 do command line 39 again do 5 8 do command lines 5 to 8 again do input do most recent Input command do 2 do command before previous do 7 5 do by relative line number do 5 do command lines 5 to last Notes The Do command cannot be abbreviated Persistent Redo Redo commands can be saved in a permanent file and can therefore be used from another session You can use the Set redo command to specify a filename to save your redo commands Please see the Set Redo command for details Suprtool Open 5 6 User Manual STExport Commands 247 Escape Command ES 248 STExport Commands Specifies what character to escape the defined Delimiter Quote or End of Line character ESCAPE DELIM QUOTE EOL string Default None Many SQL importers allow you to add an escape character in front of characters that may mean something else to the i
182. date gt extract price Slookup newprices prodno price gt xeq We do the If lookup to select only the parts which have new prices then do Extract with lookup to replace the existing price with a new one The Update command forces a database update on each selected record and must come before the Extract command If you did not do the If lookup then the price field would contain zeroes for those fields that did not have a matching record Notes The Xeq command clears any tables that are not held Set Limits Tablesize restricts the maximum size of tables so you can limit the total amount of table space to a specified number of megabytes There is a total of 500 megabytes available for all tables To control the size of the table you can issue the Set Limits Tablesize command The default Table limit is 50 megabytes for each Table Suprtool Open 5 7 Suprtool Commands 215 TRanslate Command TR Translate command allows you to specify a From and To character in decimal notation which then can be subsequently used in the translate function Translate from to TOUNREAD TOREAD The Translate command also has two special keywords to fill the translation table to help scramble data in byte fields from readable to unreadable and back again to readable gt in nametest list xeq gt IN NAMETEST NEIL GREEN 0 gt OUT S NULL 0 NAME Neil Patrick Armstrong IN 1 OUT 1 CPU Sec 1 Wall Sec 1 in nametest translat
183. ders dates with a two digit century component from the date and today functions to be invalid when the dates resolve to be greater than 1999 and the If operation is a relative operation e g greater than or equal to You can control whether Suprtool considers this condition an error by using the following Set command Suprtool Commands 193 194 Suprtool Commands gt set Date Ifyy2000Error Off The following example shows what is considered to be an error by the If command and how the Set command can turn off the error check gt def a 1 6 gt item a date yymmdd gt if a gt today Error Cannot use a date beyond 1999 for this format gt set date ifyy2000error off gt if a gt date 2000 01 03 We have chosen this condition to be an error by default because when the date function in the If command resolves a date in a yymmdd format to a value beyond 1999 the result is not always a useful value For example a December 10 2000 date in a yymmdd format would have a value of 001210 and comparisons to this value could be logically incorrect If you would have included a Delete command in a dataset selection task you could have removed all of your records Date MapToPHDate8 SET DATE MAPTOPHDATES8 ON OFF Initially OFF This set command will change any item command reference to phdate to mean phdate8 for assistance in converting to the newer phdate format found in PowerHouse version 8 19 and higher The set
184. different file names For example if you use set redo myredo you will have a redo stack called Myredo for your Suprlink commands If you exit Suprlink then run Qedit and supply the same Set Redo command your Qedit commands will be written to the same file that was used for your Suprlink commands Statistics SET STATISTICS ON OFF Initially OFF STATISTICS causes Suprlink to print statistics at the end of each task Varsub SET VARSUB ON OFF Initially OFF Setting Variable Substitution causes Suprlink to resolve any environment variables in a command before processing VarsubCompat Set VarsubCompat On Off Initially OFF The Set VarsubCompat flag has been added to Suprtool to have variable substitution be more flexible On MPE variable substitution would pass the name of the variable thru to be parsed even if the variable was not set The default behaviour was to return spaces if the environment variable was not set This is still the default behaviour however if you set varsubcompat on Suprtool will return the environment variable name similar to how MPE works with unresolved variables You can also invoke this from the command line by running with cv Suprlink Commands 321 VarsubDebug SET VARSUBDEBUG ON OFF Initially OFF Suprtool now has a setting called Set VarsubDebug on which will print out the line after the variable substitution has occurred This setting only works if Set Varsub is on an
185. dit mask character acts as both a placeholder and a format character such as the in floating dollar signs Byte Type Formatting For Byte type fields there are two placeholder characters These are X place the data in the matching column for the X in the edit mask Z place the data in the matching column unless the data is a zero if the data is a zero then replace with a space The format characters are as follows B space slash comma period plus minus asterisk and a Space Please note that you can denote a space using two methods either by putting a B in the mask or a space itself For example suppose you have data that is in ccyymmdd format in an X8 field Here is how you would use a xxxx xx xx mask to format the data 124 Suprtool Commands Suprtool Open 5 7 gt in mydate gt form File MYDATE TEST NEIL SD Version B 00 00 Entry Offset A X8 1 lt CCYYMMDD gt Limit 10000 EOF 2 Entry Length 8 gt def formatdate 1 10 gt ext formatdate Sedit a xxxx xx xx gt list gt xeq gt IN MYDATE L GREEN 0 gt OUT SNULL 0 FORMATDATE 2003 09 24 gt IN MYDATE L GREEN 1 gt OUT SNULL 1 FORMATDATE 2003 09 24 As you see in the example above the placeholder character is the x and the is the format character You insert a space either by specifying a B or by putting an actual Space character in the edit mask An example of inserting a space might be the formatting of
186. does not use the full extended names for key items but rather uses the regular truncated name just as it did previously Suprlink does however carry on the Extended information and writes it to the output file Restrictions of SD Files So far in this section we have shown how to create self describing files using the Link option of the Output command The Link option produces a special form of self describing file Not all software can read this form of self describing file You can use the Query option to create an old style self describing file The Query option has the following restrictions Self describing files were originally created by HP in MPE so that files could be fed into HPWORD and HP graphics packages One problem with HP s definition was that no provision was made for compound fields e g 10J2 When Suprtool creates an SD file with compound fields via the Query option it uses a special data type When you input such a file to Suprtool all compound fields are treated as byte arrays Suprtool correctly copies and extracts these fields but you cannot select with them The Query option is not capable of retaining information about decimal places or date formats Suprtool and Sorting Files When Suprtool sorts two records that have the same key value the first record read by Suprtool is the first record on the output file For data files this means that input records with the same key values appear in the same order in the ou
187. ds If data overflows the edit mask by default Suprtool will fill that field with asterisks There is an option to have Suprtool stop when it encounters a formatting overflow gt set editstoperror on will force Suprtool to stop if there is data left over to place when applying the edit mask With numeric type fields leading zeroes do not cause overflow Restrictions You can only use one expression in each Extract command and the expression must be the last item If you want to extract several expressions or more fields after an expression you need to use several Extract commands Incorrect gt extract name i sales tips c cost dept Correct Suprtool Open 5 7 Suprtool Open 5 7 gt extract name i sales commission gt extract c cost gt extract dept Extracting Bits The Extract command can be used to define individual bits from one data item as separate fields order shipped 1 2 int order paid l 2 int order shipped status field 0 1 order paid status field 1 1 This makes it easier to check the status of certain bits within a given field EBCDIC Conversions Use the etoa or atoe functions to convert specific fields from EBCDIC to ASCII or vice versa Each of these functions accepts a single parameter that is a byte type field Extract ETOA char field Extract A TOE char field There are several restrictions on the etoa and atoe functions They do not work with either the ASCII or PRN outp
188. e gt def mytotal 1 14 packed gt get orders gt ext mytotal total sales amount gt xeq You can total up to ten fields per pass and the total function is also available in the if command however is of limited use Counter Function For years Suprtool has had the ability to output a record number to an output file with the num option of the output command Suprtool Open 5 7 Suprtool Commands 115 116 Suprtool Commands gt in mysdfile gt out myfile num data The above could would generate an output file called myfile however you would lose the SD information and you can only put the number at the beginning or the end of the data Suprtool now has a counter function that allows you to place a counter at any spot as well as preserve the SD information gt in mysdfile gt def mycount 1 4 double gt ext fieldl gt ext field2 gt ext mycount Scounter gt out myfile link gt xeg The file myfile will be self describing and contain the fields field1 field2 and mycount The field mycount is defined as a double integer since this is the only field type that the counter function can use Each record will have a unique ascending number starting with one String Expressions You can combine byte type fields together and use the built in string functions to create new fields out of existing ones This can reduce the number of tasks required to provide a solution String expressions may involve the operator
189. e define acct x 1 12 byte define fullname 1 30 ext acct x Ssplit record first ext fullname Ssplit record Data Examples Source Data of record acct x result 123456789 Neil Armstrong 435 123456789 Data Examples gt IN STRINGS NEIL GREEN 0 gt OUT SNULL 0 ACCT X 123456789 gt IN STRINGS NEIL GREEN 0 gt OUT SNULL 0 FULLNAME Neil Armstrong FINDCLEAN Works on Byte type fields Purpose is to find any specified character s in any byte string fields anywhere in a given byte field If Usage clean 10 if findclean e mail Records will qualify if a Line Feed is in the e mail field CLEAN Works on Byte type fields Purpose was to clean and remove unwanted characters from any byte string fields in any point in the field Typically used to removed un printable characters from byte fields Suprtool Open 5 7 Suprtool Issues and Solutions 67 If Usage Not commonly used clean N if S clean first_name eil Extract Usage extract byte target Starget byte source Example clean N set cleanchar extract byte target clean byte source Data Examples Source Neil Target eil Example remove Line Feed from E mail Address field and shift data to the left Clean 10 set cleanchar lt null gt ext e mail Sclean e mail TRANSLATE Works on Byte type fields ETOA Purpose to translate any character from a byte type fi
190. e you may also need to remove trailing spaces see the Spaces command No Quotes for Fixed Columns Use Quote None to cause byte type fields to be output as a group of characters In many cases you would combine this option with Columns Fixed Single or Double Quotes By default all byte type fields are surrounded by double quotes Specify single quotes using the Single option If a byte type field contains the quote character specified in the quote command it is replaced with a space For example if the input was customer s and Quote Single had been specified then the output would be customer s STExport Commands 267 Redo Command REDO Enables you to modify and repeat any of the previous 1000 command lines REDO start stop string ALL Default redo the previous command The Redo command allows you to modify the commands before it executes them If you do not need to change them use the Do command Commands are numbered sequentially from one as entered the last 1000 are retained Use the Listredo command to display the previous commands You can Redo a single command a range of commands or the most recent command whose name matches a string The Redo command uses MPE style editing logic D I R U and gt The default mode is to replace characters To delete type DDDD under the characters to be removed To insert type I under the insertion spot then the new characters To undo your changes
191. e E eea o E Nao ei 316 Ovtp t Command O r ienee Kip EERE E O EEEE ed A E EET 317 Redo Command REDO ime orien enn a E E N a R Ne eiS 318 Reset Command IR eenn r e een adhe tien aeai de E NEEE 319 Set Command S e me neee aa EEE E OT E E E OEE Ge eee 320 Mappe dra AT EE RE EGEE EE O ATE E TE E eT 320 REGOS Piere E R TEE E E N EEE E Ea 320 SASOS S aT AA E TEE OEA ET E E a E A E AET 321 V Ar SUD rear e E TEETE E E N EEEE A E 321 NVars bC ompa te ierat e e TEE a EA TE EE A AE EA a 321 Wearsub Debug enie en a N EAE EA E N E E E A ET 322 Use Command Ufs re E E R E A E O T aE a e eS 323 Verify Command NV riae e EAE ARTE EE ETA E eT aT 324 Xeg Command X h r TARE E A cues E E AT RE E E a a s 325 Example Suprlink Output 327 EXAM O AAEE cccee caccecy sce chee vets Cites sc sie EAETE enh tb udaes heath s baseba tues tapes ackdee tis vate 327 Limits Within Suprlink 329 Maxis siose tern eE eee reat ed is oe ce a een tee oe 329 Welcome to Calling Suprtool 331 Calling SUprtoolssveevesees veces cesessdenscacteesinveuapeeseveeuspante ered E tatneaneus ears Eaa E eee 331 SUPHO IROUUME aeaa a eae aE E A A E O A 331 Importance of the Exit Command seee enres E AEE AEE EEEE E E A i 331 Environment Variable S teana E A E EA E E AN 332 COMMOLRE COR yasa EEEE RS A E ETE R 332 Examples of Calling Suprtool 335 Copying the Exam ples v i iss ese acces gic fee ryerenteceas tee Maes ted ite faved I eae eee Da ome ches E 335 COBOL Example wives seed
192. e Selection Using a first pass to generate You can use the If command for dynamic date selection Suppose you have a control a Suprtool command file that maintains the start and end of a range of dates in which you are interested dynamically then using that You can use the control file to select records from another file or dataset based on command in a second pass is this date range This is a two step process in which the first Suprtool pass creates the a powerful technique If command with your dates and the second pass does the actual selection from the dataset gt input datecntl reclen 12 nolf read the one_line control file gt define start_date 1 6 byte start date is the first six bytes gt define end_date 7 6 byte end date is the next six bytes gt extract if sales date gt assemble the If command gt extract start date gt extract and sales date lt gt extract end date 7 gt extract gt output seldate temp write the If command to a file E This task produces a usefile that looks like this Now you can use this file named seldate to do the actual selection gt open oracle demo reader gt select from sales gt use seldate use the file that has the If command gt output sdetail gt exit Long Expressions Long If commands can use an ampersand to continue the command over several lines gt if status 20 gt gt state AZ CA OR no ampersand on the last l
193. e define an amount field that repeats twelve times e g once for each month of the year We use a subscript when we want to refer to a specific month Suprtool Commands 93 gt def amt 11 2 int 12 amt is an integer that repeats 12 times gt if amt 5 gt 1000 we select on the 5th subfield gt output outfile Relative Examples Use the simplest form of relative definitions to rename existing fields gt def quantity qty quantity is a more readable name gt if quantity 100 selection on the new field The Define command copies the byteposition sublength and type to the new field but it does not copy the subcount Define assumes that you want the first subfield gt def amount amt amt is 12J2 gt if amount gt 1000 amount is 1J2 and is the same as amt 1 Relative Example with Subcount Because Suprtool defaults the subcount to one you might want to specify an explicit subcount when giving a new name to an existing field gt def amount amt 12 amt is 12J2 same length and type gt if amount 5 gt 1000 amount is 1232 we are selecting for May Relative Example with Subscript Use subscripts to define a new field that corresponds to a specific subfield gt def may amt 5 amt is 12J2 gt if may gt 1000 may is the fifth subfield Relative Example with Offset Many applications define subfields within a larger character field A common example is a part number where the firs
194. e fields would be as follows gt base mydb 1 gt get customer gt clean 9 410 0 7 gt update gt ext address 1 Sclean address 1 gt ext address 2 Sclean address 2 gt ext address 3 Sclean address 3 gt xeq The SPECIAL keyword automatically defines Clean characters of Decimal 0 thru to Decimal 31 gt base mydb 1 gt get customer gt clean special gt update gt ext address 1 Sclean address 1 gt ext address 2 Sclean address 2 gt ext address 3 Sclean address 3 gt xeq You can also specify a range of characters with the following syntax gt base mydb 1 gt get customer gt clean 0 10 gt update gt ext address 1 Sclean address 1 gt ext address 2 Sclean address 2 gt ext address 3 Sclean address 3 gt xeq The above task would clean all byte type fields of any characters from Decimal 0 Null to Decimal 10 Line Feed Removing Bad Characters You can have the Clean function clean the field and instead of replacing with a space the clean function will essentially shift characters to the left by Setting the CleanChar in the following manner Suprtool Open 5 7 Suprtool Commands 89 gt Set Cleanchar lt null gt Suprtool will pad the field that was cleaned with the appropriate amount of characters with a space at the end of the field 90 Suprtool Commands Suprtool Open 5 7 Define Command D Suprtool
195. e following examples show the various data types and combinations that are available with the Key command Suprtool Commands 163 1 10 byte data type 1 10 desc descending sort sequence 11 4 double I2 or J2 S9 9 COMP 1 6 11 4 ieee X6 string and an E2 field at byte 11 21 6 packed P12 S9 11 COMP 3 21 6 packed P12 S9 10 COMP 3 wasted byte Notes The command name Key is optional Any command that starts with a numeric character is assumed to be a Key command The Verify command shows all of the current key fields and the Reset command cancels them If no sort fields are defined prior to the Xeq or Exit command Suprtool performs a copy not a sort 164 Suprtool Commands Suprtool Open 5 7 Link Command LIN You cannot use Suprtool s Link command to invoke Suprlink Open but you can run Suprlink Open by itself opt robelle bin suprlink Suprlink Open Copyright Robelle Solutions Technology Inc 1988 2013 Version 5 6 Suprlink Open provides high speed data file linking based on a sort key Suprlink Open only accepts self describing files created by Suprtool Open or the MPE SDUnix program Suprlink has it s own section in the manual Suprtool Open 5 7 Suprtool Commands 165 List Command L 166 Suprtool Commands The List command is used to produce formatted listings of the selected records You may specify the List command or the Output command or both or neither If List is used inste
196. e is to replace characters To delete type DDDD under the characters to be removed To insert type I under the insertion spot then the new characters To undo your changes type U To append to the end of the line use gt xxx To delete from the end of the line use gt DD To replace at the end of the line use gt Rxxx And to erase the rest of the line use D gt If you prefer Qedit style editing Control D etc use the Before command instead of the Redo command Examples FII pfd fd is not spelled right fd not found t redo redo most recent command fd last command is printed s you enter changes to it L sd the edited command is shown you press Return listredo all redo 5 redo 5th command in stack red redo previous command redo 2 redo command before previous red redo 8th through 10th red redo 10 through last red redo last rm command red redo last rm temp red redo last containing temp Persistent Redo Redo commands can be saved in a permanent file and can therefore be used from another session You can use the Set redo command to specify a filename to save your redo commands Please see the Set Redo command for details 318 Suprlink Commands Suprtool Open 5 7 Reset Command R Cancel the current linkage task RESET Reset closes the current Input file and any Link files then resets the output file name to Output This is actually a Reset All command you
197. e item Examples Suppose that you wanted to look for several part numbers You could use the following If command gt if part 12345 67890 39201 92308 14892 You could also load a table with the part numbers Suprtool Open 5 7 gt table t le part item 12345 gt table le part item 67890 gt table le part item 39201 gt table le part item 92308 gt table le part item 14892 and use a different If command gt if Slookup part table part Sometimes you need to look for all records that do not have any of a set of values You would use the same Table commands but a slightly different If command gt if not S lookup part table part Values with Decimal Places If the itemname for the table has implied decimal places the Table command accepts decimal points and scales input values For example gt item cost decimal 2 two implied decimal points gt table cost table cost item 10 10 5 10 75 gt if Slookup cost table cost gt out out3 select records for 1000 1050 and 1075 gt xeq Adding Values from a File You may need to look for hundreds of part numbers The Table command accepts the table values from a file The file must contain lookup values in exactly the same format as the itemname which describes the data Duplicates are eliminated as they are loaded into the table For a table consisting of values from a file use TABLE tablename itemname FILE SORTED filename
198. e output file with fixed length records Line Feeds STExport s Output command allows the user to specify whether the output file has line feeds Normally STExport determines whether to write out line feeds from the self describing file If the self describing file does not have line feeds then the resulting file from the STExport task will not have line feeds This caused problems for some programs that import the file or for some browsers that use the HTML option You can now explicitly specify line feeds in the output file by using the LF option in ora customer Sout filelex 1f Sexit To specify that line feeds are not written out to the file you can use the NOLF option in ora customer Sout filelex nolf Sexit Stdlist If the output file name is each output record is written to stdlist This is useful for trying out different formatting combinations until you find the one that best fits the application that you want to import data into For example change one option view the result change a different option and so on Suprtool Open 5 6 User Manual Quote Command Q Suprtool Open 5 6 User Manual Specify which quote character if any is to be used around byte type fields QUOTE NONE DOUBLE SINGLE Default Double Most software packages expect byte type fields to be in one of two formats Fixed column see the Column command Surrounded by single or double quotes In this cas
199. e printer showing column names and column values converted to ASCII If you suspect that your data is bad you can dump the records in Octal Char format instead gt select from sales gt if sales total lt 0 gt list octal char gt xeq If you want the listing in column format use List Standard gt select from sales gt if sales_total lt 0 gt list standard lp gt xeq You can send the list output go to a file and to also append to an existing file using the file option in the list command The File option takes the next parameter as being the filename gt in test filelsd gt list stan file myslist gt xeq If the file myslist exists it will be over written unless you specify the Append option If you specify the append option the new report will be added to the file So if you want to incorporate multiple reports you just need to do the following gt in test filelsd gt list stan file myslist gt xeq gt in test file2sd gt list stan file myslist append gt xeq Changing the Output Record Format You can change the output file record format by using the Extract command The Extract command causes Suprtool to assemble Output records by stringing together fields extracted from Input records You would use the following to extract two of the nine fields from the customer records gt select from customer input from a table gt extract cust_account extract the key value and gt extract credit ratin
200. e record number in ASCII format A QUERY numbers file is usually used as input to a report program Substituting Suprtool for QUERY in these batch jobs should improve the speed ASK ASK is a QUERY replacement tool from COGELOG ASK creates output records in ASK select file format Suprtool can be used to scan and select records quickly from a dataset ASK Version C can produce reports from the resulting select file This option cannot be used with any other Output option Recent versions of ASK read self describing files For these versions use the Link option instead of the Ask option ASCII ASCII converts all binary input fields into their equivalent ASCII values All binary fields are right justified in their fields with a trailing sign The sign can be a blank or Byte fields are not affected by this option The size of the ASCII field depends on the format of the binary field Field Format Output Size Il J1 6 bytes 12 J2 11 bytes 13 J3 16 bytes 14 J4 20 bytes Kl 5 bytes K2 10 bytes E2 12 bytes E4 23 bytes Zn n l bytes Pn n bytes Any fields with implied decimal places see the Item command are formatted with a decimal point in the correct position Suprtool reserves two additional positions for each output field that has an implied decimal point DISPLAY DISPLAY converts all binary input fields into their equivalent display values also known as zoned decimal The size of the display field depends on the
201. e separate stacks for each product by giving them different file names For example if you use the command set redo myredo you will have a redo stack called Myredo for your STExport commands If you exit STExport then run Qedit and supply the same command Set Redo command your Qedit commands will be written to the same file that was used for your STExport commands Statistics SET STATISTICS ON OFF Initially OFF Statistics causes STExport to print statistics at the end of each task Varsub SET VARSUB ON OFF STExport Commands 271 272 STExport Commands Setting Variable Substitution causes STExport to resolve any variables in a command before processing VarsubCompat Set VarsubCompat On Off The Set VarsubCompat flag has been added to STExport Open to have variable substitution be more flexible On MPE variable substitution would pass the name of the variable thru to be parsed even if the variable was not set The default behaviour was to return spaces if the environment variable was not set This is still the default behaviour however if you set varsubcompat on Suprtool will return the environment variable name similar to how MPE works with unresolved variables You can invoke this option from the command line with the cv option VarsubDebug SET VARSUBDEBUG ON OFF Initially OFF Suprtool and STExport and Suprlink now has a setting called Set VarsubDebug on which will print out the line after the vari
202. e tounread ext name Stranslate name list xeq gt gt gt gt gt IN NAMETEST NEIL GREEN 0 gt OUT SNULL 0 NAME Mtxo Kpecxrz Ocndeclmv IN 1 OUT 1 CPU Sec 1 Wall Sec 1 216 Suprtool Commands Suprtool Open 5 7 Suprtool Open 5 7 Suprtool Commands 217 Total Command T Totals specified fields in the selected input records TOTAL field subscript decimal places file filename APPEND ERASE TEMP file list Default subscript first sub item decimal places 0 Parameters Each totaled field must be an Eloquence field a database column name or a field from a self describing file or a Defined field Total specifies that a total value for the field be printed after processing the records There does not have to be any output file i e it can be null for a total to be printed There can be up to 15 totaled fields The subscript is valid only for compound items If no subscript is specified the first field of a compound item is totaled The decimal places provides a decimal point when the final total is printed If the Item command specifies the number of implied decimal places the decimal places parameter is not needed The values within each field are assumed to be aligned File Options By default totals are written to stdlist Use the file option to have the totals written to a file or to the List device When writing to a file the default is to create a new file If Suprtool c
203. e two steps First build a self describing file with Suprtool then use STExport to convert it to PRN and add the headings 1 In Suprtool build a self describing file gt input gt define items gt item items gt extract fields gt output sdfile link gt xeq 2 In STExport convert to PRN and add the header line Sinput sdfile Sheading fieldnames output pcdata Sexit The file Pcdata is a variable length PRN file with both headings and data Two Digit Year Solutions Suprtool often has to process dates in both the twentieth and twenty first centuries If you include the century in your dates Suprtool should behave as most users expect If you do not include the century in your dates how Suprtool behaves will be dependent on your specific application and data What If Have Four Digit Years If your dates have four digit years Suprtool should work as expected Selection based on the today or date features will select dates in both the twentieth and twenty first centuries Dates that do not collate correctly e g mmddccyy will not be accepted by Suprtool s If command for relative selection e g lt lt gt or gt If you have these date formats you can use the stddate function converts any date format to a ccyymmdd type date Suprtool as it has always done will continue to sort dates based on their numeric value and not on any implied date order You can either use two digit years b
204. eated by STExport This URL automatically looks for the configured directory under htmluser s home directory print Location http www hp com htmluser S html_ file n n Format an error message for the user sub error page print Content type text html n n print lt HTML gt n print lt HEAD gt n print lt TITLE gt Comment Form Error lt TITLE gt n print lt HEAD gt n print lt BODY gt n print lt H1 gt Comment Form Error lt H1 gt n print lt HR gt n print lt P gt n print Form input was not proccessed Please mail your print remarks to lt b gt webmaster lt b gt print lt P gt n print lt b gt Content of the Suprtool STExport logfile lt b gt print lt pre gt print cat html file n print lt pre gt un print lt BODY gt n print lt HTML gt n We r CGI Script The CGI script can be invoked explicitly when you type the URL in your browser http www mycompany com cgi bin sx orders pl The script is executed either from an input form lt FORM METHOD POST ACTION cgi bin sx orders pl gt or invoked through a link in a regular Web page Just click lt a href cgi bin sx_orders pl gt run script lt a gt 262 STExport Commands Suprtool Open 5 6 User Manual If you enter the URL choose the submit button on a form or click on a link the server will start execution of the Perl script In turn Perl will run
205. eceteeeeeeseeseeneees Oracle dates si i 55 cts cssesasscniseies Lossetaeshobesdsevncscev nites Index 355 Oracle Integer Set cccceeeeeecceeceeceteeeeeeseeseeneees 188 Oracle Loading 38 Oracle Number Conversion 1 46 Oracle OpenFix Set 188 Oracle PassShift Set cccccccccscecsscessseeesseeeenee 189 Oracle ROWS Set cccccccccccssecsecssseesecsseeseeesseeseeessees 188 Oracle ZeroNull Set 189 Oracle performance 61 out of disc space 159 Outcount File Name cceeececceeceseeeeeeeseeeeeneeee 218 outcount default file name cece ceeeceseeeeees 39 outcount Set Filename a OUTPUt CHOICES inn a EE RA Output command eee eeeseeeeeeeeeees output file format eee ese eeeeeeeeeetereeeeeeeeeee output file name duplicated output file maximum fields output file maximum record length output file Suprlink 00 eee eeeeeeeeeneeeeeeeeeeeees output filede e bs Hake eee output format ee eeeeeeeeeseeeececeeceseeeeeeeeeeaeeneees output limits with Count and Total lt output record format ssessesseseeesesersessssseseserseses Output Append option sssssseseeseeeesesrerrerrsreressesee Output ASCII option Output ASK option Output Data option i Output Display Option ssssseseseeeeeesesrereererreressesee output duplicate file eee ececeseeseeeeceeceeeeseaes Output Else option
206. ed Removing Bad Characters You can have the Clean function clean the field and instead of replacing with a space STExport will essentially shift characters to the left by Setting the CleanChar in the following manner gt Set Cleanchar lt null gt STExport will pad the field that was cleaned with the appropriate amount of characters with a space at the end of the field Suprtool Open 5 6 User Manual STExport Commands 241 Columns Command C Specify whether fields are formatted into variable or fixed length columns COLUMNS FIXED NONE Default None Most PC software expects imported data to be in variable length columns Other database systems prefer data to be aligned in fixed columns Use the Columns command to specify whether the output file has variable or fixed length columns Output File The Columns command also affects the format of the Output file If you specify Columns None the output file will have variable length records If you specify Columns Fixed the output file will have fixed length records 242 STExport Commands Suprtool Open 5 6 User Manual Date Command Suprtool Open 5 6 User Manual DA Specify a specific date format for all dates DATE NONE date format separator INVALID ASTERISKS NULL string Default yyyymmdd Invalid Asterisks Use the Date command to specify an output format for dates Use the Invalid option to specify how invalid dates should be formatted i
207. ed file immediately The file is held open until the input is reset or the current task completes 156 Suprtool Commands Suprtool Open 5 7 Item Command IT Suprtool Open 5 7 Use the Item command to specify the number of implied decimal points or the date format for an item The date and today functions of the If command work only with dates The Item command must precede any If or Extract commands ITEM itemname DATE DECIMAL attribute Itemname The itemname must be an Eloquence itemname a Defined field an SD self describing field or a column name If the itemname exists both as an Eloquence itemname and as a Defined field the attribute is associated with the Eloquence itemname and the Defined field is deleted If the itemname exists both as an Eloquence itemname and as an SD field the attribute is only associated with the Eloquence itemname and a warning is produced The itemname cannot be qualified with a subscript Date Formats For dates the attribute must be one of the following Attribute Attribute ASK ccyymm Calendar ccyy ddmmyy aammdd ddmmyyyy aamm mmddyy mmddaa mmddyyyy ddmmaa Oracle SRNChronos PHdate mmyyyy yymm yyddd yymmdd ccyyddd yyyymm HPCalendar yyymmdd JulianDay yyyymmdd EDSDate ccyymmdd PHDate8 Abbreviations When specifying the Date keyword you can use a leading subset for the date attribute For example if you want to specify the Calendar date type you can specify only CA gt i
208. edit the data in a field used by the Number function The defined currency symbol s is stripped from the field prior to converting to number in the number function The CurrencySymbol can be up to our characters gt set CurrencySymbol The default character for the Currency Symbol is the Dollar sign Date Cutoff SET DATE CUTOFF number Initially 10 Default 00 Date Cutoff tells Suprtool what century to use when Suprtool generates the date value from the date and stddate functions This setting only affects the date values generated by the date and stddate function in the If and Extract commands This does not affect user data Versions of Suprtool without Set Date Cutoff would assume 19 for the century for any user specified date with a two digit year Now with Set Date Cutoff xx Suprtool assumes the following a value of 20 for the century if the two digit year specified in the date or stddate functions is less than the value of Set Date Cutoff a value of 19 for the century if the two digit year is greater than or equal to Set Date Cutoff The initial value of Set Date Cutoff is 10 Therefore the default behavior in date and stddate is to treat the two digit years with values of 00 09 as 2000 2009 and the two digit years with values of 10 99 as 1910 1999 yy Value in date With Cutoff 10 With Cutoff 25 00 2000 2000 09 2009 2009 10 1910 2010 11 1911 2011 Suprtool Open 5 7 Suprtool Open 5 7 2
209. eeeees 76 subscript parameter NUMETIC cece eteteeeeee tees SUDSUIINGS ecesseeeeteereeeeeeeeeeee subtotals iieis esi irer era piii Subtract Days ccecceccscceseeseeseeseeseceeeseeseeeeeeeeeeeneees sum of field values summary of STExport summary Of Suprlink ee eeeeeeceeeeeeeeneeeceeeneees 277 Super Cartridge Suprhint Help Robelle cece cecsceseeteeteeeeseeeeeee 181 Suprlink 2 ee eceeceesecsecseereeeeneeeeeeeeeeeeeee 13 162 272 Suprlink commands Suprlink using from Suprtool ce eeeeseeteereeee 275 Suprmer filesini senei ienaa a a ei Suprtool dynamic loading Suprtool in Suprlink 0 eee Suprtool package eeccesessecsseeeecneesceecseeeceeseeeeens Suprtool2 error messages Suprtool2 routine ce ececcescesecsecnecnseeeeneeeseeseeneees Suprtool2 Installation ceececeeceseeeeeeeeeeeeeee SuprtoolOutCount JCW Suspend option on Exit s233 291 T 358 Index tables holding between Xeqs sceeseseeeeeeees 199 tables maximum size se tape TILES ctesezss2oetsvten cd cectastavtierivateeisiaeincsseaetteteatsend Target field Extract command eeeeeeeeeeeenees 98 task what is a task ccceeeeees 18 45 terminolo tyin iniia i e n 272 third party indexing 118 214 ThousandSymbol Set option cceceseseeseeteereeee time format in List Time Set List title HTME Opto eoe ere iage s nE KKE TEMP DIRS
210. efore or after the continuation character gt The following task extracts all customer records for gt the different customers we are interested in gt in customer input self describing file gt if status 10 or amp prepaid status status 20 or amp current status status 30 arrears status gt output outfile output to a disc file gt exit execute the task and exit OS Commands If Suprtool doesn t recognize the command you have entered it tries to interpret it as an operating system command Suprtool also interprets any command line beginning with an exclamation mark or a colon as an O S command For example Suprtool Commands 79 gt sort custfile by custnum comment gt input custfile gt key 1 10 no on the next command gt ls sort check for file name gt out sortcust gt exit Calculator Any command line beginning with an equal sign is treated as a calculator expression This feature can be used to compute blocking factors and do other calculations without the need of an electronic calculator For help type Control Y Interrupt You can interrupt a Suprtool task with the Control Y key hold down Control while striking Y Suprtool responds by telling you how much work it has done IN OUT etc and asks if you wish to stop Hit the Return key to continue or type YES to stop the task Even though you abort the task your output file is saved although it m
211. eien i 96 135 DBCONTROL intrinsic 00 00 rererere 179 ddd dates 222i executes E E iets areca 145 ddd date format ccccccccccccesscesseceesscessseeeeseeeesee 145 Decimal command ceeeseeeeseeeeeetenereeeeeeeeees 229 decimal places cceecesseeseeseeeeseeseeseeeeeeeeeeeeeees 29 145 decimal places Chain command ccceceeseeseees 72 decimal places constant values decimal places defining ecececeseeseeteeteeteereeee decimal places Extract command ceceeeeeseeees 94 decimal places If command decimal places List command cseseseeseereeee 151 decimal places Table command ceeeeecee 199 default field filling in Suprlink Js default processing esessessessesersssesessisssreesrserseses Defer Set option cccceceeesseeeceeceeceteeseeseeseeseeneees deferred output in IMAGE Define command s sssessessseseseesesiressesessreesrsres Defining fields eeeeeeseeeesceeceeceseeeeeseceeceeceaeeaes definition parameter te delete all records warning cceceeeeeeeeceeceeeeeeeees Delete command cece seseeeeeeeteteeeeeseeeeenees deleting duplicate records deleting entries deleting entries recovery delimited output files Delimiter command Delimiter maximum length Desc parameter s vssci covseasevnieereprveycereestecsacss descending order eee eeeeeeteeeetereeeeeeeeeeee differences MPE vs HP U
212. eld to any defined byte primarily to obfuscate data and was primarily designed for the extract command If Usage translate A C if Stranslate Full Name Neil Crmstrong not commonly used Extract Usage translate A C translate B D translate a f extract New byte field Stranslate byte field Data Examples Using above code Source Data Result Data Barry Armstrong Dfrry Crmstrong Purpose is to convert Ebcidic to Ascii for a byte type field 68 Suprtool Issues and Solutions Suprtool Open 5 7 ATOE String Addition Extract Usage Extract Setoa char field Purpose is to convert Ascii to Ebcidic for a byte type field Extract Usage Extract Satoe char field Setoa and Satoe cannot be used in if command nor do they put a result in a field they just extract the converted byte type field Suprtool is capable of doing string addition again this is with byte type fields you can do add various byte type fields together and even the results of various functions from above Extract Usage extract target_byte field byte fieldl byte field2 extract FullName trim first_name S trim last_name Example extract FullName trim first_name S trim last_name Data Result gt IN STRINGS NEIL GREEN 0 gt OUT SNULL 0 FULLNAME Neil Armstrong Numeric Functions TRUNCATE Suprtool Open 5 7 There are a number of functions tha
213. elected by an if criteria See the output command for details gt get dataset this task is the If then gt if expression gt output filel else link filel and temp file else created gt xeq You can also use a second task with the same criteria negated by a NOT gt get dataset this task is the If then gt if expression gt output filel link gt xeq gt get dataset this task is the else Sat not expression gt output file2 link gt xeq Expressions An expression specifies the logical criteria that Suprtool uses to select records from the input source Simple Expressions The simplest expression is a single comparison between two fields e g A B or a field and a constant e g A XX field relation field field relation constant Suprtool Commands 137 138 Suprtool Commands Fields A field can be a temporary Defined field or a field from a self describing file or an Eloquence field or a column from a database table Each field has a type see Key Command K on page 163 for further details The constant must match the type of the field If the field has a byte type you must surround the constant with quotes gt if name TAMMY ROSCOE name is byte gt if rating gt 10000 rating is integer gt if balance arrears compare two fields Constants A constant is a value that matches the data type of field Constants are either a string constant in quotes a numeri
214. eleted Suprtool Open 5 7 Notes For Eloquence manual master datasets a DBDELETE call fails if the entry to be deleted is a chain head with related detail entries still linked to it When this happens Suprtool by default prints an error and stops processing the input data If Set Dumponerror On the record is printed on stdlist If Set Ignore On has been entered Suprtool continues processing and prints a count of chain heads at the end Records that cannot be deleted are not included in the output file Suprtool Open 5 7 Suprtool Commands 97 Do Command DO The Do command repeats without changes any of the previous 1000 commands DO start stop string ALL Default repeat the previous command Commands are numbered sequentially from 1 as entered and the last 1000 of them are retained Use the Listredo command to display the previous commands You can repeat a single command do 5 a range of commands do 5 10 or the most recent command whose name matches a string do list If you want to modify the commands before executing them use Redo or Before Examples gt listredo see the previous 20 commands gt d do previous command again gt do 39 do command line 39 again gt do 5 8 do command lines 5 to 8 again gt do list do most recent List command grep do last starting with grep grep job do last grep job command job do last containing job 2 do command before previous o
215. en To read data from an Oracle table or view use the Select command Use Set Oracle Rows to specify how many rows for Suprtool to fetch when it is reading Oracle data gt open oracle scott tiger Allbase Database Use the Open command to connect to an Allbase database You must specify your Allbase dbename and owner To read data from an Allbase table or view use the Select command Use Set Allbase Rows to specify how many rows for Suprtool to fetch when it is reading Allbase data gt open allbase inventory anne Remote Databases and Oracle Issues In order to connect to the remote database using Suprtool you need to specify the connection parameters as follows gt open oracle username password machine Oracle Libraries If the Oracle libraries have not been loaded Suprtool will print an error on the Open command To find out specific error messages as to why the libraries have not been loaded then just run Suprtool with the Iw option which means print loader warnings Suprtool Open 5 7 Suprtool Commands 175 Output Command O 176 Suprtool Commands Define the name of the output file as one of these a new disc file default an existing file Append or Erase option or for stdlist If you use List Put Update or Total Output defaults to null Output produces the same record format as the input source adjusted by Extract commands unless you override it with format keywords OUTPUT filename format ERA
216. ent operation and terminates STExport The Exit command without parameters always attempts to perform the task currently specified while Exit Abort cancels the task and terminates immediately Should STExport be executed as a son process Exit only suspends STExport while Exit Abort actually terminates the process Examples S comment You began to specify an input file stopped for S comment coffee and decided to cancel the task S comment upon your return Sinput invoices Softee break wi Sexit abort cancel the task and terminate End Of Program Exit Suspend ES This feature is not currently available in STExport Open Exit Xeq EX To perform the current task you can either use Xeq which leaves you inside STExport ready to define another task or Exit Xeq which leaves STExport when done with the task Exit Xeq is the default option i e specifying exit starts execution of the current task Suprtool Open 5 6 User Manual STExport Commands 249 250 STExport Commands Examples opt robelle bin stexport Sexit opt robelle bin stexport Sinput invoices Sfloating fixed 2 Soutput invdata Sexit no input was specified format and stop Suprtool Open 5 6 User Manual Floating Command FL Suprtool Open 5 6 User Manual Specify the format and the number of decimal places for floating point fields FLOATING DEFAULT FIXED decimal places SCIENTIFIC decimal places Default Default
217. entury applied to the new ship date field will be 20 Ship dates with a year of 15 or more will have a century of 19 applied What does Set Date ForceCentury do Set Date ForceCentury On will not allow a yy date to be entered in the date function it will force the user to enter a full ccyy date gt set date forcecentury on gt item date field date ccyymmdd gt if date field gt date 98 12 10 Error You must specify the century or Set Date ForceCentury off The default value for Set Date ForceCentury is off What If Have Two Digit Years If you have dates with two digit years there are two main solutions to making your application ready for the Year 2000 Convert all of your date data to use four digit years and modify your programs to process four digit years or Assume that certain dates are in the twentieth century and some in the twenty first this is usually called date windowing The first solution requires that you change all Suprtool Item commands for two digit years to a four digit year format If you have not already done so you may want to Suprtool Issues and Solutions 53 isolate all of these Item commands in a single file per input source e g one file for every dataset in every database in your application or just one file for every database You can nest use files making this approach even easier e g having one database use file that then includes each dataset use file with a list of Item
218. er city gt if Slower city Note that if you use the Supper or lower functions Suprtool does not upshift or downshift any constants used in the comparison You must explicitly specify the constants in the correct case or you can use upper or lower with the constant gt if Supper city Supper vancouver Use the Supper or lower functions for caseless pattern matching As with other comparison operators you must specify constants in the correct case when doing pattern matching VANG ed gt if upper city gt if lower city You can use upper and lower with string expressions that combine many fields and string functions as shown in the following example gt if read Supper S trim first wow Strim last JOE SMITH Date Selection The If command has four functions to help select records based on dates date today days and stddate The date function works for any date The today function works for the current date and dates relative to today The stddate and days functions work for almost any date To use these date functions you must first identify the date format of an item by using the Item command The date function makes it easier to specify a target date for certain date formats e g PHdate or ASK To select records based on a specific date use this feature gt if field Sdate year month day Suprtool checks the date s validity To select the transactions for Ja
219. er link Link output option gt xeq We now have a self describing file with all the customers from California sorted by the customer number Next we select all invoices over 2 000 00 and sort them into customer number sequence gt select from d_invoice select all invoices gt if amount gt 200000 over 2 000 00 gt sort custnum sort and link key again gt output invoices link remember the link option gt exit If we specify the cust file as input the Output file will only contain one invoice per customer Because we want to produce a report of all the selected invoices we specify it as the input file input invoices driving input file custnum is the key link customer combined with customers output invcust produces the file we want exit Each record of the invcust file will have both the invoice information and the customer information for each invoice of the Input file i e one record per invoice What happens if there is no customer record for a specific invoice In this case the invoice record does not appear in the Output file To force Suprlink to include these records use the optional keyword on the Link command t tinput invoices sorted by custnum t link customer optional don t exclude invoices if toutput invcust the customer information texit 18 missing A Join Example Suprlink can join files together that have multiple key records in each file the data re
220. ering questions When Suprlink asks a question in batch no one is there to answer it Therefore Suprlink does not expect an answer from stdin Suprlink assumes that you want your batch task to complete so it always selects the option that will complete the command successfully This is normally a YES answer as in yes purge the file Suprlink prints the question on stdlist as well as the answer that it has selected for you Command Line Options 292 Accessing Suprlink Suprlink currently allows certain features to be invoked when run from the command line Default Outcount File Name oc If you want to know how many records SuprLink has processed use the oc option This option sets the file name for outcount to sloutcount After a successful task SuprLink writes the number of output records to the sloutcount file You can then use this file in shell scripts to check for specific record counts For example suppose that you want to check for at least ten records from a Suprlink join You would write a shell script in the following manner bin sh suprlink oc lt lt EOD in orders join ordhist out ordcomb exit EOD if cat sloutcount ge 10 then echo More than 10 records found fi Variable Substitution v A second command line option allows you to turn on variable substitution Due to how environment variables and processes on Linux Unix interact the variable must be set prior t
221. erts any supported date to a Julian Day number the number of days since 4713 BC This allows for Date arithmetic in which you can calculate the difference between two dates even if they have dissimilar formats For example you could find all orders that were not shipped within 30 days of being ordered gt form ordfile File ORDFILE SALES MFG SD Version B 00 00 Entry Offset ORDER DATE X8 T lt lt CCYYMMDD gt gt SHIP DATE X8 9 lt lt MMDDYYYY gt gt ORDER NUMBER X6 17 Limit 10000 EOF 15 Entry Length 22 Blocking 16 gt in ordfile gt if Sdays SHIP DATE days ORDER DATE gt 30 STISE gt xeq Invalid Dates As with the stddate function if a date is not a valid date then the result of the days function will be zero In the example above if the order has not yet been shipped then the SHIP DATE will likely be blank or zero or some other special value Days SHIP DATE will be zero and the resulting calculation will be a negative number Notes on Relative Dates The date and today functions always generate a constant from the date just as if you had typed it For example when run on February 13 2004 the follwing task gt item field date yymmdd gt if field gt today is the same as gt if field gt 010213 Suprtool normally does no date conversion of the actual dates Dates that do not start with the year do not collate correctly so Suprtool does not allow relative 150 Suprtool Com
222. es third party spoolers employ their own Ip program If the ROBELLE LP variable is set to the name of the third party lp program Suprtool and Qedit will use that program if the output is not to a file This variable must be set before Suprtool is run export ROBELLE LP opt thirdpartyspooler llp suprtool in somefile list device LP exit If the variable is not set then Suprtool uses usr bin Ip as it has previously Notes The List operation occurs logically after the sort phase if any and after any Extract but before the final Output or Put operation A Reset turns off the current List options For more examples of the List command see Suprtool Issues and Solutions 172 Suprtool Commands Suprtool Open 5 7 Listredo Command LISTREDO The Listredo command displays any of the previous 1000 commands LISTREDO start stop ABS OUT file string REL ALL UNN Default display previous 20 commands BJ and are short for LISTREDO Commands are numbered sequentially from 1 as entered and the last 1000 are retained You can display a single command a range of commands all 1000 or all the commands whose name matches the string You can display the commands with ABSolute line numbers the default RELative line numbers 5 4 or UNNumbered If you want to redo any of these commands see Do Redo and Before Examples print all Help commands print last ten commands print entire
223. esan iieo eti est 119 greater than gt si dtc diene nios e 330 H Heading command sesseeeeeeteneeseeeeeeeees heading HTML option cic eeeseseeeereeeeeeeees heading maximum length Help command 00 eee seseeteeeeteneeeeeseeeeeee Help command Suprlink ee eeeneeeeeereeeeee highwater mark reading to holding tables for re USC ceeceeseeeeeeeeeseeeeeeeeeees TOW tO TUM og sh aye i a r weet eee tees HPCalendar date HPCalendar date format Hpmodify editing examples 00 0 ceeeeeeeeereeeee 170 HP UX commands eee HP UX vs MPE ie HTML command eee eeeseeeesceeeeeeeneeseseeeeeee 240 HTML files maximum size cccceeeseesseeseeereees 240 I TEBE numbers siaa Mead andes 235 If lookup Tf command 0 0 eee eeee ete teeeeeeeteesceeeseeeeneeseeeeeeaee If command too long use read If command too long use Table If command combining with Chain 0 eee 72 If command decimal places ceceseseseeteeneeee 127 If command prompting for values Ifcheck Set Option cceecseesceeceeceteeteeeenes Ignore Set Option 0 0 0 eeseeeeeeeeeeteeseeeeeeeeees illegal digits packed or zoned IMAGE end of file c ccc cccesecsecsseeseeeseeseeensees initial command Line eee eeeeeecneeeeeeeeeeeceeeeeeeens initializing a field input choices Input command input file eee eseeteeteeseeeeeeeee input file maximu
224. eseeeeeeeeees 305 Verify command eeeeeeeseeseereeee 197 208 261 308 W Warning MESSAGES eseese reestr eerereerersrseee 214 329 warning delete all records 0 0 eeeeeeeeseeeceeeeeeeeeeees 81 Suprtool Open 5 7 Warnings Set cccccccceccescescesseeeceeceeceseeseeseeseeseeneees 256 Web server Web Httmhes cise cssests set E E E EEE X Xeq command STEXpott s sesseseesseeseseee eese 233 262 Xeq command Suprlink 291 309 Xeq command Suprtool eee eeeeeeeeeeeeeee 90 209 Xeq option on Exit 90 233 291 XML commana si cdicnencusciieuesacinaccnasecs 263 Xniltagchar Set cea ee 257 K SORT asese aana e eane teow aa 181 Suprtool Open 5 7 Y Year 2000er ae 178 179 yes answer tO QUESTIONS eeececeeceteeteeeenee 213 329 yes response in pseudo batch eeeseseeseeteeneeee 326 yyymmdd date format ce cecececeseeteeteeteeeeneeee 144 Z Zero command sessssesssserresiersetrrrreressrrrereresrsreest 266 Zoned constants soiien igina 94 zoned decimal illegal digits ceceseseseeseereeee 281 Index 359
225. et OS set command ksh STExport Open executes any OS command e g 11 or script file File Names STExport s Input and Output commands accept any valid file name however file names are currently limited to 240 characters Calculator Any command line beginning with an equal sign is treated as a calculator expression This feature can be used to do other calculations without the need of an electronic calculator You can obtain a short description of the calculator by entering the following gives a summary of functions For a detailed description of the calculator and its options see the Suprtool manual Control Y You can interrupt a STExport task with the Control Y key hold down Control while striking Y STExport responds by telling you how far it has gotten IN OUT etc and asking if you wish to stop Hit the Return key to continue or type YES to stop the task Many sites use Control C as the interrupt key instead of Control Y Use the stty command to display your intr setting 238 STExport Commands Suprtool Open 5 6 User Manual Before Command B Repeat any combination of the previous 1000 command lines with or without editing BEFORE start stop string ALL Default redo previous line BQ redo without change The Before command allows you to modify the commands before it executes them If you don t need to change them use BQ or Do The Before command uses
226. f its own record structure this allows you to refer to the field names and Suprlink can compute where they occur in the record For example t tinput sales Sales is sorted by custno link custfile key is custno link addrfile toutput custsale link three files texit 1nto custsale Link Keys Suprlink allows files to be linked by up to two keys a primary and a secondary key field By default Suprlink assumes that the key field to the Link file is the same key field specified for the Input file If the Link key field is different from the Input key field use the BY clause to specify the correct key field t input customer key name is custnum link sales by custno new name for the same field You would also use the BY clause if the Link file was created using the Suprtool Output Query option instead of Output Link Secondary Keys Suppose that you are linking a master to a detail and the detail can have several entries for each master Suprlink has an option that allows you to select which link record you want by matching a second key field in the master LINK filename BY primary key secondary key This option forces Suprlink to compare both the primary key and the secondary key when comparing an input record to a link record For example t tinput students key name is ssn t link majors by ssn cmaj Students contains cmaj This example says that the file Majors is sorted by ssn and may contain more than one
227. f ten files For example if the contents of the Usedef usefile has a references to Useext both usefiles would be executed Suprtool Open 5 7 Suprtool Commands 221 gt in dsales gt use usedef define delivered deliv_ date define purchased purch date item delivered date yymmdd item purchased date yymmdd use useext ext cust account ext deliv date ext product no ext product_price ext purch date ext sales qty ext sales tax ext sales total Care must be taken when entering Use commands with a stacked command after a usefile reference For example if you enter use usedef def j 1 6 byte the Define command will not be executed until after the Usedef and any other nested Use commands are finished Notes The usefile may be an unnumbered fixed length file or a Qedit workfile but no more than 256 characters per record will be processed For compatibility with Qedit Useq can be abbreviated to UQ If a Use file ends with an ampersand Suprtool will assume that you are continuing the current command on the next line outside of the use file 222 Suprtool Commands Suprtool Open 5 7 Userpause Command USER The Userpause command prints a prompt message on the screen and waits for the user to press a key USERPAUSE string Default read without a prompt Prints the string and waits for any key Leading spaces in the string are printed Examples In this example we have a usefile that displays a messa
228. fault is binary zeros For example t tinput custfile key name is custno t tlink addrfile optional don t drop customers toutput custaddr 1f there is no address texit Suprtool Open 5 7 Suprlink Commands 315 Listredo Command LISTREDO The Listredo command will display any of the previous 1000 commands LISTREDO start stop ABS OUT file string REL ALL UNN Default display previous 20 commands BJ and are short for LISTREDO Commands are numbered sequentially from 1 as entered and the last 1000 are retained You can display a single command a range of commands all 1000 or all the commands whose name matches the string You can print the commands with ABSolute line numbers the default RELative line numbers 5 4 or UNNumbered You can write the commands to your terminal or OUT to a temporary file If you want to redo any of these commands see Do Redo and Before Examples print all Help commands print last ten commands print entire redo stack print all remove commands print all rm xx commands print all with rm anywhere print ALL relative numbers L L EL L L 1 L Saving to a File Saving the Listredo commands to a file is not currently available in Suprlink Open Notes The Listredo command cannot be abbreviated but BJ is accepted as a short form Persistent Redo Redo commands can be saved in a permanent file a
229. field Sdate 1 last last day of previous month Combining these features makes it possible to generate batch jobs that require no operator input For example to select all of the transactions for last month you would use gt item trans date date phdate gt if trans date gt date 1 first and amp trans date lt date 1 last Month End Suprtool is always expecting a valid date Suppose that you have a month end job that contains the following If command gt if field date 1 When you run the job on May 31 2000 if Suprtool were to use the literal interpretation of date 1 it would use the date April 31 2000 In fact there is no such date April has only 30 days Whenever you specify for the day and the day is greater than the last day of the month you specified Suprtool uses the actual last day of the month instead of the current day of the month In our example Suprtool would use April 30 2000 Suprtool will take leap years into account when calculating the last day of February Today s Date To select records based on today s date use the following 148 Suprtool Commands Suprtool Open 5 7 Suprtool Open 5 7 gt if field Stoday today s date gt if field Stoday 1 yesterday s date gt if field Stoday 1 tomorrow s date Use the Item command to qualify the field as a date The today function accepts one optional argument which is the number of days before o
230. field definition eceeeeeeeeeesceeceeeeeeees absolute value function accuracy in numeric expressions Add command ecesesereereeee Add Dates aigis eseas EEE E adding records to a dataset ccecceseseeteeseeteeneeee Allbase database alphanumeric string test alternate values cceeeeeeeeeee i alternatives to the If command cceeeseesereeee analyzing performance data ceseeeeeceeceeeeeeees AND operator re appending to file eeeeseeeeceeceeceseeseeecececeaeeaes appending Hpmodify e cece cececeseeteeteeteeeeeeee APS date formats 2k Seiel orne bts bas arithmetic expressions cecceeseeseeseeeeeeeeeeeeees arithmetic trap Arithmetic Set Option cc cccceseeeeeeseeseeeeeeeeees ascending order esscsycscsctinedeabensseveisecseesicenees ASCII option ccceccecceseesecseceeseeeeseeeeeeeeeeeeeees ASK MANMAN date selection cceeeeseereeeees Index 351 ASK G0 015 0 ee 163 ASTELISK pists sila newts at sign in patterns y attached Printer oorenssncrn nieta 156 B packslash nen E AN E Base command a Base command default mode ccccesceeeseeeeeee 188 base name parameter seesseeseeeeeiererererreerereese 68 167 batchvis Aivatiasnentess batch passwords batch vs online ate batch Suprlink 00 0 eee ceeceeesceecenceeseeseeeeeeeeeeeeees Before command cce
231. field that consists entirely of numeric digits redefine the field as a display type and use the redefined field name in the If command Character Type Byte type fields can also be checked to see whether they contain only Alpha Numeric Alphanumeric or Special characters The complete field is compared against the specified character types Type Characters Alpha A Z a z 52 characters Numeric 0 9 10 characters Special anything else 194 characters including spaces punctuation Roman 8 letters binary junk Alphanumeric A Z a z 0 9 62 characters For the test result to be true all the characters in the field must be of the specified character type To test a substring use the Define command to define a subfield gt if field alpha gt if field lt gt numeric Examples String Class 1234 numeric 1233 no class contains both numeric and special ABCD alpha B JONES no class contains both alpha and special eek special A1B2 alphanumeric Pattern Matching Suprtool can also select records based on a pattern of characters rather than an exact string of characters For example use the following to select all records with CONNOR anywhere in the Name field Suprtool Commands 145 gt if name CONNORG The double equals is the operator for pattern matching The at signs means anything before or after CONNOR is acceptable including nothing For character fields there are two compa
232. file are displayed The display shows the field type and field length in IMAGE notation An I1 field is a single integer Packed fields show the number of nibbles subtract one to obtain the number of digits Byte and zoned decimal fields show the byte length When showing the form of a self describing file Suprlink shows the byte offset of each field after the subcount type and sublength The first field always appears at offset one There are two types of self describing files One type is produced with Suprtool s Query output option You produce the other type with the Link output option The Form command shows the internal self describing version number enabling you to tell the difference A 00 00 Query Output Option Compound fields have a question mark for the type and the length is the number of bytes in the field Sort information about the file is missing Here is an example form listing form custfile File custfile SD Version A 00 00 Has linefeeds Entry Offset CHARACTER X5 1 length is five bytes ZONED Z5 6 room for five digits INTEGER Il 11 single integer DOUBLE 12 13 double integer PACKED P6 17 room for five digits QUAD I4 20 eight byte integer REPEATINT 26 28 compound field LOGICAL K1 34 single logical DBLLOG K2 36 double logical Entry Length 44 Blocking B 00 00 Link Output Option These self describing files contain information about how the file is sorted Compound fields are h
233. file operation is an error or a warning With file operations such as rm or mv the shell that executes these commands returns an error condition to Suprtool which impacts scripts that are converted from one operating system to another For example on MPE a purge command on a file that does not exist was only considered a warning On Linux Unix an rm command on a file that does not exist is considered an error which halts Suprtool when run in batch For example the ksh returns an error code of 2 if you attempt to remove a file that does not exist rm filelx rm filelx non existent echo 2 We have added Set HPUXCmdErr command which will tell Suprtool to ignore errors from certain OS commands Please note that this does not impact Suprtool s internal checking of Suprtool commands For example if you want Suprtool to ignore the common occurrence of stopping a script when an error occurs you just need to set the string in HPUXCmdErr as follows opt robelle bin suprtool lt lt EOD set hpuxcmderrs rm rm rm rm filelx rm filely rm filely exit LEOD If the command returns an error Suprtool will check to see if it was an rm rm or rm command and ignore the error Suprtool Open 5 7 Suprtool Open 5 7 lfcheck SET IFCHECK ON OFF Initially ON With Set Ifcheck On the If command produces an error if any field used in the If command is not contained entirely within the input file record For compati
234. format of the binary field Suprtool Open 5 7 Suprtool Open 5 7 Field Format Output Size Il J1 5 bytes 12 J2 10 bytes 13 J3 15 bytes 14 J4 19 bytes K1 5 bytes K2 10 bytes Pn n 1 bytes P n n 2 bytes The last digit of the number is replaced with a letter corresponding to positive or negative values See the following table Units Digit Positive Negative No Sign O ON HD nH FP WN KF O PAO GY OS BE ee BDO Our er WS O ON DH nA FP WN KF O Positive values for I and J type fields are converted into neutral i e no sign display values The sign is preserved when converting packed fields to display DISPLAY is not supported for Real or IEEE fields Byte fields are not affected by this option Display fields in the input record are not converted into display PRN Many PC software packages import PRN files these files are also called delimited in some PC documentation A PRN file has quotes around character fields and a comma between each field Binary values are output in ASCII with an optional leading sign Not all applications accept PRN files for more precise conversion of data use STExport PRN converts each input field to a fixed width output field filling with trailing spaces where necessary All binary values are converted into their equivalent ASCII value left justified in their fields The sign precedes the ASCII value for the number and can be missing or See the ASCII output option for the field
235. fying unprintable characters you do not put in quotes Cleaning your Data In this day and age of migrations we were looking at issues that customers have run into when importing data into new databases What came from this investigation where ways to Clean up your data in any given byte type field Suprtool Open 5 7 Suprtool Open 5 7 We have added two methods to clean your data you can use Suprtool to clean an individual byte type field or STExport to clean all of the byte type fields for a given file that you are exporting Un printables Sometimes un printable or extraneous characters get stored in files or databases that have no business being there This may be some tab characters in an address field or perhaps and embedded carriage return or line feed Suprtool now supports the clean function which will replace individual characters for a given byte field There are three things that Suprtool needs to know in order to clean a field Suprtool needs to know which characters it needs to clean what character it needs to change the bad characters to and also what field does it need to clean Clean Command Syntax You can specify special characters Decimal 0 thru Decimal 31 via the command Clean special You can also specify a range or characters by using the following syntax Clean 0 31 240 255 The Clean command is used to tell Suprtool what characters it needs to look for in a given byte type field For examp
236. g one other field gt output outl output file will have two fields gt xeq You can easily insert data into the middle of a record again using the Extract command Define the first and second halves of the record as two big chunks Now Extract the first part note the constant you wish to insert then Extract the second part 34 Quick Start Guide for Suprtool Suprtool Open 5 7 gt input myfile reclen 95 nolf 95 bytes wide gt define part1 1 60 byte first 60 bytes gt define part2 61 35 byte remaining 35 gt extract partl constant part2 extract an 8 byte constant gt output newfile 103 bytes now gt xeq Producing a Condensed Table Listing Simple Reports Suprtool Open 5 7 When debugging test databases it is often desirable to produce a condensed listing of a table on stdlist The following example combines the Extract command with the ASCII output option i e all binary and packed decimal data is converted into readable ASCII characters For readability each data value is prefixed with an abbreviated column name This listing is more compact than the one produced by the List command gt select from customer gt extract Account cust_account gt extract C R credit_rating gt output ascii implies stdlist gt xeq The output would look like Account 04598921 C R 500000 Account 44657844 C R 2000000 Account 98753198 C R 300000 You can produce simple reports wit
237. g labels cs c cscecscevssuduageevesncsoncben cotesavbenverevesssds MakeAbsent Set Option ccc ceeeeeesereeeeeeeeeees Mapped Set Option cece eeesceeeeeeteteeseeeeeeeees master dataset expansion match patteria cccsczie siecidavicieeckscedtigusceedassedensbencbebee maximum block size in Suprtool ee eee 326 maximum delimiter length 0 ce eceseeseeseereereeee 271 maximum heading length ceeseseeseeteeteeeeee maximum input block size maximum input record length eee eee 271 313 maximum link block size s es 313 maximum link fields 313 maximum link files 313 maximum link record length 313 maximum output fields eee eeeeeeneeeeeeeeeeee 314 Suprtool Open 5 7 maximum output record length ee 271 314 maximum size HTML files ccccecseesseeseeereees 240 MDX sieer sarei w117 means range Of fields eeeececeeceteeteeteeseeseeneeee 333 MISSING COMMA CLTOL eeeceeceeseeseereeeeeeeeeeeeeees 99 101 Mixed case COMPALISONS cs eeeeeeeeeteteeeeeeeeeeeee 132 mode parameter 68 167 modulo operator cceeseeceeseereereeee 98 128 MPE commands disabling access ceeeeeeeee MPE vs HP UX reni a ten hits cede ire MPE restricting ieren siersteen multidataset access multiple commands per line 0 0 eee eee eeeees 63 332 multiple search Values cesses eeeetereeeeeeeeeeeeee 198 N native language SUPP
238. g on line tasks with usefiles Suprtool c set interactive off use usefile LabelledTapeRewind SET LABELLEDTAPEREWIND ON OFF This command has no effect in Suprtool Open Limits SET LIMITS MPE ON OFF READONLY ON OFF Tablesize size Initially MPE ON ReadOnly OFF Tablesize 1 megabyte When Set Limits MPE is Off you cannot execute any OS command e g rm This is an irreversible option once disabled it cannot be enabled again by the user Table Size You can control the size of a table with the Set Limits TableSize command By default an individual Table will be 50 Megabytes in size and you can have up to 10 tables The Global limit for all tables is up to 500 Megabytes You can control the size of a given table with the command gt Set Limits TableSize n If you enter the command Set Limits TableSize 100 and the next table command that you build will have a limit of 100 Megabytes Suprtool Open 5 7 Suprtool Open 5 7 Read Only Suprtool normally allows any user with the proper access capabilities to add records to a database To prevent users from accidentally updating their database we provide the following setting within Suprtool gt set limits ReadOnly On The ReadOnly setting once turned on cannot be turned off for the current run of Suprtool This disables all commands that potentially change data for the specified database If Set Limits ReadOnly is enabled then the Add Put Delete and Update
239. ge and then waits for the user before starting the task gt q gt q We will select all transactions over 10 000 Since gt q there are many transactions this task will take gt q some time usually more than fifteen minutes gt q gt userpause Press any key when you are ready to start Suprtool Open 5 7 Suprtool Commands 223 Verify Command V Displays the specifications that you have entered so far VERIFY ALL VERSION command Default Input Output Sort Numrecs changed Set values Parameters More than one command can be verified at once by entering several command names separated by a comma or a space The format of the Verify output is organized into columns wherever possible For Verify All Suprtool prints all of the information concerning the current invocation of Suprtool including the value of the Set options and the Suprtool version number For Verify Version Suprtool prints out the version information Verify with no parameters prints the current values for Chain Get Input Output and Key or Sort commands It also prints those Set options which are not currently at their default setting Examples gt verify gt verify input current input file gt verify if selection criteria gt verify all all current options gt verify version version number of Suprtool 224 Suprtool Commands Suprtool Open 5 7 Xeq Command X Suspends entry of commands and
240. generation language sold by Cognos You can use Suprtool and Suprlink to improve the performance of PowerHouse applications For a complete discussion of how to use Suprtool and Quiz together refer to the Suprtool with Quiz QTP section of the Suprtool User Manual Suprlink can write to PowerHouse subfiles that have been created with Quiz or QTP Subfiles are self documenting files that contain a complete description of the file s record structure This information is stored in user labels in the file and is known as a mini dictionary When you access the subfile in Quiz its description is read from the mini dictionary You must ensure that the PowerHouse subfile description exactly matches the record layout of Suprlink s output file Remember that Suprlink will drop the common key fields from the link files Step 1 Create the Subfile with QTP Before running Suprlink you create an empty subfile with QTP rm invcust Sqtp gt access d_invoice link custnum to amp gt custnum of m_customer gt subfile invcust keep size numrecs include amp gt custnum invdate amount invnum amp gt name address gt set input limit 0 gt go The subfile must contain all of the fields that Suprlink will produce in the output file with the same attributes data type and length and in the same order Use the Include option of QTP s Subfile command to define each of the fields in the correct order The numrecs parameter must be
241. gress increments are reported for small files or datasets Suprtool reports the phase that it is in whether input phase sort phase output phase or combined input output phase not sort The content of the progress messages is as follows Percentage complete Phase and the total number of records processed Delta Sec Min the time elapsed from the previous message Wall Sec Min the total elapsed time Suprtool Commands 205 206 Suprtool Commands CPU Sec the total CPU Seconds at this point When using the record selection feature of the Input command Suprtool cannot be absolutely certain of the total number of records Therefore the percentage calculation is estimated Prompt SET PROMPT character Initially gt PROMPT tells Suprtool which character to use for prompting Any special character can be used as the prompt character For example opt robelle bin suprtool gt set prompt Sopen oracle demo reader RealMap SET RealMap ON OFF Initially ON Previously Suprtool would treat an R type field in an Eloquence database as an R type while the data inside Eloquence was stored and treated as IEEE therefore incorrect results would occur with coercions and arithmetic operations Suprtool now by default maps all Real and Long fields to their respective IEEE fields You can change Suprtool back to the previous behaviour with Set RealMap Off A form command will still show the fields as being R2 or
242. gt exit abort cancel the sort and terminate End Of Program Exit Xeq EX Signal the end of command input and the start of an extract operation After the Suprtool task completes Suprtool terminates Exit Xeq is the default option i e specifying Exit starts execution of the current task Suprtool Open 5 7 Suprtool Commands 105 Examples S opt robelle bin suprtool gt exit no input was specified No action taken S opt robelle bin suprtool gt input rep23 newdata gt out rep23 data gt xeg copy one file gt input rep24 newdata gt out rep24 data gt exit copy and stop Notes on Exit Xeq If you have entered neither sort keys nor an input source Exit terminates Suprtool without performing any task If you have defined an input source but without any sort keys Suprtool does a copy operation prior to stopping 106 Suprtool Commands Suprtool Open 5 7 Export Command EXP You cannot use Suprtool s Export command to invoke STExport Open but you can run STExport Open by itself opt robelle bin stexport STExport Open Copyright Robelle Solutions Technology Inc 1988 2013 Version 5 6 STExport Open only accepts self describing files created by Suprtool Open or the MPE SDUnix program STExport has it s own section in this manual Suprtool Open 5 7 Suprtool Commands 107 Extract Command EXT 108 Suprtool Commands Assembles output records by stringing together fields ex
243. gt output accum append gt output keyfile key gt output transf num data gt output querynum num query gt output null If you want to find out how many records are qualified by some selection criteria without producing an output file send the output to null The Out count on stdlist displays the number of qualifying records Notes The output file must be an old existing file if the Append or Erase option has been specified Suprtool Open 5 7 Suprtool Commands 181 Put Command P 182 Suprtool Commands Directs output records to be DBPUT into an Eloquence dataset Put can be combined with Output to a file but if no Output command is entered Suprtool defaults the output file to null It is your responsibility to ensure that the output records match the format of the target dataset The DATA option of the Output command is the only valid output option when Put is specified PUT setname host service database Default database Base Parameters If database is not specified setname must be a valid dataset of the Base previously opened You must have write access to the dataset selected If database is included the specified database is opened This Put database is closed after the task is completed unlike the database opened with Base It is possible to copy records from one database to another with Suprtool Examples For the first example we assume that the D SALES dataset is designed to con
244. h Quiz Q TP t rere errn rE ER on eG EEA A EE OTER A 299 Suprlink Commands 301 General NOES iseiiiieriien re nen EE EE EEEO E EEEE E EEEE TEE O a L EE 301 ADDECVIATING 72 sexe a e a aE E ETN E EO aE 301 Uppercascor LOWercase e sones eanne E T ARE EAEE ATA an eRe 301 Contp aoise rasm ens A R A ENEN 301 Comments on Command Lines x foseseevbsvevsctavee vd a n E E E ES 302 OS Commands hezo a E R AA ENEE ieee 302 Pale NaIME Siegenia E E A EENS 302 Calculatot renen iaaa E E A ENEE tee 302 Control Yasana A E E A EENS 302 Before Command B y sessen E E EE NE 304 D Comimand DO in E vee ats A E REEE AE EE REE 306 Exit Command E ynna a O RE EEEE EEEE O EEAS 307 Exit A ort EA Jee rar n rE E E ETE ETE OAE E ERE 307 EXISUSPEnd EIS a a e edee eea EEn EET APEE EAn TEAPA SEE rene EREC EEEE aSa 307 2 MG EEX S EAEE EEE E A EI EE A EEE ATE PTEE 307 Form Command F ccccccesssscesssssessssessssneecessecseceeesssaecesssecseaeeesuseecessseceuaeeesesaecsenseeees 308 Help Command A iiccnsieecccesccsascsecscodacedacsessestusesnctensseesnepeceengnessasent sesastagensngeragbeseseunestaneee 310 Input Command L iccciecacssgieccescesachdecstosicedadeesde cia eE det ticesedecsigaesvageredacsusticestnecauiiekedan Eai 311 Jomn Commiand M A N EPEA EEEE ees ee ea RNa ee Nee ee ee 312 Suprtool Open 5 7 Table of Contents 13 Link Command E Jie maaan favors cece cook O E Geese eevee ieee antes 314 Listredo Command LISTREDO iren u n
245. h Suprtool s List command You select the records for the report with the If command and the fields for the report with the Extract command Reports can include running headings with the date title and page number and an optional line of column headings Suprtool can produce default titles and headings gt select from customer gt extract cust account gt extract credit rating gt list standard gt xeq The output would look like this Jan 17 2000 11 59 CUST_ACCO CREDIT RATING 4598921 5000 00 44657844 20000 00 98753198 3000 00 Your First Report Our report selects all customers in California sorts the records by city and reports on the city account number and name of each California customer Quick Start Guide for Suprtool 35 gt select from customer input table gt if state CA California customers gt sort city sort by city name gt extract city city first on each line gt extract cust_account followed by account gt extract name first and first name gt extract name last and finally last name gt list standard produce a quick report gt xeq These commands produce a report with four columns The title consists of the date and page number The column headings are the name of each column that we extracted Column Headings Column headings default to uppercase field names The names are truncated if they are longer than the field itself One space is inserted between fields
246. h the c and v options with the following command suprtool c use usefile v Loader Warnings Suprtool by default does not print loader warnings These are errors or problems when Suprtool starts up Suprtool will attempt to find the Eloquence libraries and if configured the Oracle libraries You may use both none or one of these libraries so these warning errors may be perfectly valid for your site If you want to see the loader warnings you can run Suprtool with the lw option suprtool lw Unix Linux Notes 42 Running Suprtool This section describes Suprtool Open features that interact with the outside OS environment Shell Commands You can execute shell commands by typing them anywhere you type a Suprtool command If a command is both a shell and Suprtool command you must precede the shell command by an exclamation mark or a colon Shell commands are executed by your default shell the one configured in etc passwd or etc shadow for your user name Suprtool Open 5 7 Ssuprtool gt whoami these 3 commands are identical gt whoami gt whoami gt set does Suprtool s Set command gt set does Linux Unix s Set command The shell commands are executed by a child copy of your shell child shells cannot change environment variables in the parent s environment To change the value of an environment variable you must first exit Suprtool Hardcoded File Names and ROBELLE Variable So
247. hS s enen etenen i ae E E T aE 236 STExport Commands 237 GeneraliN Ot6S eprint a a bute a a a eae Aa a 237 ADDEC Vat arteen eea nE a a etaoin aeee AEE na aea EAE AEE CEE EEA TER 237 Uppercase or LOWEerCAaSE cenno oeei aeeie aee daie ee EELEE AES AEEA Eat 237 Comments on Command Lines 0 eeceseesceceeeesseceeeceseeeesaeceeeeceaeeeaeeceeeeeaeeeeneenrees 237 OS Commands aao aaa h oes A ee thea Ea E eE E E ETE ORAE 237 IAEA A N A AEEA AAE E A EN A ATE ENT 238 EU EAB EEATT ER EA ENT ADA AAEE E AA E TARA E ANT 238 Controley ar r dela a a e E eae Eana e EEEE ANE EAEE ENR 238 Suprtool Open 5 7 Table of Contents 11 Before Command B 2 5 itvecce eee ioe e st esees dd bs et aaa a ede overs eetten 239 Cleat Command CL reenn e a fees eesti Aiaeren teas evel heaton 241 Removing Bad Characters nimon enna aeo E tuoee a EE ETER 241 Columns Command C irren a E E N tees evens Kear ETES 242 Date Command DA nrinn a e en Er ares de hs NEE E 243 Decimal Command DEC imee ee e ei EEA tiv E E E ede eee E E 245 Delimiter Command DE ne a E a E E E E E E e aeee 246 DoCommand DO enr ded ee E E E EE sea oP eee ee Teas 247 Escape Command JES raa a etic sues EEE EEEE ET OE A EE A a a E Te 248 Exit Command iE isccitsedcca2sktecs eroded tees seed eal eee RET EA EE as 249 Exit Abort EAs aE ets Ls os deat cect tedend es Paces ee en ead aa 249 Exit Suspend ES occ csc eE ET EA EN E EE E EE 249 EXC X eg EX PAn aE E Ls os dena TT
248. he If command for details Tables Tables are created with the Table command and they are used for testing in the If and Chain commands Tables are used by the lookup function of the If command Use tables when you wish to check a data field for many different test values You may also use tables to specify the records to search for with the Chain command Table can also mean a table from an SQL database Warnings Warnings are messages produced by Suprtool to let you know about nonfatal conditions that might affect your task Some common warning messages and their meanings are described in Appendix A Yes or No When Suprtool asks a question that requires a YES or NO answer Y OUI JA and SI are accepted as YES and any other answer is considered NO Special Characters Suprtool Open 5 7 Special Characters Certain non alpha and non numeric characters like gt and have special meaning within Suprtool See the descriptions that follow As well the term special designates a class of characters in the If command Glossary of Terms 345 346 Glossary of Terms Means Stdinx Stdlist in the Input command means to read input from stdinx MPE only in the Output command means to write the output to stdlist gt input MPE only gt output Means Equals or Calculate in the If command means EQUALS gt if customer 40832 in commands means calculate something 10 25
249. hen echo failed temp_sxlog exit 1 else Everything worked fine Send the OK return string to the CGI script including the name of the HTML file name echo OK Stemp_stexpdata html rm Stemp_sxlog gt dev null rm Stemp_sxdata gt dev null exit 0 Perl Script With such a simple example we could have written the shell script a bit differently and then used it as a CGI script However shell scripts do not have enough features to easily handle parameters or complex forms Instead it is typical to use another language as an intermediate step One of the most popular CGI scripting languages is Perl Perl has a full set of string handling functions and can be combined with graphics libraries available from various sources Let us call this one sx_orders pl It must reside in the directory defined in the server configuration file Suprtool Open 5 6 User Manual STExport Commands 261 usr local bin perl Execute shell script and capture returned string return_string users orders scripts sx_orders ksh Return string can be OK html file name or failed log file name Split function separates return_string s 2 components status_word html_ file split return_string if status_word eq failed If the script failed print an HTML error page including the logfile error page lse e If the script is successful display the HTML file cr
250. in Suprtool Open Suspend SET SUSPEND ON OFF This command has no effect in Suprtool Open ThousandSymbol SET ThousandSymbol Default comma This setting is used to change the Thousand character which is used to edit the data in a field used by the Number function The default character for the Thousand Symbol is a comma Userlabels SET USERLABELS ON OFF This command has no effect in Suprtool Open Varsub SET VARSUB ON OFF Initially OFF Suprtool Open 5 7 Suprtool Open 5 7 This option tells Suprtool to resolve any environment variables in any command The default value for VarSub is Off for backward compatibility Please note that Suprtool will not resolve any of its internal options such as LOOKUP DATE etc If you are using Suprtool for AMXW Suprtool will try to resolve CI variables with and then any environment variables left over VarsubCompat SET VARSUBCOMPAT ON OFF Initially OFF The Set VarsubCompat flag has been added to have variable substitution be more flexible On MPE variable substitution would pass the name of the variable thru to be parsed even if the variable was not set The default behaviour was to return spaces if the environment variable was not set This is still the default behaviour however if you set varsubcompat on Suprtool will return the environment variable name similar to how MPE works with unresolved variables VarsubDebug SET VARSUBDEBUG ON OFF Ini
251. ine This is awkward to use and for internal reasons the maximum length is restricted to 256 characters The read function makes it easier to enter long If commands Its maximum length is based on the complexity of the expression not on the number of characters Read Function The read function reads the If expression from stdinx or from the usefile if the If command is in a usefile Read continues to prompt for input lines until you press Return or enter You must remember to enter all the necessary parts of the If 152 Suprtool Commands Suprtool Open 5 7 Suprtool Open 5 7 expression including connectors like AND and OR and commas You do not use an ampersand amp to continue from one line to the next when using read gt if read prompt for the expression status 20 and read prompts with state AZ the comma is still needed CAN OR no comma on the last line blank line to terminate read Redoing Read When prompting for an expression read saves each line in the redo stack and accepts the Before Do Listredo and Redo commands This provides an easy way to specify all or part of a previous read expression Error Data Overflow While the read function permits long expressions there are other internal limits within the If command The first is a limit on the amount of space for constants Suprtool must blank fill all string constants to their full length The following ex
252. ine for each d specified in the edit line Note that d d does not specify a range as it does in MPE V but simply deletes one character above each d Multiple d s may be followed by an INSERT or REPLACE operation DELETE Deletes to the end of the current line from the position specified by d gt May be followed by an INSERT or REPLACE operation APPEND If text follows the gt this text is appended to the end of the current line If a gt without text is positioned beyond the end of the current line then a simple replacement is performed instead DELETE Deletes from the end of the current line right to left Multiple d s and INSERT and REPLACE strings may be specified after gt REPLACE Replaces characters at the end of the command line The last rightmost character of the replacement string is at the end of the line CHANGE Changes all occurrences of one string to another in the current line starting at the c The search string and replace string must be properly delimited A proper delimiter is a non alphabetic character such as or The substitution is specified as cdelim search string delim replace string delim Omitting the replace string causes occurrences of search string to be deleted with no substitution UNDO A single u in column one cancels the most recent edit of the current line Using the Undo command twice in a row cancels all edits for the current line and re establishes the original unedited line
253. inneni e aaa today function of Extract today function Of If eee eeeeeceeceeceteeeeeeseeseeneeee 133 Total command 202 Total output restrictions totaling by field oe cece cece ceseeteeteceeeseeeeseseeeeees totaling duplicate records totals toa Tess Mesias aen a E totals TUDNI Deane E n AEE trailing sign trIMMING Spaces eeeeeeseceeereeeeteteeeeeeeeteeeees truncate FUNCTION eee eeeeeeeetereeeeeeeeeeeenees truncation numeric truncation Strings 0 0 eeeeeeseeeceeceeceeeseeseeseeseeneees two digit YOALS ee eeeeeeseeeceeceecesceaeaecaecaecseeneeneeeseess type parameter ierre ineens is U ndo edit Hpmodify n printable characters i MSIPNED val s u pestre ee pdate comMANA ee ceeeeseeeeeeeeeeeeeeeeeeees pper case Shifting Strings s sssssessesesessisessessssseesesersssesessese se command s sseseseeeeeeesrieereeresrererees se command with If read ser specified heading esseeeeseeeeeeersererseseereseesere serpause command s sssiseesesserestisistesierererrerese Ce eet es sad a V AO 0 O ee ce 40 value tesise ara rA EAEAN 123 variable length strings eeeeeeeeeenereeeereeresee 101 129 Variable substitution Variable Substitution Set option s s ssessseseseeeeee 194 Variable Substitution STEXport ceceeeeereeee 218 variable length output file 1 226 Varsub Set Option eee ceeeeeesseneeeeeete
254. into Suprtool and select data based on this list First use the Table command to load values from an external file into a table then use the lookup function of the If command to match data to the table Suppose our list is in a self describing file called Custlist We create a program temporary table called cust_table Note that this is not the same as an Oracle table gt select from order details gt table cust_table cust_no file custlist gt if lookup cust_table cust_no gt output orders gt xeg If you want to find all customers not on the list just negate the If condition by simply putting not in front of the lookup 26 Quick Start Guide for Suprtool Suprtool Open 5 7 gt if not S lookup cust_table cust_no Finding Data Based on Another Table s Criteria Sometimes you need to find data from one table based on conditions from another table This is a typical example you want to find all of the pending orders for those customers whose accounts receivable balance is 0 First we find the customers with an AR balance of 0 and extract their customer numbers to a file gt select from receivables gt it ar_balance 0 gt ext cust_no gt output custlist link gt xeq Now we can find information by loading a file of customer numbers into a table and then applying the lookup feature gt select from order details gt table cust_table cust_no file custlist gt if status PENDING and lookup
255. invuse input invoices input file to format floating fixed 2 formatting option output invdata produces the file we want exit STExport prints the lines in the usefile including the comment lines This allows you to include instructions and reminders in the usefile In the example above there were no commands for the user to enter Notes Usefiles cannot be nested in STExport The usefile may be any unnumbered text file or a Qedit workfile but no more than 256 characters per record are processed By default STExport displays the commands in a usefile as they are executed STExport can execute commands quietly using the Useq command For compatibility with Qedit Useq can be abbreviated to UQ 276 STExport Commands Suprtool Open 5 6 User Manual Verify Command V Print the definition of the current task VERIFY Verify prints the current Input and Output files and all export specifications in other words it is a Verify All command Suprtool Open 5 6 User Manual STExport Commands 277 Xeq Command X Perform the current task XEQ Xeq checks that you have specified an Input file and an Output file Then it performs the task and creates the Output file Finally it closes the files ready for you to specify another task or Exit If you also wish to leave STExport after completing the task use Exit instead of Xeq 278 STExport Commands Suprtool Open 5 6 User Manual XML Command XML Use XML to pr
256. is XxXXBxXxx It is not an overflow since there are only spaces to the left of the L If the data was eg T JL2H1L2 an overflow exception would occur Numeric field edit masks Our edit masks for numeric fields are patterned after those in COBOL We provide four placeholder characters each with a slightly different effect 9 insert a digit from 0 to 9 in this position if you specify more than one dollar sign you get a floating dollar sign This means that there can be as many numeric positions as there are dollar signs but if some positions are not needed because the value is small the floats to the right next to the first digit and the preceding positions are blank _ if there are enough digits in the value the position is replaced by a numeric digit if not an asterisk is printed Leading asterisks are often used for check writing so that no one can insert a different value z insert a numeric digit at this position if the rest of the data to the left is a zero then a space will be placed at this position For example gt ext a Sedit int field S 99 gt ext b Sedit int field 99 999 99 gt ext c Sedit int field cr99999 99 gt ext d Sedit int field 9999 99 gt ext e Sedit int field 99 gt ext f Sedit int field zz zzz 99 gt list gt xeq gt IN FILE1SD NEIL GREEN 0 gt OUT SNULL 0 11 11 B 00 011 11 CRO0011 11 D 11 11 F 0011 11
257. is printed s you enter changes to it Hisa the edited command is shown you press Return fd is a typo listredo 10 before 5 bef 8 10 redo 5th command in stack redo 8th through 10th b 1s redo last Is command b Is redo Is command D redo last containing before 2 redo command before previous before 5 2 redo by relative lines Modify Operators If you wish to change any characters within the line the modify operators are the regular Control Codes used in Qedit Any printing characters replace the ones above Assuming that you have changed the HP UX default of your EOF key Control D plus spaces deletes columns above Control B puts you into insert before mode Control A starts appending characters at the end of line Control A Control D plus spaces deletes from the end Control T ends Insert Mode allowing movement to a new column Control G recovers the original line Control O specifies overwrite mode needed for spaces Suprtool Open 5 7 Persistent Redo Redo commands can be saved in a permanent file and can therefore be used from another session You can use the Set redo command to specify a filename to save your redo commands Please see the Set Redo command for details Suprtool Open 5 7 Suprlink Commands 305 Do Command DO The Do command will repeat without changes any of the previous 1000 commands DO start stop string ALL
258. k operations You cannot have more Output records than you do Input records but you can have fewer When you do a Link to another file you have an implied selection criterion That is if Suprlink cannot find a record in the Link file with matching key value s the Input record is dropped from the Output file If you have seven Link files the Input record must match all seven or be dropped This is the default selection logic You can override this for any specific Link file by specifying the OPTIONAL keyword on the Link command Only do this is you don t care whether that data exists or not since Suprlink will supply default values for those Link fields You want to produce a report of all invoices over 2 000 00 for customers in California The customer information is in the m_customer table and the invoice information is in the d_invoice table Here are the steps to produce this report e Select and sort the California customers into the file customer e Select and sort invoices over 2 000 into the file invoice Suprtool Open 5 7 e Because their will often be more than one invoice per customer specify the invoice file as input to Suprlink e Link in the customer file e Produce your report from the combined records in the output file gt open oracle demo reader sales database gt select from m_customer select all customers gt if state CA in California gt sort custnum sort and link key gt output custom
259. l struct SuprControl short version short status char command 256 char priority 2 char maxdata 4 char print_state 2 char total_type 2 char other flags 18 short totals 15 9 int out_count workspace 20 void init _st2 SuprControl MyControl Int MyControl gt version MyControl gt status MyControl gt priority 0 MyControl gt priority 1 MyControl gt maxdata 0 MyControl gt print_state 0 MyControl gt print_state 1 MyControl gt total_ type 0 MyControl gt total_type 1 i 0 for i O 1i lt 20 1i MyControl gt workspace i 0 for i 0 i lt 256 i MyControl gt command i void call_suprtool2 SuprControl MyControl suprtool2 MyControl if MyControl gt status 0 printf Call to Suprtool2 has failed with a status of d n MyControl gt status exit 99 void assign_cmd char cmd SuprControl MyControl int i for i 0 i lt cmd_max_len i MyControl gt command i Examples of Calling Suprtool 339 i 0 for i 0 i lt cmd_max_len i MyControl gt command i cmd i void main char cmd 256 struct SuprControl MyControl init_st2 amp MyControl assign_cmd set varsub on amp MyControl call _suprtool2 amp MyControl assign _cmd in infile amp MyControl call _suprtool2 amp MyControl assign _cmd out outfile amp MyControl call _suprtool2 amp MyControl assign _cmd
260. l Open No one can be using Suprtool Open during the installation The installation should only take a few minutes Instructions for Installing If you received a production release tape from Robelle then you can install using the instructions on this web page http www robelle com downloads install soprod html Suprtool Open 5 7 Installing Suprtool 19 Quick Start Guide for Suprtool How to Run Suprtool What is a Task Copying Files Use the following command to access Suprtool opt robelle bin suprtool SUPRTOOL Open Copyright Robelle Solutions Technology Inc 1981 2013 Version 5 6 gt Suprtool prints its version number and the current date and time right after a banner Suprtool then prompts with gt Press Return after typing each command To exit Suprtool type Exit at the Suprtool prompt gt exit Tasks are the building blocks with which Suprtool helps you to solve data processing problems In a task Suprtool reads information from a file or database selects and processes some information and writes out the result You can visualize a Suprtool task like this Input Suprtool Output Records selects and Records processes The examples that follow all consist of Suprtool tasks Simple solutions require only one task Complex solutions consist of several tasks often with the output of one task becoming the input for the next task Copying One File Use the Input command to specif
261. l start on a page break This only occurs when using the File keyword on the list command set list formfeed on in myfile list file myrept xeq in newdata list file myrept append xeq This set List command is the ONLY Set command that does not get reset between each task Lock SET LOCK number This command has no effect in Suprtool Open MakeAbsent SET MakeAbsent On Off This command has no effect in Suprtool Open NLS SET NLS number Initially 0 or NUDATALANG JCW Use Set NLS with files from MPE systems to specify the language to be used for sorting Character type fields see Native Language Support The number Suprtool Commands 201 202 Suprtool Commands corresponds to an NLS language you cannot use the NLS language name The common language numbers are Number bangwage sd C C e C 2 C NumBug SET Numbug On Off The number function had a bug whereby it would add on two zeroes and or bad data if the input number did not have a decimal point We have fixed the bug so that the number function no longer adds the two digits on the end in error However some users worked around this issue by doing the following gt extract target truncate number conv field 100 Since some users used this work around the fix to the number function will then return incorrect results Therefore we added the set numbug command to have Suprtool revert from the correct behaviour to contin
262. lationship has been come to be known as a many to many link Suprlink has traditionally been able to link an Input file with many records with the same key to a Link file that has a single record with the same key value The Join command will link two files with many key records in both the input file and the Linking file The syntax of the Join command is exactly the same as the Link command so a sample task would look as follows Suprtool Open 5 7 Introduction to Suprlink 295 input ordhist join orders output custord xeq The above task will link multiple records of the file ordhist to the multiple records of the file in orders This assumes that the files are sorted by a common key In SQL terms this is known as an Inner Join An Outer Join one where the keys do not necessarily have a match can be achieved by adding the optional keyword to the Join command input ordhist join orders optional output joined xeq In SQL parlance once again you can achieve both a Left Outer Join and Right Outer Join by reversing the order of the files between the input and the join commands To give you an example of how the Join operation would work consider the following data First we have an inventory file with multiple records for the same product no This data is stored in the file dinv 50512001 Rest of data 50512001 Rest of data 50512003 Rest of data The next file will have sales records once again with multi
263. layout of the Output file You would use this file as input to your report program form invcust File invcust SD Version B 00 00 Has Linefeeds Entry Offset CUSTNUM lt lt Sort 1 gt gt DELIVERED 9 PRODUCTNUM 13 PRICE 2 PURCHASED 25 OTY 29 TAX 3 TOTA 35 CITY 39 RATING 5 STATUS 59 FIRSTNAME X10 57 LASTNAME X16 67 STATE X2 83 ADDRESS 2X25 85 ZIPCODE X6 T35 Entry Length 140 Blocking 1 328 Example Suprlink Output Suprtool Open 5 7 Limits Within Suprlink Maximums The various limitations of Suprlink are described here In general you need to reduce the number or sizes of fields if you encounter any of these limits Input File Maximum Record Size 2048 Words We recommend that you use Suprtool s Extract command to minimize the input record size Input File Maximum Block Size 4096 Words By default Suprtool restricts the maximum block size to 2 048 words You can use the Set Blocksize command to increase this size up to 8192 words If you increase the maximum block size it is likely that Suprtool will produce an output file that Suprlink cannot read Input File Maximum Fields 512 Suprlink restricts the number of fields per file to be 512 If you must have more fields use Suprtool s Define and Extract commands to extract several fields as one contiguous series of bytes Link File Maximum Record Size 2048 Words As with the input file you should use Suprtool s Extract
264. ld after the function has transformed the field For example the following task may not give you the result you expect gt base store 5 gt get d sales gt def cust accountx 1 6 byte gt ext cust accountx Sedit cust accout zzzz99 gt sort cust accountx sorting on transformed field before it has value from function gt dup none keys gt output dsales gt exit In this instance you will not be sorting on cust accountx as transformed by the edit function but rather the first six bytes of d sales Therefore it is important to note when you are using extract to transform a field you will not be sorting on that transformed value Therefore the way to do the transformation would be to either divide into two tasks or if you can logically sort on the field before the transformation in order to achieve the result so the task could be gt base store 5 gt get d sales gt def cust accountx 1 6 byte gt ext cust accountx Sedit cust accout zzzz99 gt sort cust account Note sorting on source field gt dup none keys gt output dsales gt exit or if two tasks are necessary gt base store 5 gt get d sales gt def cust accountx 1 6 byte gt ext cust accountx Sedit cust accout zzzz99 gt output tempsales gt xeq gt in tempsales gt sort cust acctx gt dup none keys gt output dsales gt exit Suprtool Commands 211 Table Command TA 212 Suprtool Commands Builds a table of val
265. le Clean 9 410 This will tell Suprtool to replace the tab character Decimal 9 Line Feed Decimal 10 and a period to whatever the Clean character is set to The CLean command takes both decimal notation and the character itself however it is probably most convenient to use the Decimal notation for the characters that you wish to clean The Decimal notation is indicated by the character Setting the Clean Character By default Suprtool will replace any of the characters specified in the clean command with a space You can specify what character to use to replace any of the characters that qualify with the following set command gt set CleanChar This will set the character to replace any of the qualifying to be cleaned characters to be a period Cleaning a Field You call the clean function the same way you normally use other functions available to if and extract For example ext addressl Sclean address1 The above shows how to clean the field address You do not necessarily need to have the target field be the same as the source field Suprtool Commands 119 def new address 1 30 ext new address clean address1 Cleaning your data An example of how easy it would be to clean your database of certain bad characters in byte type fields would be as follows gt base mydb 1 gt get customer gt clean 9 410 40 7 gt set cleanchar gt update gt ext address 1 Sclean
266. le To see this list of keywords type help with no parameters You see a short introduction to STExport and then a list of keywords You can specify any of these keywords on the Help command You can also specify a subkeyword Shelp intro input input section of Introduction Quick Help HQ HQ asks STExport to look under the keyword Quick in the help file Quick contains the text from the STExport Quick Reference Guide offering the experienced user a quick review of the syntax of any command hq input quick description of Input Notes If no parameters are specified Help allows you to browse through the help file opt robelle help stexport The Help command uses the Qhelp subsystem from the QLIB For help in help type when you see the Qhelp prompt character The help file is organized into levels To go back to the previous level press Return Press F8 to exit the Qhelp subsystem and return to STExport Suprtool Open 5 6 User Manual STExport Commands 255 HTML Command HT 256 STExport Commands Use HTML to produce Web pages for either Internet or Intranet applications HTML NONE PREFORMATTED TABLE TITLE string HEADING string Default None Web applications expect data in a special format called the Hypertext Markup Language HTML Use the HTML option to request that STExport format the input file into HTML format Example Maximum Size of HTML Files Web browsers often cannot process la
267. le invcust keep size numrecs include amp gt custnum invdate amount invnum amp gt name address gt set input limit 0 gt go Suprtool Open 5 7 Suprlink Commands General Notes Suprtool Open 5 7 When you run Suprlink it prompts for commands on stdlist with a character and reads command lines from stdin Suprlink commands contain a command name followed by one or more parameters and are patterned after the same commands in Suprtool In this chapter we describe the Suprlink commands in alphabetic order Following each command name in brackets is the minimal abbreviation for the command For example I for Input and L for Link Abbreviating You may shorten the command name to the first letter of the command name v verify x xeq Uppercase or Lowercase You may enter the letters in either uppercase or lowercase because Suprlink upshifts everything in the command line except literal strings within quotes abc These two commands are identical EXIT exit Continuation The maximum physical command line is 256 characters You may enter commands on multiple input lines by putting an amp continuation character at the end of the line The maximum total command length is 256 characters The most common reason for continuing commands is to specify a lengthy Link command with secondary keys Suprlink Commands 301 input students link majors by ssn cmaj from amp ssn curmajor ou
268. le logical Entry Length 44 Blocking B 00 00 Link Output Option These self describing files contain information about how the file was sorted Compound fields are handled correctly so the Form command shows compound fields just as you would see them in IMAGE The Item command in Suprtool identifies the date format or the number of decimal places of an item The Link output option saves the date and decimal attributes as part of the field description form custfile File datafile SD Version B 00 00 Has Linefeeds Entry Offset CHARACTER X5 1 lt lt Sort 1 gt gt REPEATINT 312 6 compound field DATE J2 lt lt YYYYMMDD gt gt DOLLAR P6 lt lt 2 gt gt Entry Length 16 Blocking 252 STExport Commands Suprtool Open 5 6 User Manual Heading Command HEA Suprtool Open 5 6 User Manual Specify a heading if any that appears as the first record of the output file HEADING NONE FIELDNAMES string ADD string COLUMN string Default None When importing data into other applications the first line of the import file is often treated as field names or headings Use the Heading command to specify what STExport should write as the first line of the output file Field Names If you specify Heading Fieldnames STExport creates a default heading This heading is constructed by using the field name of each field in the input file The Fieldname option uses the formatting options that apply to byte type fields
269. les a self describing file product no first field in the range product price purch date sales qty last field in the range dsales Extracting a Range of Subscripted Fields Suprtool accepts a subscript on either field in a range You can even use this feature to extract a range from a single field For example if sales_amt is a 12J2 field Suprtool Open 5 7 gt in sales a self describing file gt ext sales amt 4 sales_amt 6 gt out dsales gt xeq is equivalent to gt in sales a self describing file gt ext sales amt 4 first subscripted field gt ext sales amt 5 intermediate subfield gt ext sales amt 6 last subscripted field gt out dsales gt xeq Alternate Syntax for Extracting a Range Suprtool accepts a slash in place of the backslash to specify a range Use the slash with care because it is a valid character in field names For example gt extract a b would produce the error message Error Field A B does not exist To use a slash in an extract range surround it with spaces gt extract a b Numeric Expressions You can specify arithmetic expressions for any numeric data type in the Extract command Arithmetic expressions involve the operators and mod Extract arithmetic expressions work exactly as If command arithmetic expressions To extract an expression use this syntax EXTRACT target field expression Target Field The target fiel
270. les qty is gt greater than 100 gt chain d sales cust account 1234 gt if sales qty gt 100 gt out out5 gt xeq Notes The Chain command is intended to replace a Get and If combination where the primary selection is by key value In many cases it is still faster to use the Get command to read the entire dataset than it is to use the Chain command to use search paths Use Set Stat On to compare the performance of the Chain and Get commands The Chain command always reads the chain values in sorted order by ascending search value You do not need to specify a Sort command to have the output file sorted by the search field 88 Suprtool Commands Suprtool Open 5 7 Clean Command CL Specifies what characters to clean when using the Clean function CLEAN SPECIAL lt string gt lt range gt Default None Suprtool will clean or replace all of the characters specified in the Clean command from a byte type field when invoked by the Clean function To define what characters that need to be replaced you use the clean command with the character you want to clean in quotes Since most of the characters that you will need to clean are unprintable you can enter the decimal equivalent of the character This is denoted by entering the character in quotes preceding the decimal number of the character you wish to clean An example of how easy it would be to clean your database of certain bad characters in byte typ
271. link STExport Data Export Utility STExport converts fields in a self describing input file into an output file that can be imported into different applications Use STExport to produce a formatted output file that can be used to import data into databases and applications Other databases have different requirements for the format of input data You will have to experiment with the various STExport formatting options to find a format that your particular database tool accepts Suprlink Multidataset Access Suprlink is a program that works with Suprtool to add multidataset capability to Suprtool Suprlink is not a set of callable routines To run Suprlink you can run as a Welcome to Suprtool 15 Documentation Notation 16 Welcome to Suprtool separate program as opt robelle bin suprlink or suprlink provided you have the correct PATH settings Rather than take the regular path to multiple datasets random retrieval via Eloquence keys we have chosen to follow a different path fast serial extracts plus a very efficient merge To understand what Suprlink does think of the process of writing a report Your report program written in COBOL RPG PowerHouse or some other language hunts all over the database with DBFIND and DBGET to collect your data It would be faster if the report program could just read a sorted disc file with a big record containing all the data necessary for the report and this is Suprlink
272. llowing Suprtool commands format the unit cost with two decimal points We specify the Rightjustnum keyword because numbers with decimal points are hard to read if they are left justified Listing Record Numbers The Norec keyword prevents the printing of the input and output record numbers The input record numbers are not printed if Output xxx Data is used and the file is sorted Suprtool Open 5 7 Listing One Field per Line Suprtool normally attempts to list more than one field on every line of list output The Oneperline keyword causes every field to be shown on a different line Listing without Field Names Noname When Suprtool knows the record structure of the output file it shows the name of each output field The Noname keyword causes the field names to be suppressed By only extracting a few fields it is possible to fit the listed output for each record on one line Suppressing Blank Lines Between Records By default Suprtool prints a blank line between each record The Noskip keyword removes this blank line If you combine the Noskip Norec Noname and Title options when extracting a few fields Suprtool can produce a simple report Numeric Justification Leftjustnum and Rightjustnum The List command normally left justifies all numeric fields Specifying List Standard causes all numeric fields to be right justified unless you override the default with the Leftjustnum keyword Use the Leftjustnum or Rightjustnum
273. llows longer field names SD files only store the first 16 characters of a field name unless SDExtName is on Suprtool Open 5 7 Suprtool Issues and Solutions 49 gt input sales data reclen 16 nolf input from a data file gt define cust_no 1 6 byte gt define invoice date 7 6 integer gt define sales _qty 13 4 packed gt extract cust_no invoice date sales qty gt output salefile link salefile has all of the extracted columns gt xeq SD Files as Input When you specify an SD file as input to Suprtool all the field information becomes available You can select extract and total fields without the Define command In addition the Input command no longer needs any Reclen or LF parameters gt input salefile self_describing file gt form display the fields in the file gt if sales total gt 10000 select based on a field gt extract cust _ account only extract a few fields gt extract sales qty gt extract sales tax gt extract sales total gt total sales total total a field from the file gt output newfile link create a new SD file gt xeq Listing SD Files Suprtool normally lists data files in an Octal Char format When listing an SD file Suprtool produces a formatted listing with field names and field values converted into ASCII gt input salefile self describing file gt list produce a formatted listing gt xeq Decimal Places and Date Formats You use the Item command to identif
274. lock size of a file is the record length multiplied by the blocking factor MPE permits block sizes up to 32 000 words but Suprtool restricts the total block size When copying an MPE file the maximum block size of either the input or output file is 14 336 words If Suprtool detects an input or output file with a block size larger than 14 336 words it prints one of the following error message The input blocksize is greater than 14336 words The output blocksize is greater than 14336 words Calculator Suprtool Suprlink and Stexport treat any line that begins with an equal sign as an expression to be evaluated To add two numbers together Suprtool Open 5 7 Suprtool Open 5 7 gt 125 512 Result 637 0 An expression consists of numbers and operators The operators can be addition subtraction multiplication division or exponentiation The value of the expression is printed immediately Any number can be followed by a percent sign The calculator assumes that you want to qualify the number as a percentage For example gt 125 5 Result 6 25 A complete description of the Suprtool calculator is given after the description of the Xeq command Control Character You create a control character by holding down the Control key while you strike another key Y plus Control generates Control Y These are normally nonprinting characters but they may do things to your terminal For example Con
275. lumn whereas a floating sign always appears before the first digit of a number For example Sign Leading Sign Floating 22415 22415 207 207 16600 16600 21910 21910 8411 8411 42 42 16713 16713 7970 7970 Trailing Sign Specify Sign Trailing to cause the sign character to appear after each formatted number Remember that for many numeric types the sign for positive numbers is a space STExport always leaves room for the sign even if it is a space 274 STExport Commands Suprtool Open 5 6 User Manual Spaces Command SP Specify whether trailing spaces are to appear in byte type fields SPACES NONE TRAILING Default None If byte type fields are surrounded with quotes see the Quote command the Spaces command determines whether trailing spaces in byte type fields appear within the quotes Use Spaces Trailing if you want to retain all of the spaces in a byte type field Software packages that store variable length character data treat trailing spaces as data Use Spaces None to remove trailing spaces for data that is imported into these applications Suprtool Open 5 6 User Manual STExport Commands 275 Use Command U Specifies a file of commands to be executed as a group USE Q filename Examples A usefile makes your task easier by allowing common commands to be specified once in an external file For example the following usefile contains all the commands for creating the Invcust file Suse
276. m block size input file maximum fields ves input file maximum record length 271 313 input FICS ee cece eecceeceecesceteeeceeceecaceseeeeeeseeseeneees 277 354 Index input key fields eee eeeseeeeeeeereeeeeeeeeeeeee input from Stdlist input line feeds eee ceseeteeteeseeseeeceseeseeeeeeeeeeeeees installation HPUX 00 ccceccccccccesscceesecessecesseeceeseees 17 installing STExport 215 installing Suprlink 1 273 Interactive Sets cach aie hin eek eS 183 terr oeieo neno eSEE S 222 286 Introduction ssni E AA ika 13 introduction to STExport 219 introduction to Suprlink eee eeeeceeeneteceeeeeees 277 invalid dates cccecccceeseceesecesseeeeseeceeseees 56 134 228 ISO 8859 1 characters HTML output 241 Jtem COMMANA ceeeececesseeseceseeeneeesees 142 182 205 J Join command o ee cee eeteseee cece teseeeneeeteenes Join command example si jomi key fel dS ivcviten ah eve lated aia Julian dates sss ceisessessstsadetvees cabsastencattabenscassvourseucesetes Julian day number JulianDay data format 0 eee eeeeteneeeeeeeeeeee K Key command o cee eeececceseesceeeceeceeceseeseeseeseeneeneens 148 key fields input file eect eresse 248 295 key fields join file 1 296 key fields link file 1298 Key option 162 KSAM files 0 00 140 KSAM order Of SOPt c cccccecessecsecsseeesecssee
277. major sort field KEY byteposition bytelen type DESC Default type BYTE ASCENDING order Parameters Desc specifies that the field is to be sorted in Descending order The byteposition is a number between and the length of the input records specifying where the sort field begins The byte en parameter is a number from 1 to the length of the record specifying how long the sort field is The type is a word that gives the desired data type of the field for sorting purposes Type Description BYTE unsigned straight compare INT INTEGER two s complement DOUBLE two s complement IEEE IEEE floating point PACKED packed decimal PACKED packed decimal last nibble unused DISPLAY zoned decimal numeric field LOGICAL unsigned like BYTE 2 characters CHARACTER for Native Language Support The Key command also accepts FPOINT as the data type for IEEE numbers Examples The first example sorts an integer PIC S9 4 COMP field which starts on the 11th byte of the input record We sort the entire input file based on one key gt input bigfile r 40 1f input from a disc file gt key 11 2 int key is an integer that starts gt output outfile at the 11th byte of Bigfile gt xeg create Outfile and prompt for more Suprtool commands gt input discfile r 40 1f another input file gt key 14 4 double desc double integer PIC S9 9 COMP gt output ofile2 sort input in descending order gt exit Th
278. mands Suprtool Open 5 7 Suprtool Open 5 7 comparisons with them lt lt gt and gt although you may still compare for strict equality or inequality The following examples will be rejected by Suprtool gt item trans date date ddmmyy gt if trans date gt date 1 first and amp trans date lt date 1 last Error Invalid date format for the comparison gt input myfile reclen 80 nolf gt define mydate 1 6 gt item mydate date ddmmyy e g 301100 gt define gt if mydate gt S date 00 11 01 Error Invalid date format for the comparison gt if mydate gt S date 01 11 00 Error Invalid date Year 1 Month 11 Day 00 If the date format does not allow the specification of a certain day such as yymm ccyymm yyyymm aamm ccyy and mmyyyy then you do not need to specify the entire date format although Suprtool will allow either format for date gt item trans_month date yymm gt item purch_ date date yymm gt if trans_month lt date and amp purch_ date gt S date 00 01 Because dates beyond 1999 in the yymmdd and yymm date types do not collate correctly relative comparisons are no longer valid Suprtool produces an error in the following case gt item trans date date yymmdd gt if trans date gt date 2004 01 01 Error Cannot use a date beyond 1999 for this date format You can override this setting by entering the Set Date Ifyy2000error comm
279. me file names are hardcoded into Suprtool This section describes the hardcoded file names that Suprtool Open may need Suprtool will normally look for files in the opt robelle directory unless you set the ROBELLE variable ROBELLE Variable Normally Suprtool looks files in the opt robelle directory If you move Suprtool you must set the ROBELLE variable export ROBELLE users robelle opt robelle suprmgr This is an optional file that is designed to contain configuration commands You cannot change this file name If you move Suprtool Open to a different directory you must set the ROBELLE variable so Suprtool may find this file For example if you move Suprtool to the users robelle directory you must set the ROBELLE variable in the following manner export ROBELLE users robelle You can then put your suprmegr file in the users robelle directory Outcount File If you want to automatically check the number of output records that Suprtool produced you must produce an outcount file This file contains a string with the number of output records that Suprtool processed By default no outcount file is produced If you invoke Suprtool Open with the oc option Suprtool writes the number of output records to a file called stoutcount Use Set Filename Outcount to specify your own file name for the output count If you add Set Filename Outcount to the Suprmgr file every successful invocation of Suprtool Open produces a file
280. ming that cust account is a search field in the d sales dataset you would use this gt base store 5 READER open for read access only gt chain d sales cust account 1234 read the sales records for customer 1234 gt out outl gt xeq If you want to select sales records for more than one customer you would use gt chain d sales cust account 12345 67890 39201 gt out out2 gt xeq Values with Decimal Places You can specify values with decimal places for search fields with implied decimal places For example gt item unit cost decimal 2 two implied decimal points gt chain d inventory unit cost 10 10 5 10 75 gt out out3 select records for 1000 1050 and 1075 gt xeg Selection with a Table You can specify the records to read using a table The Table command may appear before or after the Chain command Use this option when you have a file of key values to search for gt select the sales records that match the values in custfile gt chain d sales cust account sales table gt table sales table cust account file custfile gt out out4 gt xeq Combining Chain with If The Chain command selects an input dataset and a set of key values to search for To specify additional selection criteria use the Chain command to specify the key values and the If command for the additional selection criteria Suprtool Open 5 7 Suprtool Commands 87 gt select records for customer 1234 where the sa
281. mport program For example if the import program thinks that the delimiter character is a comma the importer may treat a comma in an address field as an indication to move to the next field which will throw of the import Some import programs will treat the next character as data as opposed to a delimeter if the character is preceded by an escape character such as a slash Thus when the field is analyzed by STExport the data that originally started as Niagara Falls Ontario Canada would be transformed to be Niagara Falls Ontario Canada This function will not work on fixed columns and can be invoked with the escape command escape delimeter quote eol The above command will take the defined delimeter quote and Eol and escape with a if found in any byte type field Suprtool Open 5 6 User Manual Exit Command E Exit STExport in one of three ways By default perform the current task if any then leave STExport Users are often frustrated when they exit STExport after specifying part of a task and STExport starts processing the task To avoid this situation use the Abort or Suspend options to exit STExport conveniently without executing the current task EXIT ABORT SUSPEND XEQ Default Xeq Typing Exit with no parameters means Exit Xeq STExport recognizes special command names which specify both the Exit command and an exit option e g ES means Exit Suspend Exit Abort EA Cancels the curr
282. ms Reducing File Sizes Suppose that the d sales dataset contains 100 000 entries but you use the If command to select 15 of the entries We would specify 15 as the percentage on the Numrecs command to reduce the size of the sort scratch file and the output file gt get d sales specify input gt numrecs 15 specify 15000 as file size gt if sales qty lt 100 select a subset of d sales gt sort cust account sort using the dataset path gt output out2 output file will have room for gt xeg 15000 records Disc Files vs Datasets When you specify a source of records using the Input command as opposed to reading a dataset using the Get or Chain command Suprtool attempts to duplicate all of the input file s attributes in the output file This includes the file limit For this reason the Numrecs value is ignored if the output file limit is smaller than the input file limit Numrecs is still useful when reading disc files to reduce the size of the sort scratch file 174 Suprtool Commands Suprtool Open 5 7 Open Command OP Specify an SQL database to open Only one database can be open at a time OPEN ORACLE username password remotedb instance OPEN ALLBASE dbename owner Oracle Database Use the Open command to connect to an Oracle database You must specify your Oracle username and password If you do not specify the password in the Open command Suprtool prompts for your password without echoing it on the scre
283. n 5 1 33333333333 5 20 raised to the 15th power 327680000000E 20 Order of Evaluation Unlike most programming languages the calculator always evaluates the calculation from left to right This is similar to an electronic calculator where each keystroke is operated on immediately You can use parentheses to force the calculator to evaluate the expression in a different order 14 16 15 3 compute an average Result 15 0 14 16 15 3 add 14 16 and the result of 15 3 Result 35 0 14 16 15 3 add 16 15 divide by 3 then add to 14 Result 24 3333333333 Percentages A number in the calculator expression may be followed by a percent sign The calculator assumes that you want to qualify the number as a percentage 125 5 what is 5 of 125 Result 6 25 125 125 5 add 5 of 125 to 125 Result 12 5 125 125 5 oops we needed to change the order Result 131 25 this looks like the answer we wanted The last two examples show the importance of the order in which calculator evaluates the expression We needed to use parentheses to force calculator to evaluate our expression in the correct order Display Formats A calculator expression may be followed by a comma and a display letter The default is decimal and the options are hex or H octal or O double D ASCII A and binary B With these options the result is treated as a 32 bit integer Suprtool Open 5 7
284. n Up to 20 Sort and Key commands can be specified per extract task The first key entered is the major sort key SORT field subscript DESCENDING Default Ascending order Field The field specified must be an Eloquence data item that is a field of the input source a selected item from the selected table or a defined field or a field from a self describing file Subscript If the field is a compound item e g 2X25 the first sub item is the default if no subscript is specified You can sort on any sub item by specifying the subscript For example gt sort address 2 sorts on 2nd sub item Descending vs Ascending Order By default sorts are done in ascending order Descending specifies that the field is to be sorted in descending order Examples The most common use of the Sort command is to specify a sort field of a database field You may use the Key command to specify all sorts We recommend that the Sort command be used wherever possible If the structure of your database changes your Suprtool tasks still work if sort fields are specified with the Sort command gt open oracle demo reader gt select from sales input from a table gt sort account primary sort field gt sort purchased desc newest transactions first gt output dsales write the sorted records to a disc file gt exit In the next example we sort a disc file We create a field using the Define command Rather than using the Key
285. n Suprtool Open SQUEEZE ON OFF has no effect in Suprtool Open STATISTICS ON OFF SUBSYSTEM ONJ OFF has no effect in Suprtool Open SUSPEND ONJOFF has no effect in Suprtool Open THOUSANDSYMBOL lt string gt USERLABELS ONJ OFF has no effect in Suprtool Open VARSUB ON OFF VARSUBCOMPAT ON OFF VARSUBDEBUG ON OFF WARNINGS ON OFF Each option is its own Set command That is you cannot specify multiple options in the same command Instead use multiple Set commands For example to Set Statistics On and to define a PCL format for the List command you would specify two Set commands gt set stat on gt set list pcl 1 or Suprtool Open 5 7 Add system wide Set commands to the opt robelle suprmgr configuration file Suprtool Open 5 7 gt set stat on set list pcl 1 When Suprtool starts running all the options are set to initial factory settings The Suprmgr file may contain Set commands to override the initial values Set commands remain set until the end of the Suprtool run or until changed by another Set command Some commands have optional parameters e g the numeric value of Set Date Cutoff If the command is specified without a value the default that Suprtool uses may be different from the program s initial value When that is the case the command description will show the initial value and the default when omitted value Allbase SET ALLBASE ROWS number Initially 100 If you open an Allbase dat
286. n the final output file An example would be a Timestamp field that occurs in every SQL table Workaround use the Extract command from Suprtool to take out only the fields you want or to rename duplicate fields You can verify the format of the Output file using the Form command It shows the field names length and structure in order From this display you can generate an appropriate COPYLIB or QSCHEMA definition Quiz Subfiles The Erase option is provided for Quiz users who create an empty subfile using QTP or Quiz before running Suprtool and Suprlink See the Suprlink with Quiz QTP section for details Since Suprlink cannot currently write to NM Ksam files you cannot directly write to PowerHouse indexed subfiles You can use Suprtool to load file to the Indexed KSAM file Suprlink Commands 317 Redo Command REDO Enables you to modify and repeat any of the previous 1000 command lines REDO start stop string ALL Default redo the previous command The Redo command allows you to modify the commands before it executes them If you don t need to change them use the Do command Commands are numbered sequentially from as entered and the last 1000 are retained Use the Listredo command to display the previous commands You can redo a single command a range of commands or the most recent command whose name matches a string The Redo command uses MPE style editing logic D I R U and gt The default mod
287. n the output file The advantage of the None option is that it formats all dates whether they are valid or not If you select a date format the default Invalid option replaces invalid dates with asterisks nn STExport must know which fields are dates and the format of each date Use Suprtool s Item command and Output Link option to specify the date information Date Format The date format can be one of ccyymmdd yyyymmdd ddmmyyyy mmddyyyy yymmdd ddmmyy mmddyy aammdd STExport converts each date field from its internal date format into the format that you specify Separator Character By default STExport formats all dates without a separator between the day month and year Specify your own separator by enclosing it inside quotes after you specify the date format The separator must be one character long For example to specify dates in ddmmyyyy format with a slash separator use Sdate ddmmyyyy To specify dates in yymmdd format with a dash separator use date yymmdd Oracle Dates Oracle dates contain both the date and the time STExport formats the date but not the time If you specify Date None Oracle dates will be treated as byte type fields Since Oracle dates actually contain binary data the output is often unusable by other applications unless you specify a specific date format STExport Commands 243 244 STExport Commands Invalid Dates By default all invalid dates are formatted as asteri
288. n to Outfile Selection by Record Number The startrecord endrecord parameter specifies a range of input records by record number The default value for endrecord is the highest record in the file The first record number is 0 for disc files Suprtool Commands 155 The startrecord endrecord parameter must come after the reclen and LF NOLF parameters if it is present You can check your record selections with the Verify command When debugging software it is convenient to scan the first few records of a file The startrecord endrecord parameter makes it easy to scan these records gt input invent r 80 nolf 0 19 first twenty records gt list produce a list of each record gt xeq in OCTAL CHAR format Random Selection The count parameter specifies that every nth record in the input file should be selected This option is designed for random sampling of the input file The startrecord endrecord parameter cannot be used with this parameter Like startrecord endrecord count must come after the setname if present Test files can be constructed from random samplings of production files We can build a test file with the count parameter gt input dinvent 15 every 15th record is read gt output dtest create an output file with every gt xeg 15th record from Dinvent Notes Only one Input Chain Get or Select command is allowed per extract task The Input command opens the specifi
289. name is not qualified the redo stack is created in the current working directory This may be desirable if you wish to have separate stacks If you wish to always use the same persistent stacks you should qualify the name The Verify command shows which stack is currently in use If it shows lt temporary gt it means Suprtool is using the default stack Anything else is the name of the file used on the Set Redo command Concurrency When Suprtool uses the default temporary stack it is only accessible to that particular instance of Suprtool You can run as many Suprtool instances as you need and each one gets its own redo stack With temporary stacks you will never get into concurrency problems If you start using a persistent redo stack you might start running into concurrency problems A persistent redo stack can only be used by one Suprtool instance at any one point in time If you try to use a persistent redo stack that is already in use you will get the following message gt set redo myredo The redo file is already in use Unable to open file for REDO stack In this situation Suprtool continues to use the redo stack active at the time and lets you continue to work as normal Qedit can also have permanent redo stacks To prevent products from writing to each other s redo stack it is advisable to have separate stacks for each product by giving them different file names For example if you use gt set redo myredo you will h
290. nd to indicate the decimal place in numbers with a period Outside North America the custom is to indicate the decimal place with a comma If the decimal place indicator is incorrect it is harder to import files into other applications The Decimal command does not apply to floating point fields Suprtool Open 5 6 User Manual STExport Commands 245 Delimiter Command DE 246 STExport Commands Specify a delimiter if any that appears between each field in the output record DELIMITER NONE COMMA TAB SPACE string Default Comma Use Delimiter Comma to create an output file in comma delimited format this is common for PC database applications Use Delimiter Tab to tell STExport to insert the tab character between fields instead of a comma If you have selected Columns Fixed you will likely want to remove the delimiter by specifying Delimiter None If you want some white space between fixed length columns specify Delimiter Space instead String Parameter You can put anything inside quote characters to specify your own Delimiter For example Delimiter would insert a space a comma and another space between each field in the output record You can use either single or double quote characters to specify the delimiter e g Delimiter and Delimiter are the same The maximum length of the delimiter string is three characters Suprtool Open 5 6 User Manual Do Command DO The Do comman
291. nd can therefore be used from another session You can use the Set redo command to specify a filename to save your redo commands Please see the Set Redo command for details 316 Suprlink Commands Suprtool Open 5 7 Output Command O Suprtool Open 5 7 Specify the name of the output file OUTPUT filename ERASE DATA LINK By default the name of the output file is Output The output file is a self describing file containing data extracted from the input file and the Link files Use the Data option to make the output file a standard disc file without a corresponding sd file There are two different types of self describing files The first type is created with Suprtool s Output Query option A superior form of self describing file is produced with Suprtool s Output Link option Suprlink creates the output self describing file in the same format as the input file We recommend that you use the same type of self describing file for all input and link files Output Record Format The record structure is determined by Suprlink but is relatively easy to anticipate Suprlink starts with all of the fields of the input file in order For each Link file it appends the fields of the Link file to the Output record in order Suprlink drops the key fields from the Link records since they always contain duplicated data If a field name other than one of the two explicit keys is duplicated in several datasets it will end up duplicated i
292. nd is different from the input database Resetting the Chain Get or Input command resets everything except the Base Define and Table commands Resetting the Table command resets everything except the Base and Define commands Resetting either the Define or Item command resets both Define and Item settings Suprtool Open 5 7 Suprtool Commands 187 Select Command SEL 188 Suprtool Commands Specify a select statement for the currently open SQL database The select command supports all of the features of the select command of the open SQL database Only one select command can be specified at a time SELECT select command Allbase sorts data gt select from user account emp order by ename Suprtool sorts data gt select from user account emp gt sort ename The select command can contain any expression or clause that is supported by the SQL database Some features e g ORDER BY may be done faster by Suprtool e g the Sort command Some Select commands can exceed the 256 character command line limitation The Select command however can be considerably larger if you use the read feature of the Select command This feature is similar to the If command read feature and is invoked by entering the Select command on a line by itself unlike If you do not specify read explicitly gt select ename salary tax_paid from scott employee order by ename gt The Suprtool prompt changes from gt to
293. nds once per date field not once per task Select by Today s Date For this example select all the sales records whose purchase date is today Note the use of today in the If command to indicate today s date gt input saledata reclen 70 nolf gt define purch date 11 8 gt item purch_date date yyyymmdd gt if purch date today select today s date gt output result gt xeq Other tricks with today gt if purch date today 1 yesterday gt if purch date today 1 tomorrow Select by Particular Date To specify a particular date use the date function in the If command The date function has the form date vear month day This example selects all the sales transactions for August 12 2000 gt input saledata reclen 70 nolf gt define purch date 11 8 gt item purch_date date yyyymmdd gt if purch_date date 2000 08 12 gt output result gt xeq Select by Year Suppose we want to select all the sales transactions for 2000 Suprtool does not have a shorthand for specifying everything in that year To specify an entire year use a date range from January 1st to December 31st gt input saledata reclen 70 nolf gt define purch date 11 8 gt item purch_date date yyyymmdd Sif purch_date gt date 2000 01 01 and amp purch_date lt date 2000 12 31 gt output result gt xeq Select Prior Month In the date function use a to indicate the current year month or day
294. ne I do by relative line number 5 do command lines 5 to last 0 gt d gt d gt d gt d gt d gt d 000000080 0 Notes The Do command can be abbreviated to as in MPEX You cannot use to combine commands on the same line 98 Suprtool Commands Suprtool Open 5 7 Duplicate Command DU Suprtool Open 5 7 By default Suprtool copies all selected input records to the output file The Duplicate command determines what to do with duplicate output records Duplicate records can be discarded producing an output file without duplicates Alternatively you may be interested in seeing the duplicate records so you can create an output file consisting solely of the duplicate records When deciding whether an output record is a duplicate Suprtool either compares the keys only or the entire output record DUPLICATE NONE ONLY RECORD KEYS num COUNT TOTAL None The None option removes duplicate records from the output file Suprtool compares each output record with the previous output record If they are not the same the record is added to the output file This option corresponds to the former Nodup and Nodupkey options of the Output command gt key 1 4 gt duplicate none keys Input Output FITI 1111 10 2222 2222 25 2222 3333 48 3333 Only The Only option is the exact opposite of None Only selects all output records that would not be written by the None option When the
295. ne ccmdstring You can specify commands by using the c option followed by the actual commands There must be no space between the c and the command list If there is a space within the command the whole command must be enclosed in single or double quotation marks otherwise the quotation marks are optional Here are some examples suprtool c use usefile suprtool c set prompt Default Outcount File Name oc If you want to know how many records Suprtool has processed use the oc option This option sets the file name for outcount to stoutcount After a successful task Suprtool writes the number of output records to the stoutcount file You can then use this file in shell scripts to check for specific record counts For example suppose that you want to check for at least ten records from an Oracle database You would write a shell script like Running Suprtool 41 bin sh Select records from an Oracle table and check that there are at least ten suprtool oc lt lt EOD open oracle scott tiger select from emp if sal gt 1000 00 output dev null exit EOD if cat stoutcount ge 10 then echo More than 10 records found fi Exit with Verify v Some users inadvertently Exit from Suprtool by entering the Exit command instead of Xeq To prompt for Exit approval use the v option suprtool v gt e Okay to exit no gt Combining c and v You can combine bot
296. ne then the century is 19 and if the first digit is a 2 two then the century is 20 Only data types of P8 and J2 are supported for this date attribute This date format is used by some third party software packages such as MACS and APS EDSDATE The EDSDATE date format is similar to the yyymmdd format in which the first digit represents the century The first digit in the EDSDATE is either 0 or 1 a 0 represents a century of 19 and a 1 represents a century of 20 JulianDay The JulianDay number is the absolute count of the days that have elapsed since January 1 4713 BC on the Julian calendar Typically Julian Day numbers refer to an integer number corresponding to whole days while the Julian Date may mean an integer plus a decimal value that resolves the Julian count to precise parts of a day Suprtool supports the JulianDay number and does not attempt to support an hour or point in the day aammdd and Related Date Formats The aammdd attribute is similar to yymmdd except the aa portion of the date uses a combination of letters and numbers in order to represent dates beyond 1999 The aammdd date format was developed by James Overman of HP for use in their MM3000 product This format is available only for X6 data type Suprtool Commands 159 160 Suprtool Commands By substituting a letter of the alphabet in the first position of the year we can extend a six digit date and also ensure that the dates collate correctl
297. ne m 1 2 packed s9 3 COMP 3 P4 in IMAGE 2 bytes 4 nibbles last is sign digit gt define n 1 2 packed s9 2 COMP 3 P4 in IMAGE 2 bytes 4 nibbles last digit is unused gt define p 1 6 packed s9 11 COMP 3 P12 in IMAGE 6 bytes 3 words 11 digits Data Type Warning The Define command accepts field definitions of any combination of byte length and data type However many combinations have limited usefulness in Suprtool In these cases Suprtool prints a warning For example gt def field 1 1 integer Warning Length of 1 is of limited use for the data type INTEGER Examples The following examples show the various data types and combinations that are available with the Define command a 11 4 double J2 or 12 S9 9 COMP b 21 2 int J1 or I1 S9 4 COMP e 21 8 character string f address 5 fifth occurrence of address g address 5 3 4 relative offset h address 5 4 2 byte middle of the address i x 6 4 starts at sixth byte of X j invoice 6 byte redefine field as Byte Absolute Example The following example shows the most basic use of the Define command to create a new field definition at an absolute location in the input record amt is an integer that starts at the 11th byte of file gt def amt 11 2 int gt if amt gt 1000 amt is now a field we can select on gt output outfile Absolute Example with Subcount IMAGE and Suprtool allow fields to be repeated In the next example w
298. ng ISO 8859 1 Sxml file Orders record Details Sout myfile An example of the output generated by the above commands is as follows lt xml version 1 0 encoding ISO 8859 1 gt lt Orders gt lt Details gt lt CITY gt Los Altos lt CITY gt lt CREDIT RATING gt 100000 lt CREDIT RATING gt lt CUST ACCOUNT gt 4003302 lt CUST ACCOUNT gt lt CUST STATUS gt 20 lt CUST STATUS gt lt NAME FIRST gt Ralph lt NAME FIRST gt lt NAME LAST gt Perkins lt NAME LAST gt lt STATE CODE gt CA lt STATE CODE gt lt STREET ADDRESS gt Room 655 lt STREET ADDRESS gt lt STREET ADDRESS gt Los Altos 040033022 lt STREET ADDRESS gt lt ZIP CODE gt 93002 lt ZIP CODE gt lt Details gt lt Orders gt Tags In XML the tags that surrounded the data can not have any special characters other than hyphen underscore and period _ So STExport replaces any of the invalid special characters with a by default You can change the default character to be something else with the following set command Suprtool Open 5 6 User Manual Set xmltagchar _ STExport will only allow the hyphen underscore and period to be set with this command Quotes All of STExport s XML command options version doctype file and record allow for a string to be passed via surrounding quotes The quotes may be either single or double but keep in mind that if the string is to contain double quotes then you should s
299. ng point Eloquence still allows for a schema to use R type items but internally they are stored as IEEE Suprtool and STExport will just map the real and long data types to their respective IEEE data types Suprlink does not need to map these data items as it does not support Real Long or IEEE key values You can turn this mapping off with Set RealMap Off but you should not need this option Define Command Suprtool will not allow you to define a real type item Although Suprtool can map R items in SD files and in Eloquence datasets we do not allow the creation of real or longs using the define command Input from Stdlist In Suprtool MPE input means read the input data from the stdin input device This is usually a job stream and data is terminated by an EOD symbol Suprtool Open does not support reading data from stdin via Input or any other method If you need to create temporary data in the middle of a script it is easy to use a temporary file For example the following script creates a temporary file writes three lines of data to it then uses this file as input to Suprtool Open At the end of the script we make sure that we remove the temporary file that we created bin sh datafile mktemp echo 1234567 Line 1 gt gt Sdatafile echo 2345678 Line 2 gt gt Sdatafile echo 3456789 Line 3 gt gt Sdatafile suprtool lt lt EOD input Sdatafile rec 14 1f define key pled define line rer e
300. ng point PACKED packed decimal PACKED packed decimal last nibble unused DISPLAY zoned decimal numeric field LOGICAL unsigned integer CHARACTER for Native Language Support The Define command also accepts Fpoint as the data type for IEEE numbers The following table shows the Suprtool definitions for the IMAGE data types IMAGE Type Number of Bytes COBOL SUPRTOOL Declaration Definition Il 2 S9 4 COMP gt define a 1 2 integer 2 4 S9 9 COMP gt define a 1 4 double 14 8 9 18 COMP gt define a 1 8 integer Ji 2 S9 4 COMP gt define a 1 2 integer J2 4 S9 9 COMP gt define a 1 4 double J4 8 9 18 COMP gt define a 1 8 integer Un n A n gt define a 1 n byte Xn n X n gt define a 1 n byte Zn n 9 n gt define a 1 n display Pn n 2 S9 n 1 COMP 3 gt define a 1 n 2 packed K1 2 gt define a 1 2 logical K2 4 gt define a 1 4 logical E2 4 gt define a 1 4 ieee E4 8 gt define a 1 8 ieee Data type Display may have a trailing overpunch sign 92 Suprtool Commands Suprtool Open 5 7 Suprtool Open 5 7 Packed Decimal Fields When defining packed decimal fields you must convert the number of decimal digits into a byte count The last digit of a decimal field is always used for the sign There are two data types for decimal fields PACKED for those that end on a byte boundary and PACKED for those that end in the middle of a byte Here are some example definitions of packed decimal fields Suprtool Definition Description gt defi
301. ng several commands separated by a space or a comma If no parameters are specified Suprtool cancels the previous Sort Key If Delete and List commands The other commands remain unchanged If ALL is specified all of the Input and Output commands are canceled and database files are closed In fact the only options that are not reset to the initial condition are Define Item Open and Set options Examples You began to specify a sort but then you discovered that you specified the wrong database so you decided to start all over gt base ostore gt get d sales gt sort cust account gt reset all oops wrong database gt base store now we have correct one In the next example you entered an incorrect If command gt if delivered gt 0004 wrong field used gt reset if only reset the If command gt if purchased gt 0004 and specify it again This time both the If command and the Extract commands are incorrect gt if delivered gt 00040 wrong field used gt extract delivered in both commands gt reset if extract only reset the If and Extract gt if purchased gt 00040 commands and start again gt extract purchased account Notes By resetting certain commands other commands are also reset For example resetting the Base command resets almost all other commands except the Define and Output commands Resetting the Put command closes the output database when the database for the Put comma
302. nges cause STExport to print a warning to let you know that these options have changed If you do want quotes around byte type fields or delimiters between fields specify those options after selecting the HTML option STExport Commands 257 258 STExport Commands Dynamic Web Pages The Common Gateway Interface CGI feature of your Web server allows you to execute custom programs or scripts and to dynamically generate then display Web pages These custom programs and scripts can be written in almost any programming language Perl is probably the most commonly used language but you could use C or C Applescript on Macintosh or Visual Basic Web Server First your Web server software must be configured to allow CGI scripts On the NCSA server you need to change the srm conf file to include ScriptAlias cgi bin usr local httpd server cgi bin This indicates to the server where the CGI scripts are located If a user enters cgi bin in the Uniform Resource Locator URL the Web server executes the program specified out of the directory specified e g http www mycompany com cgi bin myscript pl will actually execute usr local httpd server cgi bin myscript pl On the CERN Web server you need to enter the following in the httpd conf configuration file Exec fegi biny usr local httpd server cgi bin Of course the alias name and directory can be anything you want them to be A script can be coded to perform the
303. ning messages Errors are defined as conditions which immediately prevent Suprtool from continuing or which allow it to complete a task and then stop because continuing would likely cause undesirable or erroneous results When Suprtool detects a serious error condition such as a syntax error in a command a file system error or a sort error it prints an error message For example Error Unknown command name try HELP Error Unable to open gt OUTPUT file Finding Errors Automatically If you have software that scans spool files for error conditions have it look for Error File System Errors When a file system error occurs Suprtool prints the file system error message An error during processing terminates the current task exceptions bad data with an If command when Set Ignore is On Arithmetic Trap Abort If Suprtool should Abort with Parm 99x an error has been detected in the Arithmetic Trap Routine This should never happen so please report it to Robelle Solutions Technology Inc NUMRECS exceeded some records not processed You specified a Numrecs and have reached it This condition is considered an error if the input is from a source other than disc Suprtool Errors and Warnings 229 Warnings Command entered is not a valid Suprtool command and MPE access has been disabled See Set Limits command Normally commands that are not valid Suprtool commands are passed off to the operating system
304. nition 01 SUPR CONTROL 05 SUPR VERSION PIC S9 4 BINARY VALUE 4 05 SUPR STATUS PIC S9 4 BINARY VALUE 0 88 SUPR OK VALUE ZEROS 88 SUPR BAD MSGFILES VALUE 1 88 SUPR ABORTED VALUE 2 88 SUPR CREATE ERROR VALUE 3 88 SUPR BAD TOTAL TYPE VALUE 4 05 SUPR COMMAND LINE PIC X 256 VALUE SPACES 05 SUPR FLAGS 0 SUPR PRIORITY PIC X 002 VALUE SPACES 88 SUPR PRIORITY CS VALUE CS 88 SUPR PRIORITY DS VALUE DS 88 SUPR PRIORITY ES VALUE ES 0 SUPR MAXDATA PIC S9 9 BINARY VALUE 0 0 SUPR PRINT STATE PIC X 002 VALUE AL 88 SUPR PRINT ON ERROR VALUE ER 88 SUPR PRINT ALWAYS VALUE AL 88 SUPR PRINT NEVER VALUE NE 0 SUPR TOTAL TYPE PIC X 002 VALUE CO 88 SUPR TOTAL COBOL VALUE CO 88 SUPR TOTAL ASCII VALUE AS 0 SUPR OTHER FLAGS PIC X 018 VALUE SPACES 05 SUPR TOTALS PIC S9 17 SIGN IS TRAILING SEPARATE CHARACTER OCCURS 15 TIMES 05 SUPR OUT COUNT PIC S9 9 BINARY 05 SUPR WORKSPACE PIC X 020 VALUE SPACES Here s the command definition 01 SUPRTOOL COMMANDS 05 SUPRTOOL COMMAND LINE OCCURS 30 TIMES 07 FILLER PIC X 72 VALUE SPACES Here s some sample code that moves the suprtool commands to the command array 2100 SUPRTOOL COMMANDS MOVE 1 TO X MOVE 12 TO Y MOVE USE S DIR_PUB dbopen TO SUPRTOOL COMMAND LINE X ADD 1 TO X MOVE SELECT FROM V_MEMBER SPAN TO SUPRTOOL COMMAND LINE X MOVE IF SREAD TO SUPRTOOL COMMAND LINE Y
305. nk cannot use the file but it may be a perfectly valid file for other applications NUMRECS exceeded some records not processed You specified a Numrecs and have reached it Record selection in effect percentage calculation is estimated You specified a Get or an Input with record number selection and the percentage complete is estimated 230 Suprtool Errors and Warnings Suprtool Open 5 6 User Manual Welcome to STExport Welcome to STExport Welcome to STExport Open Version 5 6 STExport converts fields in a self describing input file into an output file that can be imported into different applications Summary of the STExport commands Before FLoating Quote Verif CLean Form REDO Xeq Columns HEAding Reset XML DAte HElp Set Zero DElimiter HTML Sign expressio DO Input Spaces OS command Escape LISTREDO SPaces Exit Output Use The minimum abbreviation of each command is shown in capital letters Installing STExport STExport is installed as part of the Suprtool installation process See the Installing Suprtool chapter of the Suprtool User Manual for more details on how to install both Suprtool and STExport Suprtool Open 5 6 User Manual Welcome to STExport 231 Accessing STExport How To Run STExport To access STExport type the following command opt robelle bin stexport STExport Copyright Robelle Solutions Technology Inc 1999 2013 Version 5 6 After a short pause STExport takes over you
306. nnumbered text file or a Qedit workfile but no more than 256 characters per record will be processed By default Suprlink displays the commands in a usefile as they are executed Suprlink can execute commands quietly using the Useq command For compatibility with Qedit Useq can be abbreviated to UQ Suprtool Open 5 7 Suprlink Commands 323 Verify Command V Print the definition of the current linkage task VERIFY Verify prints the current Input Link and Output files in other words it is a Verify All command 324 Suprlink Commands Suprtool Open 5 7 Xeq Command X Perform the current linkage task XEQ Xeq checks that you have specified an input file and at least one Link file Then it performs the linkage and creates the output file Finally it closes the files and resets ready for you to specify another linkage task or Exit If you also wish to leave Suprlink after completing the linkage task use Exit instead of Xeq Suprtool Open 5 7 Suprlink Commands 325 Example Suprlink Output Example Suprtool Open 5 7 The Form command displays the fields in a self describing file This information is stored in a file with an extension of sd and is not accessible with other tools Use the Form command to obtain the record layout of Suprlink output files The following example shows the Form command listing for an input file a Link file and the resulting output file We start with an input file of invoices f
307. nuary 1999 you would do the following Suprtool Commands 147 gt item trans date date phdate gt if trans date gt date 1999 01 01 and amp trans date lt date 1999 01 31 Relative Dates You can specify a relative date using the date function Then you can create job streams that don t rely on hard coded dates The general syntax of the date function is date year month day The year can be a specific number e g 2000 or an asterisk for the current year To specify a relative year you add or subtract years from the one you specified gt if field S date 2000 01 01 January 1 2000 gt if field S date 2000 1 01 01 January 1 1999 gt if field S date 1 01 01 January 1 last year The month can be a specific number e g 6 for June or an asterisk for the current month To specify a relative month you add or subtract months from the one you specified field date 2000 06 1 01 May 1 2000 field Sdate 01 start of current year and month field Sdate 1 01 start of last month field Sdate 18 exactly eighteen months ago The day can be a specific number e g 15 an asterisk for the current day the word first for the first day of the month or the word last for the last day of the month You cannot add or subtract relative days use today instead gt if field S date 2004 01 first January 1 2004 gt if field Sdate today s date gt if
308. o make each of the 12 repeated fields in the output record equal to 100 gt extract name gt extract balance 100 If we only wanted to extract the sixth field of BALANCE and set it to 100 we would do the following gt extract name gt extract balance 6 100 Character Constants Use the character to specify any ASCII character The number the actual ASCII value or letter A means control A must follow immediately after the character Suprtool treats character constants as strings When you extract the constant to a field longer than one byte Suprtool pads it with spaces gt define field 1 1 byte field gt ext field 0 binary zero gt ext field G Control G bell gt ext field 27 escape gt ext field 2252 Roman 8 box gt ext field 186 Euro currency symbol You can also extract the constant directly without referring to a defined field This always produces a one byte constant with no blank padding O binary zero TIALO Carriage Return Line Feed M J CR LF again 27 amp dB escape sequence Dates Extracting Today s Date To extract today s date use the following gt item field date ccyymmdd identify date format of field gt extract field Stoday today s date gt extract field Stoday 1 yesterday s date gt extract field Stoday 1 tomorrow s date Use the Item command to qualify the field as a date Suprtool uses the date format to determine the
309. o running Suprlink suprlink v lt lt EOD in myvariable join ordhist out ordcomb exit EOD Suprtool Open 5 7 Introduction to Suprlink How Report Programs Work The best way to understand Suprlink is to examine the process of writing a report Your report program will be written in COBOL RPG PowerHouse or some other language Imagine that instead of hunting all over the database to collect your data you just read a sorted disc file with a big record containing all the data on a given entity For example a sales report might read a disc file whose records consist of sales transactions plus customer information This file has been sorted by customer number and date If there are several sales for the same customer the customer information is just repeated in each record The report program reads the records checks for level breaks and formats and prints the records Suprlink fits into this model of report programs Working from the database to the final flat file how do we use Suprtool and Suprlink to produce the desired result Obviously Suprtool can extract the desired fields from the desired records from the customer table and put them in a disc file And Suprtool can extract the desired fields from the customer master dataset and write them to a second disc file What does Suprlink do If Suprtool sorts both files by customer Suprlink can link them together producing a third file whose composite record consis
310. o the first six bytes In this case the field must be defined as data type Byte Char or Display The Define command cannot be used to convert data from one format to another Using the same example the Define command could not be used to treat the first six digits of the ten digit ASCII field as Integer Packed Real or any other numeric data format If the input record contains ASCII digits Define cannot change them to another data type It may be helpful to think of the Suprtool Define command as similar to a COBOL REDEFINES clause or a FORTRAN EQUIVALENCE statement Suprtool Commands 95 Delete Command DEL 96 Suprtool Commands Deletes all entries selected from the input Eloquence dataset DELETE Delete has no parameters and can be entered only after the source of input records has been specified using Get or Chain Delete causes Suprtool to delete the input records after they have been read either all of the input records or a subset defined by the If command Delete is not supported for SQL or disc files only for Eloquence datasets Examples gt comment Delete and sort old transactions write to file gt base store gt get d sales dataset to delete from gt if purch date lt 980101 select which records to delete gt delete ask for deletion gt sort cust account sort by account and sort gt sort purch date by date gt output oldsales output file with deleted and sorted records gt exi
311. oduce XML Documents for either Internet or Intranet applications XML VERSION string DOCTYPE string FILE string RECORD string Example STExport can generate well formed XML output with just a few commands Sinput filelsd xml output myxml Sxeq These four simple commands will generate the following file that packages such as XMLSpy will consider to be well formed XML The result of such an STExport task will look as follows lt xml version 1 0 gt lt file gt lt record gt lt CITY gt Los Altos lt CITY gt lt CREDIT RATING gt 100000 lt CREDIT RATING gt lt CUST ACCOUNT gt 4003302 lt CUST ACCOUNT gt lt CUST STATUS gt 20 lt CUST STATUS gt lt NAME FIRST gt Ralph lt NAME FIRST gt lt NAME LAST gt Perkins lt NAME LAST gt lt STATE CODE gt CA lt STATE CODE gt lt STREET ADDRESS gt Room 655 lt STREET ADDRESS gt lt STREET ADDRESS gt Los Altos 040033022 lt STREET ADDRESS gt lt ZIP CODE gt 93002 lt ZIP CODE gt lt record gt lt file gt Notes By default STExport will add the simplest version tag at thebeginning of the file then it inserts a lt file gt and matching lt file gt at the beginning and the end of the file Then STExport encloses each record from the input file in a lt record gt and lt record gt tag Finally the Self Describing tags are added around each field s data values and edited appropriately Naturally users would want options to customize
312. ol task shows you how to convert a date in a self describing file from mmddyy to yymmdd format Consider the following self describing file with the deliv date and purch date fields File SALESO4 DATA ACCOUNT SD Version B 00 00 Entry Offset CUST ACCOUNT Z8 ELIV DATE X6 lt lt MMDDYY gt gt RODUCT NO Z8 ODUCT PRICE T2 Ri URCH DATE X6 lt lt MMDDYY gt gt ALES QTY I4 ALES TAX I2 ALES TOTAL I2 t 115 EOF 15 Entry Length 42 Blocking 97 You want to convert these two dates to a data format of yymmdd before adding a century in front of the year This can be easily accomplished by defining each sub part of the date and extracting those parts in the new order You can use string addition to re order the field in one pass Suprtool Open 5 7 Suprtool Issues and Solutions 59 Performance 60 Suprtool Issues and Solutions gt in sales04 gt def new deliv 1 6 gt item new deliv date yymmd ef deliv date mm deliv d nO ef deliv date dd deliv d Syz ef deliv date yy deliv d O42 ef new purch 1 6 gt item new purch date yymmdd gt def purch date mm purch date 1 2 gt def purch date dd purch date 3 2 gt def purch date yy purch date 5 2 gt ext cust account gt ext new deliv deliv date yy deliv date mm deliv date dd gt ext product no product price gt ext new purch ext purch date yy purch date mm purch date dd gt ext sales qty sales total gt out sales05 link gt xeq You n
313. ommand S rnern E r EA EE E EEEE KESE E 189 AND AS Gs eara e eit A A E aa EAA 191 AAM CLC os e3 eox Seveers es vitheenons E E E A AEE AE 191 Baseclos eroras a A A E R EAN 191 BIOCKSIZ esn aaa E E E AEE N 191 BUTEL seactyeeveneess vices ceases uadeneeetabivapastevbavepeatevnave reenter EREE 191 Clean hare 45 aa a eaa E A EASE EET APEE DEAETE EEEIEE ASE eo EEEE AREL 191 Currence ySymbo lannec eha An EEEE A EEE APEE EEEa EE E Lanea E EERE anea 192 Dates EASON E AAEE EIRE EIE AE AAE A E E E P AT 192 Date FOrCeC entry x cece tees a eea TAA tec ese A vec A aba ETE anaE E E ARE AEA 193 Table of Contents 9 10 Table of Contents Date Map ToPH Dates ic isr enan conceding E O EEE a a tensed tbe as E ESA 194 Decimals ymbil iee ae heey hie TE con ace EE O cg etree ete a ER EE E E 194 DD GT E EAE AAE A EE AAEE E EIEE EAE A E A 194 DUN pOMETTON misseri roe aa eE IE Ar REEE veces vines a T ERE RT 195 EditS top Errors nisreen rores ias EEEE tan abe AE EEE EOE RE EEN T 195 10 8 A121 6 Nene rara A EE A te er R T one Er oer a a a a 195 IB ASt Rad sree oaa E a a a a a Ret a a et 195 FilECOdE So A EO E a E R E R T ase a aa 195 Filenames Aana a a a ca a a es a a aa a 196 IP AGSURC C955 2002 edhe A EEE Te E E A Toads TA a a aaa ee 196 METAS e a a E hee ta Toned ent a Re es RT et 196 HPUXCMdErr lt string gt 2s aver EE E ETEA ETE A E E t 196 ONEC Kerer a AA eae a a Ree Tt eS 197 TSM OV EAE E AE E A E NTE E E EE 197 MAIEXENS u r E tte Pi tet a A eT e
314. on Suprtool cannot explicitly convert from a byte field to a numeric field such as a double integer The Extract command however does allow conversion from a display field to a double integer or any other numeric field You can define a byte field to be a display field if all of the characters in the field contain a number For example if you have a six character byte field that looks like this 012345 you can define it in the following manner gt def display field 1 6 display This field can then be converted to any of the other numeric types that Suprtool supports If the field is six characters and contains blanks decimal currency or a sign symbol in the data then you can utilize the number function Number Function Suprtool now has the ability to accept free form numbers as display data types This means numbers in the form Suprtool Open 5 7 Suprtool Open 5 7 1234 45 12345 123 2134 12343 123 45 can now be accepted and converted to any other numeric data type Consider the following data Item number New Price 12345 123 45 34563 27 5 21312 1 545 Suprtool can now read and convert the data in New Price using the number function Let s say we want New Price to be a double integer and currently occupies eight bytes starting in position six Here is the task you would use to convert the New Price free format number into a double integer gt in mynums gt def item number 1 5 byte gt
315. on the size of the Number e O Places Suprtool Data Type 4 byte Integer 8 byte Integer Oracle OpenFix SET ORACLE OPENFIX ON OFF Initially OFF In order to fix a problem introduced by a patch to Oracle 9 we had to change to a new Oracle call interface call You can invoke this new call in one of two methods the first is to use the following Set command gt Set Oracle OpenFix On The second method is to specify the username password in the following manner gt open oracle scott tiger However this option should not be needed any longer due to how we load the Oracle routines and utilize them Suprtool Commands 203 204 Suprtool Commands Oracle PassShift SET ORACLE PASSSHIFT ON OFF Initially ON Oracle 11 now allows for case sensitive passwords Normally Suprtool upshifts all characters in an Oracle password this can be changed with Set Oracle PassShift Off which stops Suprtool from upshifting the Oracle password This works for both syntax methods of open oracle suprtest suprpass and the syntax that includes the service name open oracle suprtest suprpass servname Oracle SpaceNull SET ORACLE SPACENULL ON OFF Initially OFF Suprtool has a new option to turn on changing null fields to Spaces Set Oracle SpaceNull On will change any fields that are null in the SQL sense of the word and become spaces for the char date and varchar data types In order to turn this feature on for all accesse
316. onprint gt list The above task will list the record if the field nonprint has a Tab Decimal 9 or a Line Feed Decimal 10 anywhere in the field You can Find and clean the bad characters from a field at the same time gt in cleansd gt clean 9 10 gt if Sfindclean nonprint gt extract nonprint Sclean nonprint gt list Trimming Spaces Trim Ltrim Rtrim Use one of three built in string functions to remove leading or trailing spaces from a string expression The three functions are 146 Suprtool Commands Suprtool Open 5 7 Suprtool Open 5 7 Trim Remove leading and trailing spaces from the string expression LTrim Remove leading spaces RTrim Remove trailing spaces Because Suprtool pads shorter strings with spaces when doing comparisons trimming spaces is most useful when creating a combined string with several fields For example you might want to combine a person s first and last name including a space between the two gt if Strim first Strim last Joe Smith Mixed Case Upper and Lower By default Suprtool does an exact match when comparing two string expressions If the expressions vary in the capitalization of characters Suprtool finds them to be different To do caseless string comparisons or pattern matches use the upper or lower functions Both ASCII and Roman 8 characters are shifted by upper and lower For example VANCOUVER edmonton gt if Supp
317. orm invoices File invoices SD Version B 00 00 Has Linefeeds Entry Offset CUSTNUM X8 1 lt lt Sort 1 gt gt DELIVERED I2 9 PRODUCTNUM Z8 F3 PRICE 2 2l PURCHASED T2 25 QTY Il 29 TAX I2 31 TOTAL I2 35 Entry Length 38 Blocking 1 Suprtool produced both the invoice and the customer file by using the Select Extract and Sort commands The invoice file was produced with Suprtool s Output Link option If you had used Suprtool s Output Query option the Form command would not have printed any information about the key fields The next listing is the customer file form cust File cust SD Version B 00 00 Has Linefeeds Entry Offset TY X12 1 NG T2 13 TNUM X8 17 lt lt Sort 1 gt gt TUS X2 25 FIRSTNAME X10 27 LASTNAME X16 37 TATE X2 53 ADDRESS 2X25 55 ZIPCODE X6 105 Length 110 Blocking 1 The street address is a compound field If you had used Suprtool s Output Query option the field would have appeared with a question mark for the data type In that case you cannot use the field as a key field in Suprlink but the actual data in the field will be processed and linked correctly Your final report should be able to read this data just as if it came from the database We use Suprlink to combine the invoice and cust files into one Output file Example Suprlink Output 327 opt robelle bin suprlink i invoices by custnum 1 cust invcust The final Form command shows the record
318. out referring to a field For example to leave a space between fields you must do the following wow gt extract account vrating gt output ascii Suprtool uses the length of the string to determine the size of the field The following example extracts the same fields as the previous example but each output record identifies the field tract Customer Account account tract Credit Rating rating tput ascii The output would look like tomer Account 04598921 Credit Rating tomer Account 44657844 Credit Rating tomer Account 98753198 Credit Rating The spaces after Credit Rating before the rating value is due to the numeric field Rating being extracted with blanks for its leading zeros This is the result of the Ascii option of the Output command Repeated Fields If the field is an IMAGE repeated field e g 10J1 the Extract command places the value in each of the repeated fields when you do not specify the subscript If you specify a subscript only that one repeated field will have the new constant value Suprtool Commands 109 110 Suprtool Commands In this example Address is a repeated field 2X20 We wish to extract the data as it exists in the input record rather than forcing it to a constant value gt ext account extract key value gt ext address take both of the repeated fields In the next example we assume that the Balance field is a repeated field 12J2 We wish t
319. over your terminal and print out some identifying information You will notice that your command prompt has changed to telling you that you have made it into Suprlink Suprlink expects you to type command lines ending each one with Return How to Xeq a Suprlink Task Normally you enter a series of commands These commands specify the Input file the Output file and the Link file name s Finally you enter an Xeq or an Exit command This begins the actual Suprlink linkage task If you entered the Exit command Suprlink will finish the current task then return you to the Operating system EXIT If you entered the Xeq command Suprlink will finish the current task then prompt you for another task This continues until you enter the Exit command If you wish to terminate Suprlink immediately perhaps you are confused enter Exit Abort This will terminate the Suprlink program immediately without attempting any task Suprtool Link Command This command is not currently available in the Open version Exit with Verify This feature is not yet available in the Open version Suprtool Open 5 7 Accessing Suprlink 291 Using Suprlink in Batch You normally run Suprlink as an on line session You type Suprlink commands on your terminal and Suprlink prints responses on your terminal If you redirect stdin or stdlist Suprlink assumes that it is in batch Suprlink in batch is almost identical to Suprlink on line except for answ
320. ow end up with a file that looks like this File SALESO06 DATA ACCOUNT SD Version B 00 00 Entry Offset CUST ACCOUNT Z8 1 NEW DELIV X6 9 PRODUCT NO Z8 15 PRODUCT PRICE I2 23 lt lt YYMMDD gt gt NEW PURCH X6 27 SALES QTY TI 33 SALES TAX I2 35 SALES TOTAL I2 39 Limit 115 EOF 15 Entry Length 42 Blocking 97 lt lt YYMMDD gt gt Many sites use Suprtool because it provides access to their data many times faster than they are used to Suprtool also enables them to perform time consuming DP functions with only a few simple commands The typical Suprtool task consists of extracting some data for a report then feeding the Suprtool output file into the final report program For example you might fill a data file with the subset of data needed then report that file with Microfocus COBOL Eloquence Performance Suprtool Open has high speed dataset reads for Eloquence databases Suprtool by default calls dbget to do serial reads however if you use Set FastRead On you will efficient large reads Testing has shown that the CPU time can be improved by anywhere from two to five times and Wall time has improved anywhere from two to six times In order to turn this feature on for all accesses you can put the command Set FastRead On into the file opt robelle suprmgr This means that Suprtool will use the faster reads for all runs of Suprtool Set FastRead On must be set prior to the Base command otherwise it will be ignored The
321. ow has it s own Suprmgr file STExport will process all the commands in opt robelle stexpmgr on startup Set Comlog On has been added to Suprtool Suprlink and STExport to log all commands entered in Suprtool Suprlink or STExport are logged in it s own file Suprtool would potentially have problems with system commands in variable length scripts if the command ended in a number that had a length of eight numbers Suprtool now has the proper function which will shift the first character in a string and any first character after a space or ampersand Suprtool now has the Translate command and a translate function to obfuscate test data or any byte field from being readable Suprtool Open would not parse a negative number into a quad integer container Suprtool for Itanium and Suprtool Open would not properly convert negative single and double integers when output display is invoked Suprtool for Itanium and Suprtool Open incorrectly reallocated if extract code space on subsequent tasks which would eventually cause Suprtool to fail with the error Unable to allocate heap space Suprtool Open 5 7 Installing Suprtool Overview Suprtool and associated tools can be downloaded from our web site using simple instructions found underneath the download Who Needs To Use These Instructions Since the install requires root access the system manager should use the following installation instructions to install Suprtoo
322. pe Spaces byte type Zero numeric type Commands Many of STExport s commands such as the formatting commands above once set will retain their settings between tasks Several other non formatting commands will also retain their settings HEAding HTML Each command and its options will remain in effect between any STExport task unless specifically turned off For example if a previous task has had custom Headings set with the Heading and Heading Add options the Headings will remain in effect for each subsequent task until a new Heading option is entered Performance Considerations On average STExport is three to five times slower than Suprtool This is the price we pay for having all of STExport s formatting features You can make STExport faster by doing the following Pre select only the records you need with Suprtool The fewer records STExport has to process the faster it runs Use Suprtool s Extract command to select only the fields that you need to import in your final application The fewer the number of fields in the input file the faster STExport can format each record 236 Introduction to STExport Suprtool Open 5 6 User Manual STExport Commands General Notes Suprtool Open 5 6 User Manual When you run STExport it prompts for commands on stdlist with a character and reads command lines from stdin STExport commands contain a command name followed by one or more parameters and are patte
323. pecified Note that you should use extreme care when you are using the record number selection option on master datasets This is because the record numbers of master dataset entries can be changed as entries are added or deleted from the dataset For example if there are deleted entries in the master dataset then you could get fewer records than expected When debuggin software it is convenient to scan the first few records of a dataset Specifying a startrecord endrecord makes this easy gt get m product 1 20 first twenty records gt list produce a formatted list of each gt xeq record with no output file This example gets any records that are in the first twenty locations This may be fewer than twenty records if there were deleted or unused entries in the first twenty record numbers Suprtool Open 5 7 Random Selection The count parameter selects every nth record from the dataset where n is equal to count This option is designed to allow random selection from the dataset It cannot be combined with the startrecord endrecord option Test databases can be constructed from random samplings of production databases Using the count parameter and the Put command we build a test dataset gt base store gt get d inventory 15 every 15th record is read gt put d inventory test put to the d inventory dataset in gt exit Test database Suprtool Open 5 7 Suprtool Commands 135
324. ple key values this data is stored in the file dsales 50512001 Rest of data 50512001 Rest of data If you did the following task assuming both files are sorted by the product no in dinv join dsales out invsales xeq The resulting file would have four records with the multiple matching dinv and dsales records The record layout would have the dinv information first followed by the dsales information If you add the optional keyword on the join command the resulting file would have 5 records The matching 4 records from dinv and dsales as well as the dinv record that did not match with the numeric fields set to zero and the byte fields set to spaces Only one Join operation is allowed per task By default Suprlink will join files base on the primary sorted key in the self describing file You can specify a secondary key for the files to be joined on ina similar manner to how the Link command did in orders join dsales by order no product no out ordsales xeq Performance Considerations 296 Introduction to Suprlink Select only the records you need unless the time to load a table of desired key values plus the time needed to do lookup for each record is longer than the time to Suprtool Open 5 7 extract and sort the entire dataset Use the Sorted and Hold options of the Table command when loading a table Because of the time needed to search a large table it is often faster to extract all of the
325. port session As soon as you exit STExport the setting is discarded Next time you run STExport you will get the temporary stack If the file name is not qualified the redo stack is created in the current working directory This may be desirable if you want to have separate stacks If you want to always use the same persistent stacks you should qualify the name The Verify command shows which stack is currently in use If it shows lt temporary gt then STExport is using the default stack Anything else is the name of the file used on the Set Redo command Concurrency When STExport uses the default temporary stack it is only accessible to that particular instance of STExport You can run as many STExport instances as you need and each one gets its own redo stack With temporary stacks you will never get into concurrency problems If you start using a persistent redo stack however you might start running into concurrency problems A persistent redo stack can only be used by one STExport instance at a time If you try to use a persistent redo stack that is already in use you will get the following message SSet Redo Myredo The redo file is already in use Unable to open file for REDO stack In this situation STExport continues to use the redo stack active at the time and lets you continue working as normal Qedit can also have permanent redo stacks To prevent products from writing to each other s redo stack it is advisable to hav
326. print on the attached printer To use this option you must be using an HP terminal or HP terminal emulator and your data communication settings must be setup correctly You can combine this option with other listing options You cannot interrupt Record mode with Control Y but you can do a Soft Reset This unlocks the keyboard and causes the rest of the output to appear on the screen You can then stop it with Control Y List record may not return complete control to your PC when running Reflection The report printed and the keyboard unlocks but control is not passed to your terminal You can get control back by doing a Soft Reset Alt S You can prevent this problem by setting DISABLE COMP CODES to yes If you are listing to an attached printer from a terminal your terminal may remain locked after the printout is completed This generally happens when you have handshaking enabled G H straps set to No You can do a soft reset to unlock your terminal If handshaking is disabled G H straps set to Yes the List command works and returns control to the terminal but two S characters will be printed on the terminal There is currently no known workaround to these problems Suprtool Open 5 7 Suprtool Commands 171 ROBELLE LP Typically when printing with the list command inside Suprtool or Qedit for that matter and you are sending the output to a printer device the lp program is used to accept the data from a pipe In some cas
327. prlink you will get the temporary stack If the file name is not qualified the redo stack is created in the current working directory This may be desirable if you want to have separate stacks If you want to always use the same persistent stacks you should qualify the name The Verify command shows which stack is currently in use If it shows lt temporary gt it means Suprlink is using the default stack Anything else is the name of the file used on the Set Redo command Concurrency When Suprlink uses the default temporary stack it is only accessible to that particular instance of Suprlink You can run as many Suprlink instances as you need and each one gets its own redo stack With temporary stacks you will never get into concurrency problems Suprtool Open 5 7 Suprtool Open 5 7 If you start using a persistent redo stack however you might start running into concurrency problems A persistent redo stack can only be used by one Qedit instance at a time If you try to use a persistent redo stack that is already in use you will get the following message set redo myredo The redo file is already in use Unable to open file for REDO stack In this situation Suprlink continues to use the redo stack active at the time and lets you continue working as normal Qedit can also have permanent redo stacks To prevent products from writing to each other s stack it is advisable to have separate stacks for each product by giving them
328. prlink Open Version 5 6 Suprlink is a program that works with Suprtool to add multifile capability to Suprtool Rather than take the regular path to multiple datasets random retrieval via IMAGE keys with its well known performance problems we have chosen to follow a different path fast serial extracts plus a very efficient merge Summary of the Suprlink commands Before Input Redo Xeq Do Join Reset expression Exit Link Set OS Command Form LISTREDO Use Help Output Verify The minimum abbreviation of each command is shown in capital letters Terminology and HP UX Many of the terms and examples in this manual use terminology specific to MPE and IMAGE SQL databases We have edited the Suprlink Open manual to be more generic in this regard however some references remain for clarity Notation The Suprlink documentation uses a common notation in describing all commands Here is a sample command definition Link filename BY link keys FROM input keys OPTIONAL UPPERCASE LETTERS are required elements in the command and must be typed exactly as they appear Example BY Highlighted lowercase letters underlined or italic are variables to be filled in by the user In the help file 288 Welcome to Suprlink Suprtool Open 5 7 underlining and italics are not available and variables will appear simply in lowercase Example filename Brackets enclose optional fields Example FROM input keys B
329. processing stage and the output choice Processing Selections If you do not specify any processing the input records are quickly copied to the output choice Some of your processing choices are 1 Sort the records into ascending or descending sequence Sort or Key No records are output until all of the selected input records have been sorted 2 Total one or more input record fields Total 3 Remove or select duplicate records Duplicate Output Choices Usually you wish to extract a subset of your records to feed into a report program so the default output file is a data file The default output file format matches the input file format unless you use the Extract command You can specify different formats for the output file by qualifying the Output command To have readable ASCII output use output xxx ascii To produce self describing files use Output xxx Link By default every output record is identical to the corresponding input record The Extract command assembles output records by stringing together fields extracted Suprtool Issues and Solutions 47 from the input records With the Extract command you can insert constant values into the output record Each output record is written to the output choice You can also see a formatted listing of each record with the List command Suprtool and Oracle You specify an Oracle database with the Open command You can open any Oracle database to which you normally h
330. prompt the user for values Suprtool Commands 153 gt use prompt use gt in sdfile first line of usefile gt if status S read and amp continue the If command state Sread last line of the usefile SNEON prompt for status end of prompt for status AZ prompt for state ANCA user must remember comma OR user also enters quotes end of the second read functions Some functions were originally designed for if command and some are more suited for the extract command Because of this some functions don t work in the if command such as edit and others such as number have interesting side effects Specifically with number when you work on byte type fields they will be updated internally to be treated as display Get dataset Def display field byte field display If Snumber display field gt 10000 Out somefile link xeq The field byte field will have leading zeroes and treated as a display 154 Suprtool Commands Suprtool Open 5 7 Input Command I Suprtool Open 5 7 Opens the file that will be the input source for the next extract task The file must contain fixed length records with or without a line feed separator If you are selecting records the selection parameters must appear after any Reclen LF or NOLF parameters The record length is the length of the data portion of each record not including the line feed If you specify LF Suprtool Open includes the line
331. ps two spaces and deletes a second character above the second d It does not delete a range of characters making it unlike the MPE V version of Redo d d gt xyz Deletes a single character above the first d skips two spaces and deletes to the end of the line beginning at the second d and then places xyz at the end of the line Appends xyz to the end of the current line gt ddxyz Deletes the last two characters from the end of the current line and then places xyz at the end of the line Replaces the last three characters in the current line with xyz gt IXYZ Appends xyz to the end of the line In this case the i command is superfluous because gt accomplishes the same result Using gt xyz would be sufficient c ab def Changes all occurrences of ab to def c ab Deletes all occurrences of ab CXyZ Replaces the current text with cxyz starting at c Because delimiters have not been specified as they were in the previous two examples this is a simple replacement with the four characters Persistent Redo Redo commands can be saved in a permanent file and can therefore be used from another session You can use the Set redo command to specify a filename to save your redo commands See Redo on page 206 for details Suprtool Open 5 7 Reset Command R Resets aspects of the current task RESET ALL command Default Delete Sort Key If List Parameters More than one command can be Reset at once by enteri
332. q command performs the task Look at the First Few Records If you want to look at the first few records of a dataset use the Numrecs command This command tells Suprtool to extract at most the number of records specified Then instead of sending the result to a file send it to the screen with output ascii The example shows you how to look at the first 10 records in your dataset Suprtool Open 5 7 Quick Start Guide for Suprtool 23 gt select from sales gt numrecs 10 first 10 records gt output ascii output to screen format numbers gt xeq Selecting by Criteria Simple Criteria To tell Suprtool to choose records based on certain criteria you can either use any valid SQL command e g select where or you can select all the records and use an If command In the following example Suprtool extracts all records with a sales_total value greater than 20000 from the Sales table Both tasks produce identical results but one way may be faster than the other gt select from sales gt if sales total gt 20000 gt output result gt xeq Complex Criteria To choose records using more complex criteria combine several simple criteria using AND OR NOT and parentheses In this example Suprtool extracts all records that have a sales_total value greater than 20000 and a product_price value less than 5000 from the sales table gt select from sales gt if sales_total gt 20000 and product_price lt 5000
333. r For example gt in sdfile a self describing file gt def new_ship date 1 4 double gt item ship date date mmddyyyy gt ext order no sales amount gt ext new _ship date stddate ship date gt out salesinfo link gt xeg Invalid Dates Because the stddate must have a valid date in order to properly convert the date to the ccyymmdd format a value of 0 will be returned for any invalid dates An invalid date is any number of a particular date format whose date equivalent cannot be found on the calendar This means that if you attempt to extract use the stddate function against a value that is not a valid date then the extracted value will be 0 Days As with the stddate function the days function is also available to the Extract command You can convert any supported date to a Julian Day number in the following manner gt in ordfile gt def ship days 1 4 double gt def order days 1 4 double gt def delay 1 4 double gt ext order no gt ext ship days Sdays ship date gt ext order days Sdays order date gt ext delay Sdays ship date Sdays order date gt out neword link gt xeq IN 15 OUT 15 CPU Sec 1 Wall Sec 1 Invalid Dates If an invalid date is encountered the extracted value will be zero Therefore in the example above if the order has not yet been shipped ship date does not contain a valid date the resulting delay value will be negative Suprtool Commands 111 112
334. r after today The maximum number of days in either direction is 9999 yymmdd and Beyond 1999 Because dates spanning the turn of the century will not collate properly for the yymmdd form you need to use stddate to compare these dates gt item ship date date yymmdd gt if ship date lt Sdate 2000 12 31 will not work gt if S stddate ship date lt date 2000 12 31 will work Finding Invalid Dates Use the invalid function to find invalid dates An invalid date is a number in a date format whose date equivalent cannot be found on a calendar For example a month value of 99 would be considered invalid gt input sdfile a self describing file gt item deliv date date ccyymmdd gt if Sinvalid deliv date gt out baddates link gt xeq Stddate Function The stddate function converts any date format in nearly any data type container and internally converts it to the ccyymmdd format in a double integer container This allows you to compare dates with dissimilar formats and data types For example gt in orddets gt item order date date ccyymmdd gt item bill date date mmddyyyy gt if S stddate bill date lt order date gt output badords link gt xeq This feature is also available for dates that have two digit years The century portion of the date will be generated by stddate which uses the normal cutoff rules specified by Set Date Cutoff gt in invdets gt set date cutoff 20 gt i
335. r terminal and prints out some identifying information You will notice that your command prompt has changed to telling you that you have made it into STExport STExport expects you to type command lines ending each one with Return How to Xeq an STExport Task Normally you enter a series of commands These commands specify the Input file the Output file and the formatting options Finally you enter an Xeq or an Exit command This begins the actual STExport task If you entered the Exit command STExport finishes the current task then returns you to the operating system or the program that ran STExport SEXIT If you entered the Xeq command STExport finishes the current task then prompts you for another task This continues until you enter the Exit command If you wish to terminate STExport immediately perhaps you are confused enter Exit Abort This terminates the STExport program immediately without attempting any task Hardcoded File Names and ROBELLE Variable Suprtool Open 5 6 User Manual Some file names are hardcoded into STExport This section describes the hardcoded file names that STExport Open may need STExport will normally look for files in the opt robelle directory unless you set the ROBELLE variable ROBELLE Variable Normally STExport looks files in the opt robelle directory If you move STExport you must set the ROBELLE variable For example if you move STExport to the users robelle directory you must
336. races enclose comments in examples Braces are allowed for comments in actual Suprlink commands Example output repts temp produces job temporary Output Up lines separate alternatives from which you will select Sometimes the alternatives are shown listed on several lines Example TEMP ERASE In examples there is an implied carriage return at the end of each line Installing Suprlink Suprlink is installed as part of the Suprtool installation process See the Installing Suprtool chapter of the Suprtool User Manual for more details of how to install both Suprtool and Suprlink Hardcoded File Names and ROBELLE Variable Some file names are hardcoded into Suprlink This section describes the hardcoded file names that Suprlink Open may need Suprlink will normally look for files in the opt robelle directory unless you set the ROBELLE variable ROBELLE Variable Normally Suprlink looks files in the opt robelle directory If you move Suprlink you must set the ROBELLE variable For example if you move Suprlink to the users robelle directory you must set ROBELLE variable in the following manner export ROBELLE users robelle Suprtool Open 5 7 Welcome to Suprlink 289 Accessing Suprlink How To Run Suprlink To access Suprlink type the following command opt robelle bin suprlink SUPRLINK Copyright Robelle Solutions Technology Inc 1988 2013 Version 5 6 After a short pause Suprlink will take
337. railing spaces For example gt define long 1 125 125 character field gt extract long abcef Suprtool adds 120 spaces gt if long abcde Suprtool checks for trailing spaces Suprtool accepts the null string Suprtool pads it with spaces so this is an easy way to see if a field is blank gt if name if name is blank One problem with any tool that accepts strings is how to include a quote mark inside the string Suprtool offers two solutions 1 Use the opposite quote mark e g don t Suprtool Open 5 7 2 Whenever two quote marks appear in a string they are treated as a single quote e g don t Subscript A subscript is used to specify one of many fields in a repeated item Within Eloquence it is possible to specify repeated fields For example costs 5J2 The item COSTS consists of five double integers You select one element of a compound field by specifying a subscript in parentheses the first element is 1 not 0 For example if you wanted to select the input records where the second cost was greater than 10000 you would use gt if costs 2 gt 10000 The 2 portion of the command is the subscript The default subscript is the first sub item for Total Define Sort and If but the entire compound item for Extract Table does not allow subscripts it always uses 1 The If command has another syntax using up to three subscripts allowing you to refer to subfields without Define see t
338. reator password is used by default Because the open mode was not specified the database is opened in mode 1 Database Passwords in Batch In batch mode it is necessary to specify a database password without the password being echoed on the job stream listing A special database password is provided to allow for this When a question mark is used as the database password Suprtool prompts for the password on the next physical input line without echoing This occurs in batch mode or in session mode For example Suprtool Commands 83 gt base store 5 Suprtool prompts for the password Password gt Password is on this line but it won t gt get d inventory show on job stream listing or terminal gt exit Open Modes Base does not allow mode 7 for exclusive read access but it does allow mode 4 for exclusive update while others read Mode 4 disallows changes while you are extracting from the database Mode 3 for fully exclusive access is tolerated but causes Suprtool to use slow DBGETs to extract from datasets Suprtool allows you to open a second database in the Put command when you are copying from one database to another Eloquence Libraries If the Eloquence libraries have not been loaded Suprtool will print an error on the Base command To find out specific error messages as to why the libraries have not been loaded then just run Suprtool with the lw option which means print loader warnings 84 S
339. records and let Suprlink skip over the ones it doesn t need This method does a lot of sorts Sorting time can vary depending on system load and available memory but it increases dramatically for large records and large datasets You should try to use Suprtool s Extract command to reduce the record size and consider using Suprtool s If command to reduce the number of records Suprlink needs enough disc space to invert a significant subset of your database then link it into an Output file Although all of the Suprlink files can be job temporary you still need enough disc space for the original database the final Output file the primary Input file and each of the Link files One of the tradeoffs with this method is more disc space for faster elapsed time Another Example Illegal Digits Suprtool Open 5 7 From the sales records retrieve all of the sales for October 2000 and append the customer name salesman code and year to date sales total to the sales record these fields are located in the customer records S opt robelle bin suprtool gt open oracle demo reader gt sel from sales_detail gt extract custnum saledate saleamt gt if saledate gt 20001001 and amp gt saledate lt 20001031 gt sort custnum gt sort saledate gt output sales link creates SD file gt xeq gt sel from customer gt extract custnum name gt extract salesman ytdsales gt sort customernum gt output custs link g
340. ressions gt if Struncate stddev 100 1 07 gt 200 This function will also work in the Extract command gt def newdev 1 4 double gt ext newdev Struncate stddev 100 1 07 String Expressions You can do comparisons with byte type fields in numerous ways using Suprtool These powerful features minimize the number of tasks you must execute in order to select the data you need The fewer the number of tasks the faster your data is delivered to the users and applications that need it You can combine byte type fields together and use the built in string functions to create string expressions String expressions involve the operator and the other string functions such as lower upper trim ltrim and rtrim Fixed vs Variable Length Strings String comparisons are done using fixed and variable length strings For most users there should be no difference between the two types of strings When doing string comparisons Suprtool always pads shorter strings with spaces with the one exception of comparing two fixed length fields see Byte Fields below String expressions involving the operator or the Supper Slower trim ltrim and rtrim built in functions are done using variable length strings Suprtool keeps track of the length of every string and all operations are done using the actual string length For fields the length of the string is the length of the field If you do not want to retain all of the spaces in
341. rge documents The maximum size depends on the browser the version of that browser the operating system it is working on and how much physical memory is present on the client machine We suggest that you limit your Web pages to less than 1 000 lines and restrict the number of columns unless you are certain that your users can handle larger files This advice reflects not so much a limitation of STExport but a limitation of how Web browsers work Preformatted Format To preserve the columns and spacing of each output line use the HTML Preformatted option This option puts an HTML lt pre gt tag around all the data in the input file Most Web browsers will display preformatted text in a fixed width font such as Courier Therefore if you specify HTML Preformatted you should also select Columns Fixed Table Format Use HTML Table to create output in HTML table format STExport creates tables with a border between each column and row Tables make it easier to read tabular information but some older browers do not support tables If you specify HTML Table all byte type fields are left justified and all other fields are right justified If you use Heading Column or Fieldnames the column headings are specified with HTML table heading tags Most browsers highlight the column headings in some way such as bold text centered over the column Title All HTML documents must have a title By default STExport uses the title This is the Title Yo
342. rison operators for patterns matches and gt lt does not match The pattern is specified as a quoted string using the special characters listed below Embedded spaces are allowed in the pattern and must be matched in the target field These are the special characters Character Meaning Zero or more characters of any type A single numeric character A single alphabetic or numeric character Zero or more blank characters amp Escape character to match the next character explicitly amp looks for the character Reserved for future use Reserved for future use Any other character must be matched one for one name ZANDERG does name contain ZANDER anywhere name ZANDER ARMSTRONGG does name contain ZANDER perhaps other characters then ARMSTRONG name gt lt does name not contain numerics name qedit suprtool qedit or suprtool For more information see Special Characters in the Glossary Finding Special Characters With the Clean function you can clean bad characters inside of text fields however the Clean function does not report back what records were cleaned For this reason we have the FindClean function FindClean will return true if it finds a character defined using the Clean command This makes it extremely easy to find a set of Special characters that you can define gt in cleansd gt clean 9 10 gt if findclean n
343. rned after the same commands in Suprtool In this chapter we describe the STExport commands in alphabetical order Following each command name in brackets is the minimal abbreviation for the command For example I for Input and O for Output Abbreviating You may shorten the command to the first letter of the command name Sv verify x txeq Uppercase or Lowercase You may enter the letters in either uppercase or lowercase because STExport upshifts everything in the command line except literal strings within quotes abc and file names These two commands are identical SEXIT Sexit Comments on Command Lines Comments may appear at the end of any command line when they are surrounded by braces Many of the examples in this manual show comments at the end of each command line You can enter a comment as the only item in a STExport command line When continuing command lines the comment can appear before or after the continuation character S format reals with two decimal places Sinput invoices Sfloating fixed 2 Floating option Soutput invfile produces the file we want Sexit OS Commands STExport accepts non conflicting OS commands with or without an exclamation STExport Commands 237 S l1s Sls For commands that are the same in both STExport and the Operating System STExport executes the OS command only if you type the exclam For example set you get STExport set command set you g
344. rograms Note that for byte fields there can be only digits in the field If there are other characters such as or then Suprtool reports an error You can use the Link output option to easily see the fields that Suprtool creates For repeated fields e g 612 the first subfield is subtotaled if you don t provide a subscript You can combine the Count and Total options but the Count option must appear before the Total option You cannot combine the Total command with the Total option of the Duplicate command gt key 1 4 gt def field 5 2 integer gt duplicate none keys total field Input Output 1111 10 1111 1 10 2222 25 2222 2 60 25 35 60 2222 35 3333 4 48 3333 48 Deleting Duplicate Records There is no direct way to delete duplicate records Specifying both the Delete and Duplicate commands does not delete all duplicate output records This is because the Delete command occurs in the input phase as records are read and selected but the Duplicate command occurs in the output phase after the sort has taken place The Duplicate command is not part of the selection process it is the If command that determines what records are deleted A common mistake is to specify the Duplicate and Delete commands without an If command In this case Suprtool asks your permission to delete a input records Answer No to this question to abort the task It may be possible to remove duplicates from an input dataset using
345. rol B puts you into insert before mode Control A starts appending characters at the end of line Control A Control D plus spaces deletes from the end Control T ends Insert Mode allowing movement to a new column Control G recovers the original line Control O specifies overwrite mode needed for spaces Suprtool Commands 85 Persistent Redo Redo commands can be saved in a permanent file and can therefore be used from another session You can use the Set redo command to specify a filename to save your redo commands Please see Redo on page 206 for details 86 Suprtool Commands Suprtool Open 5 7 Chain Command C Selects an Eloquence dataset and a search path as the input source for the next extract For detail datasets the Chain command does a DBFIND on the specified search path and uses DBGET mode 5 to read the records For master datasets the Chain command uses DBGET mode 7 You must have read access to all fields in the dataset entry Only one Chain Get or Input command is allowed per extract task CHAIN setname search field value CHAIN setname search field table name When using Chain the size of the output file defaults to the size of the Chain dataset If the dataset is large and the selected subset is small you should use the Numrecs command to reduce the size of the output file Selection by Individual Values Suppose you want to find all the sales records for customer account 1234 Assu
346. ror in the Duplicate command You cannot combine the Total command with the Total option of the Duplicate command It is important to note that if the field being sorted is the result of a function then you may not be sorting on the value of the field after the function has transformed the field For example the following task may not give you the result you expect gt base store 5 gt get d sales gt def cust accountx 1 6 byte gt ext cust accountx Sedit cust accout zzzz99 gt sort cust accountx sorting on transformed field before it has value from function gt dup none keys gt output dsales gt exit In this instance you will not be sorting on cust accountx as transformed by the edit function but rather the first six bytes of d sales Therefore it is important to note when you are using extract to transform a field you will not be sorting on that transformed value Therefore the way to do the transformation would be to either divide into two tasks or if you can logically sort on the field before the transformation in order to achieve the result so the task could be gt base store 5 gt get d sales gt def cust accountx 1 6 byte gt ext cust accountx Sedit cust accout zzzz99 gt sort cust account Note sorting on source field gt dup none keys gt output dsales gt exit or if two tasks are necessary 102 Suprtool Commands Suprtool Open 5 7 Suprtool Open 5 7 gt base store 5 gt
347. rror as database editing eeececeeseesceeceecesetseeseceececeaeeaes database parameter cceeceeeecceeceeceteeeeseeseeneeneees database open mode database opening database output database password 0 0 0 cseeeeeeetereeeeeeeeeeeenees dataset end of file cc eee cccesecsecsseeeeeesteeeeeessees dataset highwater mark dataset Input sakani i dataset OUtPUt eee cceceeeeseseeeeceeceeceseeseeeeeseeseeneees datatypes a neeese t ae e EA E A E data types Oracle e sessessssessesersssssessrsesseeesrserseses Date command as Date command invalid dates ccccseeeseeeeereees 228 Date command separator character eee 227 date constants cceeesecssceesecseceseecsecsseeeeecsseeteeessees date format in List cccccccescecsecseeesseeneeeeees date format Date command date function of Extract date function OF The svcssdscoscssses eer E E date limits 97 136 143 Date option sena LOD date selection ccceesecscesseeseceteeeeees 132 date selection with ASK MANMAN ceeee 144 Suprtool Open 5 7 Date Setistisics sicccigesdiscvses s ecasaceussborssesasiiesisteesins Date Set option dates in the output file 0 eeeeeseeeeeeeceeceeeeseeaes 95 dates defining ee eeeceeseeeeeeceeceeceeeseeaeeeeeneeneees 142 ates relativen nsns re hanai S 133 days funtion snese a
348. rsessreresrrsesees 71 SCOUNTER eT E TA E A T AE T E E a a 71 TP Usa TeS ir a E NEE E EE E EA E tastier eaeheeatsiates 71 Extract Usa TEn i o ae a E EEN T E E O acl EE a e 72 SSUBCOUNT e E ee ig Be ei alee ea erg ee Pe E e E E ae 72 TE WS a ette cus aren Me cies dane acannon einen bela eee aon wo ees 72 Extract Usa Er as cie ee hove dees veaes od ENE aoe tay abet aacy See E wees 72 Examples for counter and subcount ccccccescesscesceeeeeeeeeeeeseeseecseensecseenaeeeeeseees 72 SSIGNED waiting eae as E E A EA ene ease ev peas ie aa posed ened artes 73 TF Usile in ane Aedes AE giana ee ee Suen woe es 73 Extract Sages ii ccs cutee Se Sees ieis E EN AE aes covey T Oe E EE een wes 73 Arithmetic Operations iis cs icives She as dene eine rate aia cane a ies ee ee eee Lee 73 thai MOM Pare Ses ate sei des de eheg eo i ah goes uelned eer epoca Hoe ag aoa ee en aes 73 TRU Sa Sets enh ty Me dasha ior iets ara titan nan Raa ans 73 Extract Usage ennn iie cin vison becdvacs sabe A O E oaa T ESA E Eiaa 73 Cotiversion Formatting ss a e e a E EEE A E EEE 73 SNUMBER ie e erea EE EE Ge ee A EE EG 73 Th USA EEE E EE E E EE AEAEE E 74 Extract USA ges ion aA EE EE AEN EE EE TE EEA 74 Data Examples i eree EEr EEEO E EA EnEn ET EE E E EE 74 SEDIT eerie teine Te EE E E EE deepen ee allie Sora EE 74 Tf USA SE horiei Eens E EE EEEE ERARE EEEE ET E EE E ER 74 Extract Usa Belice ceveeSececisdeivviaestecava cartusscassectats EREE ARE EE E EEA 74 Data Ex
349. rt infile filelsd suprtool oc lt lt EOD set varsub on in Sinfile table mytable char field file amp users robdev suprtool test Stablefile if Slookup mytable char field out file05 link exit EOD Suprtool examines a command line and looks for variables denoted by the sign Since Suprtool has some functions that begin with a sign these will take precedence regardless of the value set in the variable of the same name Suprtool Functions Suprtool supports environment variable substitution To use this enhancement you must do a gt set varsub on Over the years we ve grown the if extract function list to the point where it needs it s own documentation for both the if and extract commands Functions can be used in both the if and extract commands however some functions were sometimes written to either be specifically used in either if or extract but typically have an application in both UC4 Scripting and Functions UC4 is a scripting scheduling job system found on many platforms and is common on HP UX It also resolves environment variables for you when it runs your scripts Suprtool has a number of functions that require a sign in front of them making them look like variables This causes an issue with UC4 as it tries to resolve any variables So if a script has a lookup in it and lookup is not a variable then the lookup is removed for example what would happen is gt if Slookup mytable key
350. s gt xeq gt get m customer gt list standard title Customer List override title gt xeq gt get m customer gt list standard heading no column headings gt xeq Listings with Subheadings When using the Title or Standard keywords you can also include subheadings with the Heading keyword You can specify multiple columns by repeating the string after the Heading option e g List Heading First Second or specify the Heading option multiple times e g List Heading First Heading Second Being able to specify multiple columns makes it easier to align column headings when using the Standard keyword If you specify the Heading keyword without the Title keyword a default title is produced gt select from customer read this table gt extract account Z8 gt extract firstname X10 gt extract lastname X16 gt extract rating J2 gt extract status X2 gt sort lastname gt sort firstname gt list standard title Customer List amp heading Account First and Last Names amp i Credit m Status gt xeq List Device By default the List command lists lines to stdlist You can also redirect output to an attached printer To redirect to a file we have the file option List File The File keyword allows for the output from the List command to be directed to a file The List command also has a new option to Append to an existing file so you can have multiple reports in a
351. s amount gt xeq Running SubTotals Suprtool has the ability to keep a running subtotal for any numeric field based on a given sort key The target data must be a packed field with 28 digits in order to help avoid overflow issues A sample use of the subtotal function could be gt def mytotal 1 14 packed gt get orders gt sort order number gt ext order number gt ext part number gt ext description gt ext sales amount gt ext mytotal S subtotal sales amount order number gt out sales link gt xeq This would result in a file containing a running subtotal in the field mytotal for a given order number You could then generate a simple report with the simple Suprtool commands gt in sales gt list standard gt xeg The basic syntax for the subtotal function in the extract command is extract targetfield Ssubtotal field sort field You must specify the sort command before referencing the sort field in the subtotal function You can subtotal up to ten fields per task Suprtool Open 5 7 Quick Start Guide for Suprtool 33 Listing Records You can print selected input records either formatted or with the Octal Hex Decimal or Character representations To dump all sales records with a negative amount use these commands gt select from sales gt if sales_total lt 0 gt list lp gt xeq This finds the entries that meet the selection criteria and prints them to the default lin
352. s long and the string a is one When assigning the string expression to the target field Suprtool pads the final string value with spaces to fill out the target field String expressions longer than the target field generate an error gt in testfile gt def a 1 10 byte gt ext a I m too long for this container Error String is too long for the specified item String Truncation Suprtool produces an error if the string expression is longer than the target field You cannot override this error with Set Ignore On To help avoid the error you may want to trim the expression of trailing spaces before assigning it to the target field For example gt extract new field Strim a b c Upshifting Strings Upper Use the built in function Supper to upshift all the characters of a string expression into uppercase characters This function can be used to upshift a single field a complicated string expression or any subpart of an expression Both ASCII and Roman 8 characters are upshifted by Supper For example gt extract city up Supper city gt extract full name Supper first last Downshifting Strings Lower If you want to downshift all characters of a string expression to lowercase use the built in function lower This function can be used to downshift a single field a complicated string expression or any subpart of an expression Both ASCII and Roman 8 characters are downshifted by lower For example g
353. s n ENE AN E eee ea wholeness EE 335 C Samples neon is conde aE E e E NE E E E E ve twa walt E a EEST 338 Installing the Suprtool2 Interface 340 IETSIE IUT aE AES EAE EATE A E E E TEE 340 Suprtool2 Error Messages 341 Error NUMD6 s s ie n eeina enaiis 341 Glossary of Terms 342 C ommonly ysed TEMS renner oar e EE EE EE aE a E Ea 342 Special Characters lt i sscscccevesvsscchesgesteacycdecvoevevenincduscaverepscvees EEEE ESER SEEE EEE 345 Index 350 14 Welcome to Suprtool Suprtool Open 5 7 Welcome to Suprtool Introduction Welcome to version 5 6 of Suprtool Open the data manipulation handyman for Eloquence Oracle databases and fixed length data files Use Suprtool to quickly select and sort data records Combine multiple data files using Suprlink Use STExport to convert fields in a self describing input file into an output file that can be imported into other applications The Suprtool commands are Add EDit ITem Q Use BAse Exit Key REDO USERpause Before EXPort LINk Reset Verify Chain EXTract List SELect Xeq Clean Form LISTREDO Set OS command Define Get Numrecs SOrt expression DELete Help OPen TAble DO IF Output Total Duplicate Input Put UPdate The minimum abbreviation of each command is shown in capital letters Suprtool Components Suprtool Open 5 7 The Suprtool package consists not only of Suprtool but also of other programs that perform useful database functions These other programs are STExport and Supr
354. s with a dollar sign An ASCII string of up to 4 characters is entered in quotes The result of the last calculation is referred to using octal 12 or decimal 10 octal input and octal display format octal number that is really negative 1t 61626364 use result of last calculation lt 6162 97 98 ab 6364 99 100s ed Programmers who make use of the MPE DEBUG software are often frustrated with the format that Double Integer numbers are printed DEBUG prints them as two octal numbers Calculator accepts two octal numbers as input and prints the result in standard decimal format Suprtool Open 5 7 Suprtool Commands 227 335632 145000 treat as one double integer value Result 1000000000 0 3177777 177766 negative double integer value Result 10 0 Calculator Help It may be difficult to remember all of the various options that the calculator offers For this reason you can obtain a short description of the calculator by entering the following gives help prints a summary of functions 228 Suprtool Commands Suprtool Open 5 7 Suprtool Errors and Warnings Two Types Of Messages Errors Suprtool Open 5 6 User Manual Suprtool prints two types of messages errors and warnings In both cases Suprtool is letting you know that it has encountered a condition of which you may want to be aware This appendix describes both kinds of messages and gives a partial list of war
355. s you can put the command Set Oracle SpaceNull On into the file opt robelle suprmgr Oracle ZeroNull SET ORACLE ZERONULL ON OFF Initially OFF Set Oracle ZeroNull On will change any fields that are null in the SQL sense of the word will become zeroes for the appropriate number type In order to turn this feature on for all accesses you can put the command gt Set Oracle ZeroNull On into the file opt robelle suprmgr Previous to version 4 6 in Suprtool used to return nulls but Suprtool 4 6 and Suprtool 4 7 would return zeroes We have decided to make this optional and make the default to return Nulls due to problems when using the to_char function in the select statement Pattern SET PATTERN NEW OLD Initially NEW Prior to Suprtool for MPE version 3 1 there was no method of checking for the 2 or characters in a pattern Version 3 1 introduced a new pattern matching routine adding an escape character amp and two new reserved characters A and Old Suprtool tasks that look for the specific characters amp or will not Suprtool Open 5 7 Suprtool Open 5 7 work with the new pattern matching routine Users who are concerned about this can add the following command to their opt robelle suprmgr file set pattern old Prefetch SET PREFETCH number This command is not supported in Suprtool Open Privmode SET PRIVMODE ON OFF This command has no effect in Suprtool Open
356. same task every time it is run There are different ways you can pass parameters to a script so that it can do different things We will try to keep it simple and focus our attention on a specialized program Our application will display a list of all sales records created yesterday The information is stored in an Allbase database The table is called demo sales and has the following columns CUSTOMERNUM Decimal 8 N Packed DELIVERYDATE Decimal 8 y Packed PRODUCTNUM Decimal 8 N Packed PURCHASEDATE Packed SALESQTY Packed SALESTAX Packed SALESTOTAL Decimal 8 y Packed DeliveryDate and PurchaseDate are in yyyymmdd format Price SalesTax and SalesTotal have two implied decimals Z K zZz lt PRICE O y Packed Before you go any further you will have to decide where the new HTML file will reside When someone connects to your Web site the server software spawns child processes using a userid and groupid defined in the srm conf NCSA or httpd conf CERN configuration file This user must have read and write access to the Suprtool Open 5 6 User Manual Suprtool Open 5 6 User Manual directory specified in STExport s Output command This directory must also be accessible by the server software as defined in the configuration file For security reasons it is not recommended that you create these files in the server s root directory You can configure a default html directory for example userdir entry in CE
357. seeesseees 49 L labelled tapes ececcesceseeeeeeeceeceeceseeeeeseeseeneeneees 183 landscape OUtDUt cece ceeeeteeeeteeeeeeesetereeeeeeeeee 185 LaserJet leading sign oo eee eceeseesceceseeeeeeeceeceecaeeseaeeaeeneeneees less thant o 3 c 2ci Aen hoe AEA Libary Loading Libraries have not been loaded cceeeceeeeeeteeees 38 limits within Suprlink eee eeeeeeeeteeeeeeeeeeeee 313 Limits Set line feeds ies asied ce ei Mh ee Nie Link command cccccceccecseceeceeseeneeesees Link file maximum block size Link file maximum flelds ccccceseeeesseeeeeereees Link file maximum number Of c cecceeseeeeeee 313 Link file maximum record length 313 link key fields 298 Link option 162 linking files we QET list clears screen a192 List command we ISI Liste ViCO ive ceisssncexesrsceatveuaed te dtes tastes geretzesaneetees 155 List File ccccecsecescsssecsscessessecesessseceseseseesscesessneens 155 Suprtool Open 5 7 List Char option serinin a 151 List Column Headings List Date default List Date option List Decimal option ssseeessesiseeeereesrsrereererreressesee 151 List Duplex option sssssessesesssessrsersrsesssseseserseses 153 List FormFeed default List Heading option List Hex option List Leftjustnum option sseseseeseeeesesrerrererereesesee 152 List Noname Op
358. single file The File option takes the next parameter as being the filename 170 Suprtool Commands Suprtool Open 5 7 gt in test filelsd gt list stan file myslist gt xeq If the file myslist exists it will be over written unless you specify the Append option If you specify the append option the new report will be added to the file So if you want to incorporate multiple reports you just need to do the following gt in test filelsd gt list stan file myslist gt xeq gt in test file2sd gt list stan file myslist append gt xeq In this case the RECLEN parm merely tells the List command where to fold the lines The Reclen parm can be a value from 56 to 256 and defaults to 80 bytes gt List FILE myreport RECLEN 132 Device LP Use the LP option to send listings to the lp command The LP option assumes the list device is 80 columns wide gt list lp User Specified Device Use the Device option to specify a specific logical device for the listing The device name must appear after the Device option The device name is case sensitive so that the device SHIPPING is different than the device shipping The Device option assumes that the list device is 80 columns wide gt list device LP same as List LP gt list device serialp send to device serialp Listing to Attached Printer If you wish to list to a printer that is attached to your terminal use List Record Suprtool uses Record mode on your terminal or PC to
359. sks STExport treats any date that does not have a valid century year month or combination e g February 29 2000 as invalid You can specify how you want STExport to format invalid dates by using the Invalid option of the Date command If you specify Sdate invalid null STExport will produce a zero length field if you specify Column Variable and spaces if you specify Column Fixed If you want to specify an explicit string for all invalid dates do so after the Invalid option For example date invalid 3 will cause STExport to produce a string of five percent signs for any invalid date Example First use Suprtool to create the input file with the appropriate date attributes gt get d sales gt item deliv date date mmddyyyy gt item purch date date mmddyyyy gt output dsales link gt xeq Then use STExport to read the dsales file Specify Date ddmmyyyy which causes all valid dates to be formatted in day month year format with a dash as the separator input dsales Sdate ddmmyyyy Soutput dexport Sxeq Suprtool Open 5 6 User Manual Decimal Command DEC Specify the format for the decimal place in numeric fields DECIMAL PERIOD COMMA Default Period The fields in the input file The Decimal command specifies what separator must have been created with will be used to indicate the decimal place in decimal places using numeric fields In North America the custom is Suprtool s Item comma
360. st gt def cust_number 1 6 byte gt def item_no 7 10 byte gt def sales 18 4 double gt extract cust number gt extract item no gt extract sales gt add customer gt exit open SQL database input file you wish to add redefine the items to match the names in the table extract data under the column name specify the Oracle table execute the task open SQL database input file you wish to add redefine the items to match the names in the table extract data under the column name specify the Oracle table execute the task Final example shows use of the Ownername with the Tablename gt open oracle scott tiger gt in custrecs gt add scott customer gt exit open SQL database input file you wish to add specify the Oracle owner and table execute the task Suprtool Open 5 7 Base Command BA Suprtool Open 5 7 Opens a specified Eloquence database Once you have it open you can extract data from datasets delete entries load new entries into datasets and Update certain entries To close the current database use Base without parameters BAse host service database Open an Eloquence database close current base Suprtool will open an Eloquence database the syntax has been improved to allow you top optionally specify the hostname and or service to connect to a given database base sample 5 base eloqdb sample 5 base hostname robelle com eloqdb sample
361. st 197 TtemAbbreviate Dates do ea a a a a E A a a at 197 Hem Losk era a a a leat A et e a 197 EREKSI RENO NA AEE A E E E E E a ee 198 Labelled TapeRewitid oa aneri e e E E TE EE A 198 WEST 001 yes E E A E S E E E E EA 198 Table Size anena e E A A E A Aa 198 ReadOnly a cen ascot Ee ea tans ER OERE T E A 199 BT E E E EEE E EE ees en i ek pda as E eevee ea 199 IBSA BY 1 re ee E A E E S E E E E E EA 199 Eist POD aa AE E E OT O A E E LR 199 TSAA DE na E E E Te A A E ET 201 List Form Feed sraa EA deca e EE A E ERA 201 TSOCK AE E E A A EE E AE AE ea UL 201 MakcAbsent nanana en aeons hee ae asp EE 201 INES 25s oe Face E Ses Soest ee ES Bee ees 201 N M BUG oes RE E E EE E ONE EE EE Esai 202 OPEMIMNO ME enoi ai E DEEE EEEREN EEE nET SOKE E E 202 Oracle ROWS enoa AENT NE Oi GE 203 Oracle Inte teren ai E E E REEERE REEE na EEKE REEE 203 Oracle OPen FIX nira E EE E EAEE E na TEE EEEE E EE 203 Oracle Pass Shifter n A E Rives A E E S 204 Oracle SpaceNull eier nr s n o oi EREE cubevevaiecwesvisatuseoseccemasctcsa devotees 204 Orce ZeON E A E AAS 204 Patte rieeo aneen AE N A ANNE ene eos 204 TEAL NEA LOA Hs EREE ev EAE denen A EEA AAEE ES E EET 205 PHI VIMO GG yess E E EIEE E T E OE E E E TAT 205 PEOSTOSS eichevene eds O A E A E EEA 205 PrOD eea E E A E EEEE 206 RealMap niera ea a E R A EE 206 RECOVER eree T A E a ENN 206 1 PEL VOEO EE P ANE ET EEE E AE ET E ET 206 SDEX UMAME a A E O E EE SEEE 207 Sonas E eaa A e E E R EE 208 SQUCEZ EA E ert eaten E A E
362. st turn on editstoperror gt set editstoperror on This will force Suprtool to stop if there is data left over to place when applying the edit mask With numeric type fields leading zeroes do not cause overflow With byte type fields spaces do not cause overflow Eofread SET EOFREAD ON OFF This command has no effect in Suprtool Open FastRead SET FASTREAD ON OFF Initially ON some versions Testing has shown that the CPU time can be improved by anywhere from two to five times and Wall time has improved anywhere from two to six times faster You can enable or disable this feature for all runs of Suprtool on your system by putting the command Set FastRead On Or Set Fastread Off into the file opt robelle suprmgr This means that Suprtool will use the faster reads for all runs of Suprtool Filecode SET FILECODE number This command is not supported in Suprtool Open Suprtool Commands 195 196 Suprtool Commands Filename SET FILENAME Help Link Edit Hint Export Outcount filename Currently the only filename relevent to Suprtool is the Outcount filename set filename Outcount myoutcount Firstrec SET FIRSTREC 0 1 This command has no effect in Suprtool Open Hints SET HINTS ON OFF This command has no effect in Suprtool Open HPUXCmdErr lt string gt SET HPUXCmdErr lt string gt Initially Spaces Some OS s are different in terms of whether or not a
363. stage QUERY QUERY creates a self describing output file A self describing file is a data file plus an extra file which contains information about the structure of each record in the data file This extra file is created with the output file name plus the extension sd This sd file contains the name type length and offset of each field in the data file QUERY self describing files have no provision for repeated fields These fields appear with an unknown type in the sd file See the LINK option for a better self describing file format The QUERY option produces a file that is similar to the file produced by the SAVE command in the MPE QUERY program LINK The QUERY output option has some major drawbacks Compound fields are not handled date and decimal point information is not saved and sort information is not Suprtool Commands 177 178 Suprtool Commands part of the file description The LINK option produces a self describing file that solves all these problems This option is the recommended way to generate files for Suprlink We are also encouraging third party software vendors to accept this format To convert a self describing file back into a non SD file simply purge the corresponding sd file NUM QUERY NUM QUERY creates output records in QUERY numbers format This is an undocumented feature of QUERY that is used by some application packages Records in a numbers file contain the dataset number and th
364. syntax must be separated by a period or other special character While typically Oracle syntax typically only allows for just the the syntax parsing in Suprtool is such that several special characters will be allowed such as lt gt which will work as the separator between the Ownername and Tablename Although this may seem like incorrect behaviour it was the best way to allow for backward compatibility and not breaking our other parsing behaviour and is documented here for completeness Examples The first example shows a typical Add task A self describing file s records are added to the table called customer This assumes that the self describing file has the same structure and that the field names are the same as the column names gt open oracle scott tiger open SQL database gt in custrecs input file you wish to add gt add customer specify the Oracle table gt exit execute the task Our next example shows how to add by redefining the fields from a self describing file into a table The names are redefined so that the field names being extracted will match those in the table of the SQL database Suprtool Commands 81 82 Suprtool Commands gt open oracle scott tiger gt in custrecs gt def cust_name custname gt def cust_addr address gt extract cust name gt extract cust_addr gt add customer gt exit Another example shows input from a flat file gt open oracle scott tiger gt in salehi
365. t Losing Records Delete can be combined with other operations such as select sort write to output file and even a Put to another dataset Care must be used when combining operations because such combinations cannot be restarted if the Suprtool run is aborted for any reason including hitting Control Y and answering yes See Suprtool and on page 48 for more details on using the Delete and Put commands in combination Suprtool deletes records during the input phase This means that records are deleted before they are sorted All of the selected input records are deleted before the first output record is written when sorting the input If you press Control Y and answer yes before a delete task has completed there may be no way to recover your deleted records Warning Message When deleting records from the input dataset Suprtool asks for permission to delete all records if there is no If command to select the records to be deleted Delete all records from the D SALES dataset no Respond Yes for the task to continue In batch mode Suprtool assumes Yes and keep processing Note that if there is no If command but there is some other command to limit the number of records deleted e g the Numrecs command or a record range on the Get command Suprtool still asks the question implying that all records in the dataset will be deleted In these cases only the records that are read based on the limiting factor will be d
366. t from sales order by cust _account gt output result gt xeg Sorting in the Sort command gt select from sales gt sort cust_account gt output result gt xeq Sort Records in Descending Order This example extracts all records from the Sales table into a data file called result The records are sorted by the field sales_total in descending order i e show highest totals first Use the Desc option in the Sort command to do this gt select from sales gt sort sales total desc descending order gt output result gt xeq Sort by Multiple Keys This example extracts all records from the Sales table into a data file called result The records are sorted by the field cust_account then by sales_total in descending order Use two Sort commands to do this because the Sort command only accepts one field at a time gt select from sales input gt sort cust_account first sort key gt sort sales total desc second sort key gt output result output gt xeq Duplicate Records In the following examples the key field is in the first four bytes of the record Duplicate ness is based on records having the same key value In any group of records with the same key value the first record is considered to be the original and the rest are considered to be the duplicates Report without Duplicate Records This is an example of filtering out duplicated records the original remains This is done
367. t a AE A E dee hes 78 Uppertcase or LOWercase iis cscves eee en e e aE e A E EER E T 78 Multiple Commands per Eines eeen E ETE E EE E ARS 78 Contn atl OM sarerea r E a e E iets aes beams Ea ER E ET 79 Comments on Command Line Sr aeeoe E D e EE E R E E E 79 OS Commands iic2ccecscchccde eere AE EPEE ENAERE RE EENS EEKE cvsagennesustostadisneccss EESE ENEE TENSE 79 Cale lator cree cs ec eae aeea Er e teas ee Ea EEAO T a EnA Oa A E EE ENF 80 Controls Interrupt eee e a aaa agers aa aaa a a tait 80 Add Command Add ccccccccccsscccssseeessececessececseeeeessececesaeeeceeeeessaeeecesaesesaeeesnsueseseaaesesaeeenes 81 INQUCS AAEE EA ISET N ETAN EN ates tes sates sacenicess te cue TN 81 Example S ssc a hced CA caveats cde ssteace sate dessuedecs N secsteestiveconeasviseavtedentuns E a e mates 81 Base Command i aya S MAE A EA ET E EOE id sles T TTE ele 83 Before Command B E E E EEE E E E TEA 85 Chain Command K EA PEA EET E EEE NE T TTE et 87 Clean Command CE a e AA ills A Ene ea rE at alee 89 Removing Bad Characters ccccessccesceceseessseceeeecneceeceeeeeeesaecececeaeeeaeceeeecneeseaeeeeeeenas 89 Define Command D 2200 ein Rat aia ein ALA Lis 91 Delete Command DEE nicn iis Ae Rl eh ee AS tle ivi 96 Do Command DO ren nan eid Ail Ritesh ii NS RIAA Rei Bis 98 D plicate Command DU iene ooh Bi Rieti ee I A sets 99 Edit Command JED Jar rari a ee iil ih ARI eee 104 ExitCommand E nrnna a eh ee A aed 105 Export Command
368. t are used to assist and help perform some arithmetic operations Purpose is to not round a given result or arithmetic expression or number Suprtools default behaviour is to Suprtool Issues and Solutions 69 round a result the S truncate function will change that behaviour If Usage if Struncate qty price 100 100 Extract Usage extract new _price truncate qty price 100 ABS Purpose is to return the absolute value of a given number IF Usage if Sabs credit field 5000 Extract Usage extract newnum Sabs credit amt TOTAL Purpose is to provide a running total for any numeric fiel fiel ld and deposit the result into a packed decimal ld IF Usage Not commonly used in if Extract Usage define mytotal 1 18 packed ext mytotal Stotal sales amount SUBTOTAL Purpose is to provide a running total for any numeric fiel fiel ld and deposit the result into a packed decimal ld The target packed decimal field is reset to 0 on a control break on the specified sort field 70 Suprtool Issues and Solutions Suprtool Open 5 7 IF Usage Not commonly used Extract Usage define target 1 18 packed sort sort field ext target Ssubtotal fieldtototal sort field Example of TOTAL and SUBTOTAL gt in filelsd suprtest gt def mytotal 1 14 packed gt def mysubtotal 1 14 packed gt sort char field gt ext char field gt ext int field gt ext myto
369. t count contains the number of times each cust_account occurred while st total 1 contains the total sales for each cust_account Sort by Count or Subtotal When Suprtool counts or subtotals the output is sorted according to the key fields If you want your output file to be sorted by the count or by a total you must process the output file with a second task The following example sorts the previous file of totals by ST COUNT We choose a descending sort sequence so that we can see first the customers with the largest number of orders 32 Quick Start Guide for Suprtool Suprtool Open 5 7 gt input result input from previous task gt sort st count desc highest counts appear first gt list standard produce a simple report gt xeq Total by Field If you want to get a single total for a field without caring about subtotals on sort breaks you can use the Total command Total prints out the result on stdlist For example to compute the total sales value for 2000 transactions use these commands gt select from sales gt if purch_date gt 000101 and purch_date lt 001231 gt total sales total gt output Snull gt xeq Running Totals You can get a running total on a field using the total function The target data must be a packed field with 28 digits in order to help avoid overflow issues A sample use of the total function could be gt def mytotal 1 14 packed gt get orders gt ext mytotal total sale
370. t exit S opt robelle bin suprlink t tinput sales link sales link custs to custs toutput repts producing REPTS t xeq run the task form repts fields in repts texit Smyprog run program rm sales these files rm custs no longer needed Srm repts Whenever Suprlink is processing files with packed or zoned decimal keys errors can occur because of invalid digits in the keys Suprlink reports the input and link record numbers with illegal digits and processing stops You can use Suprtool to examine input and link records by using record selection with Suprtool s input command A packed decimal number consists of nibbles there are two nibbles in each byte The last nibble is the sign of the number The remaining nibbles must Introduction to Suprlink 297 each contain a number in the range 0 9 A zoned decimal number must have a valid digit in each byte and end in 0 9 A R or To remove or edit numbers to be valid display values please look at Suprtool s number function Selecting Non Matches Consider a common problem easily solved with Quiz from Cognos finding all records in a file which have no corresponding records in a related file For example to find all records in an invoice lines file with no corresponding invoice master record the following Quiz code could be written gt access lines link to header optional gt select if not record header exists gt report in
371. t extract city lower case Slower city gt extract city state Slower city state Trimming Spaces Using Trim LTrim RTrim Use one of three built in string functions to remove leading or trailing spaces from a string expression The three functions are Trim Remove leading and trailing spaces from the string expression LTrim Remove leading spaces RTrim Remove trailing spaces Splitting Variable Length Strings Suprtool can extract portions of a byte field based on the occurence of certain characters Consider the following Data Suprtool Commands 117 118 Suprtool Commands Armstrong Neil Patrick Green Bob Miller Edwards Janine Armstrong Arthur Derek The split function can extract each token into separate fields The syntax for the split function is Ssplit Field Start Character Occurence End Character Occurence The following task will split the data in the wholefield into three separate fields gt in namefile gt define lastname 1 30 gt define firstname 1 20 gt define middlename 1 20 gt extract lastname split wholename first gt extract firstname Strim Ssplit wholename gt extract middlename Strim S split wholename 2 2 gt out names link gt xeq The first extract statement tells Suprtool extract the bytes from the field wholename starting at the beginning first keyword and stopping at the character The second extract statement
372. t field has an item command definition of two decimal places Suprtool will handle the data Raw data accordingly Raw Data Result of Snumber 5 10 5 12 5 14 Purpose is to format a number or byte string field toa particular format using an editmask similar to the syntax found in Cobol into a target byte type field Primarily designed to help format data for list and or reports If Usage if Sedit somefield S 99 5 00 Not commonly used Extract Usage ext byte field Sedit dbl field 99 ext byte field Strim Sedit dbl field S S5 99 Data Examples 500 5 00 74 Suprtool Issues and Solutions Suprtool Open 5 7 Other Functions LOOKUP Purpose is to determine if a key value has been loaded into memory with options to reference associated data If Usage if Slookup is capable of determining if a key value exists and also compare against a field specified with the data field table tablename key file filename if Slookup tablename key table tablename key file filename data data field if Slookup tablename key data field inputsrcdatafield Extract Usage table tablename key file filename data data field extract target field Slookup tablename key data field NULL Purpose is to return true or false if an Oracle field has Nullness open oracle suprtest suprpass select from filel if Snull somefield READ Purpose is to
373. t four digits are the warehouse location the second four digits are the bin number and the last four digits are a serially assigned number Use the offset parameter to define new fields that are relative to the start of the part number The file INVOICES is a self describing file gt in invoices part is 12 bytes gt def warehouse part 4 warehouse starts at part gt def bin part 5 4 bin is second four bytes gt def release part 9 4 release is the last four bytes gt if bin 100 use any field for selection Note that redefining the digits of a larger numeric field only works when the field is a character field type X U or A Relative Example Combining Subscripts and Offsets If we have ten part numbers combined into one field e g 10X12 we can still define a single field that corresponds to the bin number of one of the parts 94 Suprtool Commands Suprtool Open 5 7 The Extract command may be used for data conversion See the Data Conversion section of the Extract command for details Suprtool Open 5 7 gt in invoices allparts is 10X12 gt def bin3 allparts 3 5 4 we are checking starting at the fifth byte gt if bin3 100 of the third part Notes The purpose of the Define command is to tell Suprtool to look at a portion of the input record in a certain way For example if the record contains ASCII digits in the first ten bytes Define could be used to assign a field definition t
374. t item monthly totals 5 decimal 2 Error Missing attribute for the Item Command When to Specify the Item Command The Item command affects almost all other Suprtool commands It should be used as follows For databases specify it immediately after the Select command but before any Extract or If commands Suprtool Commands 161 For disc files it is best to specify the Define and Item commands immediately after the Input command Usefiles You can use a usefile as a mini data dictionary for Suprtool For databases it is a good idea to put all the Item commands associated with a database into a usefile After the Base command has been specified the usefile can describe the items in the database to Suprtool For disc files you can put both the Define and Item commands in a usefile and execute them right after specifying the file with the Input command If you use the Link output option both date formats and implied decimal places are saved in the self describing file so they never need to be specified again base store use store usefile 162 Suprtool Commands Suprtool Open 5 7 Key Command K Suprtool Open 5 7 Specifies the next sort field for an extract task using an explicit byte position in the record not a field name See the Sort command for specifying sort fields by table column name or Defined field or by field name in an SD file Up to 20 Sort and Key commands may be specified per extract task the first is the
375. t specify the Ciupdate option and CIUPDATE must be On or Allowed in the database Example This example selects all inventory items with a unit cost less than 10 00 and increases the unit cost by five percent gt get d inventory input dataset gt item unit cost decimal 2 implied decimal places gt if unit cost 10 00 selection criteria gt update Update must come before Extract gt extract unit cost calculate the new unit cost unit cost value gt xeg This next example selects all inventory items with a part number of 12345677 and changes it to 12345678 gt get d inventory input dataset gt if product no 12345677 selection criteria gt update ciupdate gt extract product no 12345678 new unit cost value gt xeq You can set CIUPDATE by using the DBUTIL Utility To set CIUPDATE on just run Dbutil and use the Set command run dbutil pub sys gt gt set dbname ciupdate on gt gt exit Notes The only commands that can be combined with Update are selection commands e g the If command The following commands are not allowed Delete Duplicate Key List Output Put Sort or Total You cannot update critical fields in master datasets Update does not work with disc files or SQL databases If you are updating a packed or display field remember that Suprtool uses unsigned values for non negative numbers unless you add a leading plus sign to the number See Packed and Display Constants
376. ta price gt get part master gt if Slookup newprices prodno gt update gt extract price S lookup newprices prodno price gt xeq We do the If lookup to select only the parts which have new prices then do Extract with lookup to replace the existing price with a new one The Update command forces a database update on each selected record and must come before the Extract command Now let s see how a Table can be used to add additional useful information to a record Let s say we build this table of Canadian provinces The file prov file is 120 Suprtool Commands Suprtool Open 5 7 assumed to be a Link or self describing file created by a previous pass of Suprtool gt table provtab prov code file provfile data prov name At this point the key into the Table is the prov code item and for each entry in the Table there is one associated prov name To append prov name to each output record we read the customer dataset extracting the customer name We also Define prov name as a new field and extract it for the output record but we fill it with a value that is based on the prov code for each customer entry customers cust name full prov name 1 30 full prov name S lookup provtab cust prov code prov name somefile To update a dataset you do the same commands but you insert an Update command prior to the Extract from a Table Below is an example that shows how to update an Eloquence record using data val
377. tain a week s worth of transactions Each night the transactions from a week ago are moved to the monthly dataset D SALES MON The D SALES and D SALES MON datasets have exactly the same field declarations The following Suprtool task would move one day s transactions from D SALES to D SALES MON gt base store gt get d sales read the weekly dataset gt if purge date 000401 select one day s transactions gt put d sales mon adding them to the monthly dataset gt exit For the next example we assume that the D SALES MON dataset is in a different database gt base store gt get d sales gt if purch date 000401 select one day s transactions gt put d sales mon ostore add to OSTORE database gt exit the output file defaults to null This example shows how Suprtool can read a disc file and Put each record in a database gt input dsales dsales has exactly the same format gt put d sales store as the d sales dataset gt exit Notes If the dataset selected for output is a master dataset it is possible that some of the output records may be duplicate key values If this happens Suprtool prints an error message and terminates the task unless you have enabled Set Ignore in which case the duplicates are counted and reported at the end of the task Duplicate records are not written to the output file Suprtool Open 5 7 Q Command Q Prints a message on stdlist Q string Default print a bl
378. tal Stotal int field gt ext mysubtotal subtotal int field char field gt 1li gt xeq gt IN FILE1SD SUPRTEST GREEN gt OUT SNULL 0 CHAR FIELD 11111 INT FIELD MYTOTAL TELA MYSUBTOTAL 1111 t MQ at ct ct gt IN FILE1SD SUPRTEST GREEN R F 22222 3333 2222 SUPRTEST GREEN 22222 5990 4444 SUPRTEST GREEN 33333 8888 3333 SUPRTEST GREEN 33333 12221 6666 SUPRTEST GREEN 33333 15554 9999 COUNTER Purpose is to provide a running counter starting from 1 and the target result field is a double integer IF Usage Not commonly used Suprtool Open 5 7 Suprtool Issues and Solutions 71 SUBCOUNT Extract Usage define mycounter 1 4 double Purpose is to provide a running counter starting from 1 and the target result field is a double integer Th counter is reset when the control break occurs on the specified sort field IF Usage Not commonly used Extract Usage define mysubcount 1 4 double sort customer no ext mysubcount Ssubcount customer no Examples for counter and subcount in filelsd suprtest def mycount 1 4 double define mysubcount 1 4 double sort char field char field t mycount Scounter mysubcount S subcount char field 72 Suprtool Issues and Solutions Suprtool Open 5
379. taset Suprtool prints the path information in DBSCHEMA format The path shows the related master dataset and the sort item name When displying the form of an Eloquence dataset Suprtool shows the capacity in a format similar to the one in DBSCHEMA Suprtool Open 5 7 Suprtool Commands 131 132 Suprtool Commands gt form orders Database SAMPLE ORDERS Set 4 Entry Offset ORDERNO X16 T ORDERID I2 17 ID ORDERDATE I2 21 CUSTNO X6 25 CUSTOMERS ORDERSTAT T1 31 ORDERTY PE X2 33 ORDERVALUE E4 35 Capacity 1008 0 0 0 O Entries 47 Highwater 0 Bytes 42 Master Datasets The Form Sets command indicates which datasets have MDX enabled A Form command on these datasets shows details of their expansion setting gt form parts Database SAMP PARTS Master Set 2 Entry Offset PARTNO X16 1 lt lt Search Field gt gt PARTLOOKUP X10 17 DESCRIPA X20 27 DESCRIPB X20 47 PARTUNIT X2 67 PROF ITGROUP X4 69 MATNUMBER X16 T3 PRICEUNIT X2 89 PRICEL E4 91 PRICE2 E4 99 Capacity 524 Entries 182 Bytes 106 SQL Select When showing the form of an SQL select Suprtool shows the column s name the SQL type and the Suprtool type When showing the form of a self describing file Suprtool shows the byte offset of each field after the subcount type and sublength The first field always appears at offset one gt open oracle scott tiger gt select from emp gt form Column Name Oracle Type Suprtool Type E
380. ted with North American letter size paper This is especially true with PCL 5 for A4 paper it reduces the horizontal spacing between characters so that 80 columns of Courier output fits on a single line In addition if you add 2000 to a PCL code Suprtool adjusts the number of rows and columns for that option to match A4 paper For example to print Landscape on A4 paper use PCL 2004 instead of PCL 1 In general selecting A4 paper gives you more space along the long side of the paper and less space along the short side If you are happy with the way letter size rows and columns work on A4 paper simply do not add 2000 to the PCL code Roman 8 vs ASCII The PCL option requests a Roman 8 character set but some combination font cartridges only supply the ASCII character set half as many characters means twice as many fonts in a single cartridge If you ask for Landscape Lineprinter and get Landscape Courier instead your Lineprinter font probably has the ASCII character set instead of the Roman 8 character set To request an ASCII font add 1000 to the PCL code For example if you have a Super Cartridge 55 fonts in one use PCL 1001 1004 and 1006 To select both ASCII and A4 paper add 3000 Double Sided Printing on LaserJets The LaserJet IID and MID can print on both sides of the paper The Duplex keyword enables double sided printing on these printers gt list duplex Headings in Listings Specifying a Title in the List command
381. tells Suprtool to extract the bytes between the first occurence of the character to the next occurence of the character and then that string is trimmed of spaces as it is nested within the trim function The third and final extract statement tells Suprtool to extract the bytes beginning with the second occurence of the character to the second occurrence of the space character If the target field is not long enough to hold the data Suprtool will abort with an error You can easily prevent this from happening on blank fields by nesting the split statement within a trim or rtrim function First Last The split function also has a Last keyword whereby you can split the field from a given occurrence of a character to the end of the field So in the given example from above the extracting out of the middlename could be coded as such gt extract middlename Strim S split wholename 2 last The above means to extract out all the data from the second occurrence of the to the end of the field and trim all spaces Naturally as noted above we also have the First keyword which indicates the start of the field Unprintables You can specify an unprintable character for Suprtool to use as the character to split on using the following syntax gt extract middlename Ssplit wholename 9 2 last This means that the split would start at the second occurrence of Decimal Nine or the Tab character Please note that for speci
382. tem cal date date ca If you do not like this feature you can turn it off by specifying the following command in your Suprmegr file Suprtool Commands 157 158 Suprtool Commands Data Types for Dates Each date attribute is compatible with certain data types For more information see the table on data types in the Define command The following table shows the compatibilities Date Attribute Data Type Compatibility ASK Jl and K1 Calendar Jl and K1 ddmmyy X6 Z6 J2 K2 and P8 or greater ddmmyyyy X8 Z8 J2 K2 and P10 or greater mmddyy X6 Z6 J2 K2 and P8 or greater mmddyyyy X8 Z8 J2 K2 and P10 or greater Oracle X7 PHdate J1 K1 J2 and K2 yymm X4 Z4 Jl and K1 yymmdd X6 Z6 J2 K2 and P8 or greater yyymmdd J2 P8 yyyymmdd X8 Z8 J2 K2 and P10 or greater ccyymmdd X8 Z8 J2 K2 and P10 or greater ccyymm X6 Z6 J2 K2 and P8 or greater yyyymm X6 Z6 J2 K2 and P8 or greater aammdd X6 aamm X4 mmddaa X6 ddmmaa X6 ccyy X4 Z4 Jl and K1 SRNChronos X6 mmyyyy X6 Z6 J2 K2 and P8 or greater yyddd X5 Z5 J2 K2 and P8 or greater ccyyddd X7 Z7 J2 K2 and P10 or greater HPCalendar J2 K2 EDSDate J2 P8 JulianDay J2 PHdate8 J1 K1 J2 and K2 Date Limits The date function in Suprtool can generate dates between the years 1583 and 2583 Some date formats have limits based on their particular format such as 2027 for a Calendar date and 2259 for the aammdd aamm mmddaa ddmmaa dates
383. tem invoice date date yymmdd gt item close date date mmddyyyy gt if Sstddate close date lt Sstddate invoice date gt out badinvs link gt xeq In this case all invoice date values with a yy portion between 20 and 99 will have a 19 for the century All invoice date values with a yy portion of less than 20 will have 20 for the date generated by the stddate function Invalid Dates A date must be valid before stddate can convert it to the ccyymmdd format Otherwise a value of 0 will be returned for any invalid dates An invalid date is a Suprtool Commands 149 number in a date format whose date equivalent cannot be found on a calendar This includes dates selected by the invalid function We can eliminate the invalid dates from the above task by changing the If command slightly gt input sdfile gt set date cutoff 20 gt item invoice date date yymmdd gt item close date date mmddyyyy gt if not Sinvalid close date amp or not Sinvalid invoice date amp and Sstddate close date lt stddate invoice date gt out badinvs link gt xeq In this example if either the close date or the invoice date are invalid then they will not be evaluated by the stddate function and will not be selected Although your requirements may be different you need to remember that invalid dates evaluated by the stddate function will return a 0 value Days Function Suprtool supports a days function which conv
384. tem my yymmdd date date yymmdd define new ccyymmdd date 1 4 double ext new ccyymmdd date S stddate my yymmdd date Purpose is to convert any supported Suprtool date toa number of days since 4713BC or Julian Day format Main purpose in if is to compare two dates and get the diffference Main purpose in extract is to typically transform a date to be so many days away from the current date value If Usage if Sdays entry date Sdays order fulfill date gt 30 Extract Usage extract new date Sstddate days entry date 10 the footer can be used anywhere Suprtool Issues and Solutions 77 Suprtool Commands General Notes 78 Suprtool Commands When you run Suprtool it prompts for commands with a gt character and reads command lines from the standard input device Suprtool commands contain a command name which may include one or more optional parameters that are each separated by commas In this chapter we describe the Suprtool commands in alphabetic order Each command name is followed by its minimal abbreviation in brackets For example D for Define and DU for Duplicate Most Suprtool commands work within the context of the input file In general the Base Chain Get Open Select and Input commands must be entered before other commands Once the input source has been specified commands can be entered in any order Abbreviating You may shorten the command name to any substring that uniquely
385. tempting to extract a single constant value and not an arithmetic expression To specify an arithmetic expression that starts with a constant surround the expression with parentheses For example Incorrect gt extract c 6000 cost Error Missing comma or invalid arithmetic expression Correct gt extract c 6000 cost Numeric Truncation The accuracy of arithmetic computations is limited to approximately sixteen digits Suprtool may truncate four word integers quad or large packed decimal numbers or display numbers when they are converted to floating point Suprtool does not produce any error or warning in this case Abs function Suprtool supports an abs function which returns the absolute value of a number For example if a field called Credit contains the value 547 83 the abs function returns 547 83 This function will work on a field or even on an expression such as gt def newcredit 1 4 double gt ext newcredit Sabs credit 100 1 07 This function will also work in the If command gt if Sabs credit 100 1 07 gt 500 00 Truncate function Suprtool supports a truncate function which returns the number to the left of a decimal place For example if the field stddev contains the value 547 83 the truncate function will return 547 Note that there is no rounding This function will work on fields and expressions For example Suprtool Open 5 7 gt def newdev 1 4 double gt ext newdev
386. the command line The final Exit command can be in uppercase or lowercase but cannot be abbreviated OS commands can be passed into the interface and Suprtool will execute them Welcome to Calling Suprtool 333 Priority This setting has no effect on the Open version and is included solely for compatibility reasons Maxdata This setting has no effect on the Open version and is included solely for compatibility reasons Print State If the supr print state contains AL the output from Suprtool will always be printed on stdlist If the state is NE the output will never be printed If the state is ER or blank the output will be printed only if Suprtool aborts due to an error Total Type The supr total type determines the format of the supr totals array If you call Suprtool2 from COBOL you should use CO The COBOL format is display with leading zeros and a trailing sign If the type is AS each total is returned left justified in the total field with a leading sign Totals If you specify the Total command as part of an extract task Suprtool2 returns the totals in the supr totals array Totals are returned in exactly the same order in which they were specified If you are calling Suprtool2 from COBOL never specify the decimal precision portion of the Total command If your total includes an implied decimal point you will have to modify the supr totals declaration to include an implied decimal point e g pic s9
387. the value occupies The value portion must match the type of the field String values will be extended with blanks to fill the entire field If the input data does not have a field of the correct size and type you can create one using the Define command gt ext account key value gt ext rating 0 place the value 0 in the rating field gt output out2 The total number of bytes that you can extract for all constants is 5 100 bytes Suprtool Open 5 7 Suprtool Open 5 7 Packed and Display Constants When extracting non negative packed and display constants Suprtool extracts them as unsigned unless you use a leading plus sign For the value zero you can use a leading plus or minus sign to get a positive or negative 0 field 1 6 packed field 1 unsigned 1 field 1 signed 1 field 0 positive 0 field unsigned 0 field 0 negative 0 Decimal Places If a field has implied decimal places Suprtool scales the input values according to the number of decimal places For example gt item tax decimal 2 two implied decimal pts gt item total decimal 2 same gt extract tax 1 02 specified decimal pts gt extract total 100 value stored as 10000 gt output out3 Blank Fill If you want to create an output record that consists of fifty blanks followed by the customer name use gt define filler 1 50 gt ext filler gt ext name String Constants You can specify a string constant with
388. tially OFF Suprtool now has a setting called Set VarsubDebug on which will print out the line after the variable substitution has occurred This setting only works if Set Varsub is on and Set VarsubDebug is on export outfile amp GREEN SUPRTEST filename901234567890123456789012345678901234567890123 45678901 opt robelle bin suprtool SUPRTOOL OPEN Copyright Robelle Solutions Technology Inc 1981 2013 Version 5 6 Internal gt set varsub on gt set varsubdebug on gt in filelsd suprtest vd in filelsd suprtest gt output outfile link temp vd output GREEN SUPRTEST filename 90123456789012345678901234567890123 vd 2345678901 link temp The output is formatted into 74 byte chunks and printed with a preceding vd so the substituted line is clear Warnings SET WARNINGS ON OFF Initially ON Suprtool normally prints warning messages out to stdlist You can turn off these messages when you are running from batch by issuing a Set Warnings off command If you are simulating batch mode with the Set Interactive Off command you must do the Set Warnings off after the Set Interactive Off The default for this setting is On Suprtool Commands 209 Sort Command SO 210 Suprtool Commands Specifies the next sort key via an Eloquence field a table column name or a field in a self describing file or a Defined field See Key Command K on page 163 for sort keys specified by explicit byte positio
389. tion sees eesseeeeeetenereeeeeeeeees 152 List Norec option a List Noskip Option cccseesesesesseeseeeeenesseeeeeeeeees List Octal Option eects eesseeeeeeesetereeeeeeeeeees List Oneperline Option eeeeeeeeeteteeeeeeeeeeee List Record optiOtes cccssiasis ava ez List Rightjustnum option List Standard option ssseeeeseseseeeeesesreseserreressesee List Time default ccc ccc ccccsecsecsseeseeesseeseeeseees List Time Option e discrete hoa eek elas List Title Option cececeeeeeeesceeceeceeeseeseeseeseeneees listing listing formats nnn eia S cee listing one per LING eee eeeeeeeeeeeeneeeeeeeeeenees listing with subheadings listing without field names listing producing simple reports 154 listing suppressing blank lines eee 152 LiSttedOvsssecsssscessessesdenssessssveoveovsensoncepseosvagscnnecesnegantn 20 Listredo command 158 249 300 literals in the output file B93 loader warnings cceeeeeee 140 Loader Warnings print Option ceeeeeceeeeteeees 38 Lock Set option locking IMAGE long expressions Long Fieldnames ceceeesseecceeceeceseeseeseeeeeseeneees 192 Lotus 1 2 3 low vallles esns petitan sse n lower case m EP deyi Enri AER a AEA EES Ip program replacement ecececeseeteeteeteeeeeeee 157 M MACS date format c ccc ceeecsecsseeseecseeseeeseees matlin
390. to determine the final format e g the Quote command STExport produces multiple field names for compound fields For compound fields the repeat count is used to determine the number of field names The repeat count is appended to the field name starting with one until all the field names have been generated User Specified Heading You can specify your own heading line by doing gt heading your heading Because the maximum length of an STExport input line is 256 characters you may not be able to specify a long heading with a single Heading command Use Heading Add to add additional strings to your heading Account First Name Last Name City State Note no Add in first string Heading Heading Add Heading Add Heading Add Heading Add If you specify your own heading STExport does not attempt to apply any formatting options If you need each field in the heading line to be surrounded by quotes and separated by commas you have to supply these yourself For example Account Note no Add in first string roy wr First Name roy Last Name roy City we eee otate Column Headings It is difficult to get headings right when you have to specify all the quotes and delimiters with the Heading Add option Instead use Heading Column to specify individual column headings without having to type formatting information STExport then uses the
391. to 5 6 or 7 The AND operator is lt gt Instead of IF A lt gt 5 AND A lt gt 6 AND A lt gt 7 use IF A lt gt 5 6 7 This selects a record if A is anything but 5 6 or 7 gt if field 5 6 7 gt if part 12345 67890 39201 92308 14892 gt if delivered lt gt 981231 990101 This method works well if you are searching for a small number of values Use the lookup function to check a data field for many test values IF LOOKUP tablename fieldname The lookup function returns TRUE if the specified field name contains a value from the specified table You can also look for values that are not in a table IF NOT LOOKUP tablename fieldname See the Table command for a complete description of how to combine tables and the lookup function Note Suprtool s Table command is not related to tables in databases lookup parameter function tablename The name of a table specified in the Table command fieldname A field from the input record This field must be exactly the same length as the item used in the Table command Multiple Values and Table Data Suprtool can use the data loaded into a Table in a comparison operation The lookup function will return the data value from the table to compare against another field or literal gt In filelsd gt Table mytable char field data tabfile data id field gt If Slookup mytable char field id field int field So what Suprtool will do in this
392. tore dbold 1 Database password gt get d sales gt set squeeze off gt item deliv date date yymmdd gt if deliv date gt date 1950 01 01 gt out sales01 link gt ext cust account gt ext 19 gt ext deliv date sales _total gt xeq IN 15 OUT 14 CPU Sec 1 Wall Sec 5 Now insert 20 to the century for the appropriate records gt base store dbold gt get d sales gt if deliv date lt date 1950 01 01 gt ext cust account gt ext 20 gt ext deliv date sales total gt out sales01 link append gt xeq Now you can convert the other field from the flat file salesO1 and add a century to the purch_date field 58 Suprtool Issues and Solutions Suprtool Open 5 7 gt reset gt base close the open database gt in sales01 gt item purch_ date date yymmdd gt if purch_date gt date 1950 01 01 gt set squeeze off gt out sales02 link gt ext cust account product price gt ext 19 gt ext purch date sales total gt xeq g IN 15 OUT 15 CPU Sec 1 Wall Sec 1 Because you extracted all 15 records you know you do not have any records with the purch date field that need to be updated with a 20 Now you can insert the records into the new database gt base store db gt in sales02 gt put d sales gt xeq Now you have converted two dates from an X6 format to an X8 format Case 3 Different Date Formats X6 MMDDYY Data to X6 YYMMDD The following Suprto
393. tored in yymmdd format a relative operation such as gt if date field gt date 98 12 10 will not find the date of December 10 2000 You will need to use the stddate function to make this task work correctly gt if Sstddate date field gt S date 98 12 10 How Do Today and Date Work Suprtool s date functions date and today are a short hand method of generating a numeric constant So a date selection like gt item invoice date date YYMMDD gt if invoice date lt today is exactly the same as gt if invoice date lt 980401 on Ist April 1998 Suprtool does record selection on the numeric value of the field and not on the implied date value If we move the calendar ahead to January 1 2000 and do the same commands as above the result would the same as if you had typed gt if invoice date lt 000101 on 1st January 2000 If you have some invoice dates from the previous century e g 990101 for December 1st 1999 they will not be selected 54 e Suprtool Issues and Solutions Suprtool Open 5 7 Suprtool Open 5 7 Will Suprtool Generate an Error for Two Digit Year Dates Sometimes Because dates beyond 1999 will not collate properly for the YYMMDD and YYMM formats starting in version 4 0 11 the If command produces an error if the year specified in a date or today function is greater than 1999 and the date format is YYMMDD or YYMM and you are performing a relative operation e g lt
394. tput file Suprtool and Personal Computers Suprtool Open 5 7 You can format files to be downloaded to your PC for use in spreadsheets or databases with the PRN option of the Output command Suprtool formats your file as a PC structure a comma delimited file Not all PC applications support the PRN format For more precise data conversion create a self describing file then use STExport See the STExport manual for details You transfer the Suprtool output file to your PC and then import it into your PC application Downloading to the PC After you have created a PRN file using Suprtool you can use FTP or any of the many terminal emulator programs available to download the file to the PC This includes Reflection from Attachmate Decimal Places Be sure to specify which fields have decimal places when creating the PRN file Suprtool reserves extra space for decimal points that appear in the PRN output Suprtool Issues and Solutions 51 When formatting numeric fields Suprtool inserts the decimal point at the correct place When you import your file into your PC application numeric fields are automatically formatted correctly Spreadsheets The following procedure allows you to include literal headings in your spreadsheet using only one file the size and shape of which is computed by STExport We have tested this method with MS Excel it should work with any spreadsheet that supports the importing of delimited files There ar
395. tput outfile texit Comments on Command Lines Comments may appear at the end of any command line when they are surrounded by braces Many of the examples in this manual show comments at the end of each command line You can enter a comment as the only item in a Suprlink command line When continuing command lines the comment can appear before or after the continuation character link customer records to invoices input invoices sorted by custnum link customer combined with customers output invcust produces the file we want texit OS Commands Suprlink also accepts OS commands with or without an exclamation mark or colon l1ls 1s For commands that are the same in both Suprlink and the OS involved Suprlink only executes the OS command if you type the exclamation mark or colon For example set you get Suprlink Set command set you get Linux Unix Set command ksh Suprlink Open executes an OS command e g 1s or script file File Names Suprlink s Input Link and Output commands accept any valid file name File names are currently limited to a maximum of 240 characters Calculator Any command line beginning with an equal sign is treated as a calculator expression This feature can be used to compute blocking factors and do other calculations without the need of an electronic calculator You can obtain a short description of the calculator by entering the following gives help
396. tracted from input records There can be up to 512 extracted fields and the same field may be extracted more than once Constant values may be used instead of the value of the field from the Input record EXTRACT field subscript value field2 EXTRACT field1 subscript1 field2 subscript2 EXTRACT target field expression Default subscript entire field Field Parameter Each extracted field must be an Eloquence field name an SQL database table column or a field in an SD file or a Defined field If the field requires an Item definition then the Item command must precede the Extract command Extract specifies a rearrangement of the Input data fields to produce the Output data record The subscript parameter is valid only for compound items The total item is extracted if it is compound and no subscript is specified gt extract account extract the key value and gt extract rating one other field gt output outl output file has two fields Cumulative Extracts The Extract command is cumulative If two Extracts are specified in one run all fields of the two Extract commands are used gt extract status balance account purchased is equivalent to gt extract status balance gt extract account purchased Constants Extracting Constants The value part of the Extract command is used to place a constant in each record of the output file In this case the field defines the type and length that
397. trol G rings the bell For notes on how to change the OS defaults see the section on Control Characters and stty in the Running Suprtool chapter Suprtool uses control characters for a number of purposes In the Before command control characters specify the edit functions Control D for delete Control B for before etc Control Y stops execution of the current Suprtool task Suprtool prints a status report and asks if you would like to stop the operation Control H causes the cursor to backspace one position in the current line Control X cancels the current input line Control S pauses a listing that is printing too fast for you to read Control Q resumes a listing that you have paused with Control S Database A database in Suprtool Open is an Eloquence database or an SQL database A database is specified in the Base or Open command Several commands e g Get Chain or Select do not work until a database has been specified Some commands only work with Eloquence databases and other commands only work with SQL databases An Eloquence database consists of datasets files which in turn consist of fields An SQL database consists of tables or views and each table or view consists of columns In Suprtool a column name can be used anywhere that a field name is used The advantage of using a database is that information about the database is automatically available to Suprtool The Form command shows the database structure
398. ts of the related fields from both files This file is just what we need to feed into the report program Input Files Only one file can have repeated records that pass through to the final file This file is called the primary Input file If any of the Link files contain duplicate records Suprlink will select one of them to link to the primary record s The Suprlink Output file will have no more records than the Input file The Input file and Link files are created with the Output xxx Link option in Suprtool These files must be sorted by the same key field in ascending order Link Files You can have up to seven Link files that are combined with the Input file Suprlink merges the Input file and Link files by comparing the key fields of both files you can optionally specify a secondary key The default is for Suprlink to exclude any Input records that do not have a matching record in all Link files Specifying the Optional keyword on the Link command will force Suprlink to fill the Output record Suprtool Open 5 7 Introduction to Suprlink 293 Output Files Sort Keys Selection Logic A Link Example 294 Introduction to Suprlink with default values spaces and zeros when it doesn t find a match in a specific Link file If you want to link the sales transaction to both the customer master and the salesman master it s probably faster to use traditional methods The Output file will be a self describing file containing data
399. u could use the following create table sales details CUST_ACCOUNT dec 8 DELIV_DATE date PRODUCT _NO dec 8 PRODUCT PRICE dec 8 2 PURCH_ DATE date SALES_QTY dec 6 SALES TAX dec 8 2 SALES TOTAL dec 8 2 tablespace USERS SQL Loader requires what is known as a control file It contains the load specifications such as the data file the destination table the field delimiter the text field delimiters and the column specifications In this case the control file expsales ctl looks like this Suprtool Open 5 6 User Manual Example of STExport Output 285 load data Specify input datafile dat extension is assumed Infile expsales Name of the table where the data is loaded Append new rows to existing data if any za Append Into Table sales_details Fields are separated by commas Fields Terminated By Character fields are enclosed in double quotes Optionally Enclosed By Specify the column names as they appear in the data records e For a Date type column specify the input format Example column Date YYYYMMDD o CUST_ACCOUNT DELIV_DATE date YYYYMMDD PRODUCT_NO PRODUCT PRICE PURCH_ DATE date YYYYMMDD SALES QTY SALES TAX SALES TOTAL In its simplest form SQL Loader is invoked with the following command sqlload userid username password control expsales ctl log expsales log The username and password are
400. u should specify your own title using the Title option Heading The heading appears before the column headings and data from your input file By default there is no heading Use the Heading option to specify your own heading Suprtool Open 5 6 User Manual Suprtool Open 5 6 User Manual Column Headings If you specify HTML Table use the Heading command to specify column headings for HTML output The Heading Fieldnames option will produce acceptable column headings but it is better to use Heading Column to specify a string for each of the fields in your input file Roman 8 Characters HP e3000 and HP 9000 computers use the Roman 8 character set Web pages must use the ISO 8859 1 character set The characters in the Roman 8 set are similar to but not identical with the ISO 8859 1 character set When formatting byte type fields STExport attempts to convert any Roman 8 input character into the corresponding ISO 8859 1 character STExport also tries to make reasonable conversions such as Symbol Converted To gt amp gt lt amp lt amp amp amp Those characters that cannot be converted are dropped from the output The following characters cannot be converted Symbol Roman 8 value ame Notes If you specify HTML Table STExport sets Quotes None Delimiters None If you specify HTML Preformatted STExport sets Quotes None Delimiters Space Columns None In either case any cha
401. ubroutine intrinsic allows user programs to call Suprtool A typical use of this interface would be for a COBOL program to ask Suprtool to extract a selected subset from a large IMAGE dataset and write it to a disc file which the COBOL program would then read and format into a report Suprtool2 Routine The interface routine is called Suprtool2 not Suprtool User programs written in nearly any language can call Suprtool2 and ask Suprtool to do any of the normal Suprtool tasks such as copy extract or sort The routine creates Suprtool as a son process The user program instructs Suprtool by calling the Suprtool2 routine repeatedly with Suprtool command lines When the first Suprtool command is sent the interface builds temporary files which will be used for input and output to Suprtool When the user program sends an Exit command in a separate call to the interface the interface creates Suprtool as a son process Finally the interface prints the stdlist message file if so directed by the user program Importance of the Exit Command Suprtool Open 5 7 The interface will not invoke Suprtool until your program passes Exit to it as a command line The Exit command must be alone and left justified in the command line You may use Xeq to separate multiple tasks but none of the tasks will be executed until you pass Exit to the interface If you forget the final Exit or put it in the same command line Welcome to Calling Suprtool
402. ue to have the bug By default Suprtool will just convert the number and not add on the data at the end however if you have used the work around then you can add the command gt set numbug on to the script directly or globally in your suprmgr file Openmode SET OPENMODE number Initial amp Default 1 By default Suprtool opens databases in mode 1 when the mode is omitted from the Base command Using Set Openmode you can specify an alternate mode for the Base command A common choice would be Set Openmode 5 so that Suprtool would allow only read access to the database disabling the Delete command for example Suprtool Open 5 7 Suprtool Open 5 7 Oracle Rows SET ORACLE ROWS number Initially 100 If you open an Oracle database Suprtool reads more than one row at a time when processing the input source By default Suprtool fetches 100 rows at a time You can vary the number of rows that Suprtool fetches by using Set Oracle Rows The minimum number of rows is and the maximum is 990 You must specify Set Oracle Rows before entering the Select command Oracle Integer SET ORACLE INTEGER ON OFF Initially OFF Suprtool by default maps certain numeric fields into packed decimal data types when they have more than one decimal place Pression __Pecina Places Suprtool Data Type 2 byte Integer e e Ce E The new setting Set Oracle Integer on changes the Suprtool format from packed decimal to Integer based
403. ues for testing in the If or Chain command There can be up to ten different tables TABLE tablename itemname table keyword table values HOLD DATA field Tables are used by the lookup function of the If command and as input to the Chain command The table keywords are Item File and Sorted The total amount of table space is restricted by Set Limits Tablesize Use the following scheme to select input records based on many data values Load a table with the values you are interested in Use the lookup function of the If command to search the table Or use the table with the Chain command to read a selected set of key values Adding Individual Values to a Table To add a value for an item to a table use TABLE tablename itemname ITEM value value When you start entering the values for a table you must enter all the values for that table before starting another table Once you switch to another table the previous table is closed and you cannot enter anymore values into it Parameters tablename Any identifier name up to sixteen characters long This name can be the same as the name of a Define field or database itemname but we recommend that you choose a unique name itemname An item from the database specified in the Base or Open command or a Define field This cannot be a real type item value A specific value that must match the type of the item String values are extended with blanks to the length of th
404. ues from a Table Let s assume that we have new unit cost information for each product gt form newcosts File NEWCOSTS NEIL GREEN SD Version B 00 00 Entry Offset PRODNO Z8 1 UNIT COST P8 9 Limit 13 EOF 13 Entry Length 12 Blocking 64 We load a table with the product number key value prod no and the new unit cost data value unit cost gt table prodcost table prodno file newcosts data unit cost We can then select that unit cost field from the prodcost table using the Extract command gt extract unit cost S lookup prodcost table prodno unit cost Here is the entire task keeping in mind that Update must be specified before the Extract command gt base store suprtpis Database password gt get d inventory gt table prodtable prodno file newcosts data unit cost gt update gt if Slookup prodtable prodno gt extract unit cost S lookup prodtable prodno unit cost gt xeq If you did not specify the If lookup then records that did not qualify under the lookup function in the extract field will result in zeroes for any numeric field and spaces for any byte type fields Data Conversion You can convert numeric fields from one data type to another Any nonbyte field type is considered to be numeric You can also lengthen or truncate character fields The general syntax for doing conversions is EXTRACT target field source field Suprtool Open 5 7 Suprtool Commands 121 122 S
405. ues with the rest of the command line This has the effect of deleting all the entries in the dataset It is risky to type Xeq on the same command line as any other command unless You are not concerned with the consequences if you make a mistake e g any extract task should be safe You don t make any mistakes The usual reason for putting all the commands on one line including the Xeq is to permit repetition of the task by using the Before command It is not necessary to type everything on one line because with the Listredo command Suprtool allows you to pick and choose any of your last 1000 commands Continuation The maximum physical command line is 256 characters You may enter commands on multiple input lines by putting an amp continuation character at the end of the line The maximum total command length is 256 characters The separating comma in commands is not optional Should your If command exceed 256 characters use the Table command or read gt in sdfile gt if status 20 and amp continue the If command state AZ CA OR select several states gt output outfile Comments on Command Lines Comments may appear at the end of any command line as long as they are surrounded by curly braces Many of the examples in this manual show comments at the end of command lines You can enter a comment as the only item in a Suprtool command line When you enter continued command lines the comment can appear b
406. uide for Suprtool 31 If you want to convert only some of your numeric fields you can use Suprtool s numeric conversion feature to convert the binary fields to display fields define mynumber 1 6 display get dataset ext some fields ext mynumber binary number output filename xeq Note that this technique also works for converting a number from one numeric type to another numeric type You can also convert from binary numbers to a formatted byte field using the edit function gt in mysdfile gt def a 1 10 byte gt def b 1 10 byte gt ext a Sedit int field 99 gt ext b Sedit int field 999999999 gt list gt xeq gt IN FILE1SD NEIL GREEN 0 gt OUT NULL 0 A 11 11 B 000001111 Counts and Subtotals Count and Subtotal on Sort Keys This example counts the number of sales transactions for each customer and produces the total sales for each customer We use the Count and Total options of the Duplicate command Note that we made the output file self describing so we can easily work with it later gt input transactions self describing file gt ext cust_account gt sort cust_account need to sort by key gt dup none keys count total sales total gt list standard gt out result link gt xeq The output file contains three fields The first field is the cust_account that we extracted Suprtool created two new fields at the end of each output record st count and st total 1 S
407. under the characters to be removed To insert type I under the insertion spot then the new characters To undo your changes type U To append to the end of the line use gt xxx To delete from the end of the line use gt DD To replace at the end of the line use gt Rxxx And to erase the rest of the line use D gt If you prefer Qedit style editing Control D etc use the Before command instead of the Redo command Examples Li Sta fd not found sd is not spelled right redo most recent command last command is printed you enter changes to it the edited command is shown you press Return listredo all redo 5th command in stack gt red redo previous command gt redo 5 gt redo 2 redo command before previous gt red redo 8th through 10th gt red redo 10 through last gt red redo last rm command gt red redo last rm temp gt red redo last containing temp Notes The Redo command can be abbreviated to a comma as in MPEX You cannot use to combine commands on the same line Hpmodify Keys Reference Here are the MPE style REDO sub commands Suprtool Open 5 7 Suprtool Open 5 7 i INSERT If text follows the i this text is inserted in the current line starting at the i position r REPLACE If text follows the r this text replaces the same number of characters in the current line beginning at the r position DELETE Deletes a character from the current l
408. uprtool Commands Target Field The target field determines the byte length data type and repeat count for the expression The expression is extracted during the output phase and cannot be used by other Suprtool commands that accept fields e g Sort To avoid confusion it is best to define a new field name for the target field instead of using an existing field name The following example shows defining a new target field as a double integer The Extract command target field then takes the definition from the Define command and extracts data from the source field display field gt in oldfile gt def salesqty 1 4 double gt ext order no order date gt ext salesqty display field Packed and Display Fields When the target of an extract conversion is a packed or display type field Suprtool always converts positive values to a neutral packed or display value To ensure that expressions with positive values have a positive result use the signed function gt extract packed field signed int_field gt extract display field signed dbl_ field 10 Truncation errors can occur when Suprtool converts from nonfloating point to floating point See the discussion under Numeric Truncation above Byte Fields Use the Extract command to shorten or lengthen byte type fields If the target field is longer than the source field Suprtool fills the trailing space in the target field with spaces Byte to Numeric Conversi
409. uprtool Commands Suprtool Open 5 7 Before Command B Suprtool Open 5 7 Repeat any combination of the previous 1000 command lines with or without editing BEFORE start stop string ALL Default redo previous line BQ redo without change The Before command allows you to modify the commands before it executes them If you don t need to change them use BQ or Do The Before command uses Qedit style Control characters for modifying the commands The default mode is to replace characters To delete use Control D and to insert use Control B If you prefer HP style modify D R I and U use the Redo command instead of Before Examples Sly asfd fd not found gt Before L Ed S L sd listredo 10 gt before 5 gt bef 8 10 gt b ls gt b ls gt b gt before 2 gt before 5 2 sd is not spelled right redo most recent command last command is printed you enter changes to it the edited command is shown you press Return redo Sth command in stack redo 8th through 10th redo last ls command redo Is command redo last containing redo command before previous redo by relative lines Modify Operators If you wish to change any characters within the line the modify operators are the regular Control Codes used in Qedit Characters Action Any printing characters replace the ones above Control D plus spaces deletes columns above Cont
410. uprtool Open 5 7 creates a single field that consists of a blank space Each of these blank fields results in a blank line on our mailing labels since the List command puts one field on each output line If you want to combine two fields on one line you would first have to create an output file with the combined fields and use this file as input to List Oneperline Suprtool Open 5 7 Quick Start Guide for Suprtool 37 Running Suprtool Running Suprtool To run Suprtool type this command opt robelle bin suprtool Suprtool Copyright Robelle Solutions Technology Inc 1981 2013 Version 5 6 Type for help gt Suprtool prints its version number and prompts with gt Press Return after each command you type For example if you type gt define a 1 4 double Suprtool add the defined field a to it s internal table and makes it a double integer Setting Up a PATH for Suprtool Suprtool Open 5 7 You can invoke Suprtool with the command opt robelle bin suprtool If you wish to just type suprtool in order to invoke Suprtool Open you must either add opt robelle bin to your PATH or copy opt robelle bin suprtool to a directory that is currently on your PATH Similarly the man pages for Suprtool are in opt robelle man man1 suprtool 1 To make the man pages available to everyone you can either add opt robelle man to your MANPATH or you can copy the man pages to a directory that is currently on your MANPATH
411. urround the entire string with single quotes Suprtool Open 5 6 User Manual STExport Commands 281 Zero Command Z Specify whether leading zeros are to appear in numeric fields ZERO NONE LEADING Default None Use Zero None to force all numeric fields to have leading zeros removed Ifa numeric field has implied decimal places STExport always formats the number with at least one digit to the left of the decimal place even if it is zero Use Zero Leading to force all numeric fields to be zero filled In this case Sign Leading and Sign Floating both cause the sign to appear in the same place in front of the leading zeros 282 STExport Commands Suprtool Open 5 6 User Manual Example of STExport Output Example In this example we show you how to use Suprtool and STExport We start with an SQL table identify the fields that are dates and the number of implied decimal places in other fields We then produce a self describing file using the dataset as input and show the default output from STExport The Form command displays the fields in a dataset or a self describing file For files this information is stored in a file with an extension of sd and is not accessible with other tools Use the Form command to obtain the record layout of STExport input files Sales File We will be formatting data from an Oracle table that has the following form gt op oracle custdb dbpass gt sel from sales gt form Column Name
412. ut options You cannot extract an EBCDIC constant The following example would produce an error message gt extract Setoa char field abcdef You cannot extract a range of fields using etoa or atoe Notes The Extract command is valid only with Output xxx data Output xxx data num Output xxx query Output xxx link Output xxx ascii Output xxx prn The Extract occurs logically after the sort phase if any but prior to the final Output Put or List An If command can refer to fields of the input record that are not included in the extracted output record The sort keys can be fields that are not among those extracted If the extracted record length is shorter than the input record length Suprtool attempts to speed up sorts by doing the extract before sorting Suprtool can only do the extract before sorting if the output option is DATA the default QUERY or LINK and all of the sort keys are included in the Extracted fields One advantage of not using the Extract command is that the output file from Suprtool has exactly the same format as the input dataset which created the file You can then use the setname option of the Input command to define all of the fields in Suprtool Commands 129 the output file Even if you change your database structure many of your job streams that use Suprtool and the setname option will not have to be changed 130 Suprtool Commands Suprtool Open 5 7 Form Command F The Form command
413. valid Oracle connect information SQL Loader reads the load specifications from the file specified in the control keyword It writes operation information and statistics to the file specified in the Jog keyword It also creates a number of files to report data problems etc SQL Loader has many other options to control the load task Refer to the appropriate Oracle documentation for details 286 Example of STExport Output Suprtool Open 5 6 User Manual Limits Within STExport Maximums Delimiter Maximum Length 3 Bytes The delimiter must appear between every field in the output record To help avoid exceeding the maximum output record length the maximum delimiter length is three characters Input File Maximum Record Size 4096 Bytes We recommend that you use Suprtool s Extract command to minimize the input record size Input File Maximum Fields 512 If you must have more than 512 fields use Suprtool s Define and Extract commands to extract several fields as one contiguous series of bytes Output File Maximum Record Size 4096 Bytes When formatting many fields it is possible to produce large output records Once again using the Extract command to minimize the size of the input records will avoid large output records The total length of the Heading line in the output file is also restricted to 4096 bytes Suprtool Open 5 7 Limits Within STExport 287 Welcome to Suprlink Welcome to Suprlink Welcome to Su
414. veniently without executing the current task EXIT ABORT SUSPEND XEQ Default XEQ Typing Exit with no parameters means Exit Xeq Suprlink recognizes special command names which specify both the Exit command and an exit option e g ES means Exit Suspend Exit Abort EA Cancels the current operation and terminates Suprlink The Exit command without parameters always attempts to perform the task currently specified while Exit Abort cancels the task and terminates immediately Examples comment You began to specify a linkage stopped for comment coffee and decided to cancel the task comment upon your return input invoices Coffee break dei texit abort cancel linkage and terminate Exit Suspend ES This feature is not currently available in Suprlink Open Exit Xeq EX To perform the current linkage task you can either use Xeq which leaves you inside Suprlink ready to define another task or Exit Xeq which leaves Suprlink when done with the task Exit Xeq is the default option i e specifying exit starts execution of the current task Examples opt robelle bin suprlink texit no input was specified End Of Program opt robelle bin suprlink input invoices link customer output invcust texit link and stop Suprlink Commands 307 Form Command F Display the fields in a self describing file FORM filename If no file name is specified the fields in the input
415. verdue decimal 2 gt total balance gt total overdue gt xeq Totals TUE OCT 10 2000 4 32 PM BALANCE 143598 16 OVERDUE 17399 73 Reading Total Files The default size for the file created by TOTAL file needs to be opened with 48 bytes wide and with linefeeds gt in filelsd gt tot int field gt total file file82a gt xeq gt in file82a rec 48 1f You can also send the totals to a list file for simple reports gt in filelsd gt tot int field gt list standard file file82a gt total file list gt xeg Sort Break Totals Please refer to the Duplicate command on how to generate sort break totals Notes You cannot combine the Total command with the Total option of the Duplicate command The Total command prints out a date and time stamp on the title line This is for audit purposes Suprtool Commands 219 Update Command UP 220 Suprtool Commands Update one or more noncritical fields in an Eloquence dataset UPDATE CIUPDATE Specify the fields to be updated and their new values with the Extract command The Update command must be specified after the Chain or Get command but before the Extract command s You can update part of an Eloquence field by defining the part you are interested in updating and then using the defined field name in the Extract command The Update command can change values in critical fields Eloquence search or sort fields To update critical fields you mus
416. voiceno of lines gt go This small amount of code however can take a long time to execute depending on the size of the Lines and Header files A Quiz program will usually take longer as new links are added causing the size of the record complex to grow Suprlink can provide the same information possibly in a fraction of the time The technique as applied to the same problem requires four steps Sort the Lines file by Invoiceno Add a new constant field Linkflag to the Header file and fill it with Y Sort by Invoiceno Link the two files with Suprlink using the Optional parameter Select the record complexes where linkflag does not contain a Y opt robelle bin suprtool gt open oracle demo reader gt sel from lines gt sort invoiceno gt output filel link gt xeq gt sel header gt define linkflag 1 1 gt extract invoiceno linkflag Y gt sort invoiceno gt output file2 link gt exit opt robelle bin suprlink input filel link file2 optional output file3 texit opt robelle bin suprtool gt input file3 gt if linkflag lt gt Ty gt extract invoiceno gt list standard gt exit Any invoice line with a corresponding record in the invoice Header file will have a Y in the linkflag field Records failing the match will contain the default space 298 Introduction to Suprlink Suprtool Open 5 7 Suprlink with Quiz QTP Quiz and QTP are part of PowerHouse a popular fourth
417. wing manner Stexport oc lt lt EOD in orders heading fieldnames out ordprn exit EOD if cat sxoutcount ge 10 then echo More than 10 records found fi Variable Substitution v A second command line option allows you to turn on variable substitution You must note that the environment variable must be set prior to running STExport stexport v lt lt EOD in myvariable out ordcomb exit EOD Suprtool Open 5 6 User Manual Introduction to STExport Importing Data Input File Data Types Suprtool Open 5 6 User Manual Use STExport to produce a formatted output file that can be used to import data into databases and applications Other databases have different requirements for the format of input data You will have to experiment with the various STExport formatting options to find a format that your particular database tool accepts STExport reads one input file and formats each input record into one record in the output file The Input file must be a self describing file use the Output Link option in Suprtool Dates and Decimal Places Use Suprtool s Item command to specify date formats and the number of implied decimal places when you create the self describing file STExport uses this information to correctly format the information in the output file See Appendix A for a complete example of how to use Suprtool s Item command and Output Link option to create an input file for STExport
418. xtract key extract line DSE standard exit LEOD rm datafile Missing Features The following Suprtool features on MPE are currently not available in Suprtool Open Extracting a range of fields from an SQL database Running Suprtool 45 Export command STExport exists as a separate program Link command Suprlink exists as a separate program Table Command with the File option requires that the file being loaded is self describing Out option of the Listredo command Output Ask Num Key and Num Query Output Temp There are no temporary files in Linux Unix 46 Running Suprtool Suprtool Open 5 7 Suprtool Issues and Solutions A Suprtool Task Suprtool Open 5 7 Suprtool s primary function is to extract data quickly its focus is batch extraction The key principle is the bigger the input data source and the smaller the subset of data selected the more performance improves Your aim is to replace serial reads and selection with Suprtool To do this break your task into components an input choice some processing selections and the output choice Input Choices Suprtool reads fixed length data files You can create self describing files with Suprtool s Query or Link output options It is easier to work with self describing files because they have information about the fields in each input record Often you select a subset of the input records using the If command Only selected records are passed to the
419. xtract the data Read commands using here is write messages to temporary logfile suprtool lt lt EOD gt gt Stemp_sxlog Open Allbase users orders db OrdersDBE clerk Select From clerk sales tem purchasedate date yyyymmdd tem deliverydate date yyyymmdd tem price decimal 2 tem salestax decimal 2 tem salestotal decimal 2 f purchasedate Stoday 1 Sort customernum Output Stemp_sxdata Link Exit LEOD Check return code in case Suprtool had a problem If so send the failed return string to the CGI script including the name of the logfile if eq 1 then echo failed temp_sxlog exit 1 else Suprtool task worked correctly Can go on with STExport Must go to the target directory because of file name limit in STExport and get a file name to store HTML output Se Se SH SE OSE OSE OSE SHE cd users htmluser public html gt dev null temp_stexpdata mktemp d Execute STExport to create the html file stexport lt lt EOD gt gt Stemp_sxlog Input temp_sxdata HTML Table Title Orders Created Yesterday Heading Orders Created Yesterday sorted by customer Heading Fieldnames Date YYYYMMDD Output Stemp stexpdata html Exit 7 EOD Check return code in case STExport had a problem 260 STExport Commands Suprtool Open 5 6 User Manual If so send the failed return string to the CGI script including the name of the logfile LE PS ee i t
420. y For example YY of AAMMDD CCYY 00 09 1900 1909 90 99 1990 1999 AO A9 2000 2009 BO B9 2010 2019 C0 C9 2020 2029 Because letters are greater than numbers in the collating sequence you can ensure that aammdd dates beyond 1999 will order correctly Suprtool also supports other date formats with this two character year representation These formats are aamm mmddaa and ddmmaa Oracle Oracle dates include both the date and the time The date and today functions only apply to the date part of Oracle dates SRN Chronos The Srnchronos date format is used in applications from Software Research Northwest Like Oracle dates this format includes the date and time but the time portion is ignored by the date and today functions DDD Dates Dates consisting of ddd in the format name use the ddd to represent the nth day in the current year This means that January 1 will be day 001 and Dec 31 will be day 365 on non leap years Some people refer to these type of dates as Julian dates HPCalendar The HPCalendar date format is supported by HP s new HPCalendar intrinsic and consists of a 32 bit integer number whereby the first 23 bits represent the year and the last nine bits represent the day of the year Decimal Places The decimal attribute is the number of implied decimal places in an item The minimum number of implied decimal places is 0 The maximum is based on the data type of the item Data Type Maximum
421. y libimage3k sl and libeqdb sl and one from Oracle typically libclntsh sl This library will have other dependencies and this varies by version of Oracle The Oracle library is only loaded if you have the Oracle option enabled In this version if any of the dynamic loading of Eloquence or Oracle fails Suprtool will continue Printing Loader Warnings When loading Oracle libraries Suprtool would report warnings on startup if it failed to load the Oracle libraries Suprtool by default no longer prints these warnings To check if your libraries were loaded you can run Suprtool with the lw option suprtool lw Control Characters and stty 40 Running Suprtool Most Linux Unix users have Control D configured as the end of file character and Control C as the interrupt character If you use Robelle style modify you must reassign Control D to a different control character If you are familiar with MPE you may want to assign Control Y as your interrupt character A standard shell configuration file profile for Bourne and Korn shells and login for the C shell usually contains a line like stty erase H kill U intr C eof D swtch z To change both the end of file and interrupt characters you should change the intr and eof control keys as follows stty erase H kill U intr y eof E swtch z Note that many programs require an end of file signal Many introductory books on UNIX assume that Control D
422. y a data file 20 Quick Start Guide for Suprtool Suprtool Open 5 7 gt input filel reclen 80 nolf gt output result gt xeq The Output command creates the file called result which is a copy of the input file Appending to a File To append to an existing file use the Append option in the Output command gt input file2 reclen 80 nolf gt output result append gt xeq Fields in Data Files Suprtool Open 5 7 What is a Self Describing File A self describing SD file is actually a pair of files one with data and the other with field information These files have the advantage of behaving like data files which can provide field information to Suprtool without you having to define all the fields The Input command is also simpler because there is no need for either the Reclen or the LF parameters Creating an SD File To create an SD file use the Link option in the Output command gt select from sales gt output result link gt xeq Now the data file result has the same field names as the Sales table Suprtool can read this data file and know about the fields automatically result sales total gt 20000 and product _price lt 5000 gt output custlist gt xeq Define Fields in a Data File A regular data file does not have any field information associated with it If you need to work with the fields in a data file you need to tell Suprtool about the fields using the Define command For example say you h
423. y applying a cutoff rule or you can force all years to be specified as four digits What does Set Date Cutoff do Date Cutoff tells Suprtool what century to use when Suprtool generates a constant date value from the date function 52 Suprtool Issues and Solutions Suprtool Open 5 7 Suprtool Open 5 7 Suprtool would assume 19 for the century for any user specified date with a two digit year For example gt item date field date ccyymmdd gt if date field lt S date 40 12 26 With Set Date Cutoff xx Suprtool assumes 20 for the century if the two digit year specified in the date function is less than the value of Set Date Cutoff For example gt set date cutoff 50 gt item date field date ccyymmdd gt if date field lt date 40 12 26 Suprtool in this case assumes the full date to be 2040 12 26 because the 40 in date is less than the 50 in Set Date Cutoff The default value of Set Date Cutoff is 10 Stddate and Set Date Cutoff When Stddate has to convert from a date with only a two digit year the conversion to the four digit year will use the value of Set Date Cutoff when converting the date For example gt get sales detail gt set date cutoff 15 gt def new ship date 1 4 double gt item ship date date mmddyy gt ext order no sales amount gt ext new ship date S stddate ship date gt out salesinfo link gt xeq In this example if any ship date has a year of 14 or less then the c
424. y date gt duplicate none keys 1 only check for duplicate agents gt output agents create roster of agents Count The Count option causes Suprtool to produce a new field in the output record with the number of occurrences of each key value The count field is called st count and is an 2 type field The Count option can only be used with Duplicate None Keys gt key 1 4 gt duplicate none keys Input Output Ae rO ITLI SLO 2222 725 2222 25 two records for key value 2222 2222m 29 3333 48 3333 48 Total The Total option allows up to 15 fields to be subtotaled for each duplicate key Separate the fields with spaces not commas The Total option can only be used with Duplicate None Keys A new field is created at the end of the output record for each total Each field is called st total n gt sort customer no gt extract customer no gt duplicate none keys total sales qty sales amt The above commands will create a self describing file with the field customer no and the total by each customer of the sales qty in the field st total 1 Similarly the field st total 2 will contain the total sales amt by customer number The following data types are chosen for each total based on the data type of the field 100 Suprtool Commands Suprtool Open 5 7 Suprtool Open 5 7 Data Type Total Data Type IEEE E4 all others P28 Please see the P28 Fields section on how to define these fields in Cobol and PowerHouse p
425. y field The key field can be any type except for Real or Long The primary Input file may have more than one record per key value and each record may appear in the Output file It is best to have Suprtool Extract only the fields you will actually need since if any of the Suprtool extracts result in enormous Output files the time to do the sort may be prohibitive The BY clause is only necessary when the Input file has been created using the Suprtool Output Query option instead of the Output Link option Output Link adds the sort field information to the self describing file so that you do not have to specify it in a BY clause Suprlink Commands 311 Join Command J 312 Suprlink Commands Join the Input file to another Join file this links files with multiple key values in both the input file and the Join file JOIN filename BY join keys FROM input keys OPTIONAL REQUIRED Default REQUIRED File Name The Join file should be created by Suprtool with the Output Link option it should only contain the fields that you actually need in the final report plus any sort fields If you do an file of the file it should show another file with a sd extension This file contains a description of its own record structure this allows you to refer to the field names and Suprlink can compute where they occur in the record For example t tinput sales Sales is sorted by custno t join custfile key is custno toutput
426. y items with an implied number of decimal places or a date format If you create a self describing file this information is retained When you input such a file all Suprtool commands are automatically informed about the decimal places and date formats The Form command shows these extra attributes as comments at the end of each field description For example gt input salefile self_describing file gt item deliv_date date ryyyymmdd gt item purch date date ryyyymmdd gt item sales tax decimal 2 gt item sales total decimal 2 gt output newfile link creates SD file with item attributes gt xeq gt form newfile shows decimal pts and dates Extended Field Names A few users have expressed interest in having the ability to have SD field names be greater than 16 characters However a large number of customers have software that relied on the SD format remaining the same The compromise was to add Extended names to the end of the sd file The new Extended names will be written out and 50 Suprtool Issues and Solutions Suprtool Open 5 7 used inside Suprtool when you turn on this feature with Set SDExtname On Suprtool will only use this information if this setting is turned on Suprtool and Suprlink now have a new optional extended name format for Self Describing files Not all portions of Suprtool and Suprlink handle the new extended name format The Suprtool List command does not utilize the extended name Suprlink

Download Pdf Manuals

image

Related Search

Related Contents

Porty Manual English  How to Activate and Use Caref  LG Electronics 55UB8500 Flat Panel Television User Manual  automatischer Rasenmäher  speed triple - Triumph Instructions.com    USER`S MANUAL  H20 年度 NEDO-FT 採択者接続試験手順書  ÿþM icrosoft W ord - L}¶Uiаe  Indicatore MercMonitor ECO - Brunswick Marine in EMEA  

Copyright © All rights reserved.
Failed to retrieve file