Suprtool 5.9.11 for AMXW:

Change Notice

Doc-To-Help Standard Manual

 

 

 

 

 

 

 

by Robelle Solutions Technology Inc.

 

suprtool

 


 

Program and manual copyright © 1981-2017 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

 

Robelle Solutions Technology Inc.

Suite 372, 7360 137 Street
Surrey, BC Canada V3W 1A3

 

Phone:   604.501.2001

Support: 289.480.1060

 

E-mail:  sales@robelle.com

E-mail:  support@robelle.com

Web:     www.robelle.com

 

 


Contents

Introducing Suprtool Version 5.9.11  5

Overview. 5

Highlights in Suprtool 5.9.11. 5

Highlights in Suprtool 5.9.10. 5

Highlights in Suprtool 5.9. 6

Highlights in Suprtool 5.8. 6

Highlights in Suprtool 5.7. 6

Highlights in Suprtool 5.6. 7

Known Problems 8

Itanium vs PA_RISC. 8

Compatibility. 10

Itanium Compatibility. 11

CPU Serial Number (uname) 11

Documentation. 11

Installation  12

Overview. 12

Installation Instructions 12

Installation Assistance 12

Enhancements in Version 5.9.10  13

Introduction. 13

$INRECNUM.. 13

$LEADZEROZ. 13

$LEADZEROB. 14

$JUSTIFYL. 16

$JUSTIFYR. 16

$RESPACE. 16

Enhancements in Version 5.9  18

Introduction. 18

$Month. 18

Excel Command. 18

Json Output 20

Multiple Json Commands 21

MySQL Access 21

Enhancements in Version 5.8  22

Introduction. 22

Input ($first/$last) 22

Introduction. 23

stexpmgr 23

linkmgr 23

$Proper 23

$Translate 24

Enhancements in Version 5.6  27

Introduction. 27

Extract Command. 27

Data Items Support 28

$SubCount 28

CCTL on Output 29

Defined Items Support 29

Bugs Fixed  30

Bugs Fixed In Suprtool 5.9.11. 30

Bugs Fixed In Suprtool 5.9. 30

Bugs Fixed In Suprtool 5.6.10. 30

Bugs Fixed In Suprtool 5.5.11. 30

Bugs Fixed In Suprtool 5.5.04. 30

Bugs Fixed In Suprtool 5.5.03. 30

Bugs Fixed In Suprtool 5.5.02. 31

Bugs Fixed In Suprtool 5.5.01. 31

Bugs Fixed In Suprtool 5.5. 31


 

 

Introducing Suprtool Version 5.9.11

Overview

Use Suprtool/AMXW to read, select, and sort data from Oracle, Allbase and Eloquence databases and data files with fixed-length records. Suprtool/AMXW is designed to be similar to Suprtool for MPE while providing necessary HP-UX features. It is designed to work with AMXW an MPE environment from Speedware that runs on other platforms.

Suprlink/AMXW provides high-speed data-file linking based on a sort key. Use STExport for AMXW to convert fields in a self-describing input file into an output file that can be imported into different applications.

Highlights in Suprtool 5.9.11

·             Set AMXW Perfwrite on, would cause Suprtool to fail when using output,append.

Highlights in Suprtool 5.9.10

·             STExport has a new set command called Set Excel Leadzero On which tells the Excel command to add leading zeroes to the fields specified in the Excel Preserve command.

·             Suprtool has a new function available to the if/extract commands called $inrecnum, which expects a double integer result.

·             Suprtool has a new function called $leadzeroz, which will add leading zeroes to a display field and will optionally justify the field.

·             Suprtool has a four new string handling functions, specifically, $justifyl, $justifyr, $leadzerob and $respace.

·             Suprtool for AMXW now has a limit of 512 fields.

 

Highlights in Suprtool 5.9

·             A new $month function in the if / extract option allows you to add or subtract a number of months from a given date.

·             STExport has a new command called Excel command which allows you to format a field in a format that allows leading zeroes or spaces to be preserved.

·             A new option called JSON will output SD data in Java Script Object Notation.

·             The Add command would fail if a Table in an Oracle database accessible by a given username had more than 2.1 billion entries on Oracle 11 and higher.

·              Suprtools new banner would show the incorrect day and day of week in     certain circumstances.  This was cosmetic only.

Highlights in Suprtool 5.8

·     Set CleanChar to a single character, after a Set CleanChar “<null>” would not come into effect due to the special null flag not being reset. This was in both Suprtool and STExport.

·     The input command now accepts the keywords($first/$last) when inputting a range of records.

Highlights in Suprtool 5.7

·   Suprlink now has it’s own “Suprmgr” file. Suprlink will process all the commands in /opt/robelle/linkmgr on startup.

·   STExport now has it’s own “Suprmgr” file. STExport will process all the commands in /opt/robelle/stexpmgr on startup.

·   Suprtool for AMXW would not stop / abort Suprtool when using the list command and the target file filled up.

·   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 output,else with extract commands and sort in play would write bogus data to the Else file. (non-MPE platforms)

·   Suprtool for AMXW did not create a self-describing file when output,link was specified and the input source was a non-self describing flat file equated to a dataset. (Fixed in Build 2)

·     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.”. This issue could also contribute to a Sort failure errors, in Suprtool for AMXW.

Highlights in Suprtool 5.6

·       Suprtool for AMXW had a conflict with the AMXW copy command when copying a C/ISAM or emulated KSAM file.

·       Suprtool for AMXW could not append to an empty KSAM file.

·       Suprtool, Suprlink and STExport now handle 512 fields on HP-UX and Open platforms.

·       Suprtools' extract command now has three special keywords to help with extract using a range, which is designed to make your Suprtool scripts more easily maintained. Suprtool now has $all, $first and $last which respectively means all fields, the first field or the last field. Note that $first and $last may only be used in a range extract.

·       $subcount has been added to keep a running count for a given sort break.

·       Suprtool for HP-UX and AMXW would potentially incorrectly set the decimal or date attribute on a straight copy of an SD file. This was introduced by the fix to copying SD files with duplicate fieldnames and was in 5.5.04 pre-release and 5.5.11 and 5.6 Build 1. This is fixed in Suprtool 5.6 Build 2 and Suprtool/Open Build 3.

·       Suprtool for AMXW would print an error message when doing a straight get of a dataset to a flat file with no extract command. (Fixed in Suprtool 5.6 Build 2)

·       Suprtool for AMXW would not show fieldnames on a list of an SD file with no extract command. (Fixed in Suprtool 5.6 Build 2)

·       Suprtool for AMXW will now detect if the output file has CCTL and will use the correct controlcode on the FWRITE to the Output file.

·       Suprtool for AMXW Itanium version now supports more defined fields.

·       Suprtool would use an incorrect field definition when copying a file where the input file had a duplicate field name with different field definition, the second field would utilize the first definition.

·       Suprtool would give an incorrect result when doing an arithmetic expression with more than one set of brackets and the data involved is Packed-Decimal. (Itanium only)

·       Suprtool and STExport would incorrectly assume a positive sign for a packed-decimal field that had an invalid sign value, when converting from Decimal to Ascii. (Itanium only)

·       Suprtool for AMXW did not allocate enough space to support the same number of defined fields and items as previous versions.

·       Set  Ifouroutput  on  extracts would fail at xeq time with an "Unknown if  execute phase" error in the PA_RISC  version,  when  an  alignment  issue  would occur in some circumstances.

·       Suprtool for AMXW would fail to open a "KSAM" file in AMXW when the implementation was done via CISAM.

Known Problems

There are no known problems at this time. If you have any questions or concerns or feedback, please feel free to e-mail me at: neil@robelle.com

Itanium vs PA_RISC

There are two types of machines that HP has that run HP-UX, the older machines are based on the PA_RISC chip and the new machines that use the Itanium (and Itanium 2 chips). There are also program files that are specific to each chip. PA_RISC programs can run on both PA_RISC and Itanium machines, however, Itanium programs can only run on Itanium machines.

Any program that runs on Itanium must utilize libraries that match its own program type. Therefore if a PA_RISC program runs on Itanium and looks for a library, it must find/load the PA_RISC version of the libraries that it needs and conversely an Itanium program must load the libraries specific to its type.

How to Tell what Machine I am on?

There are many ways to tell what kind of machine you are on, here are a couple:

uname -m

getconf MACHINE_MODEL

In each case the Itanium machine will typically say ia64 somewhere in the result of the above two commands. PA_RISC machines typically say "9000" somewhere in the string.

What is the Program File Type?

Since there are two types of machines there are also at least two types of program files. Suprtool is primarily either PA_RISC 1.1 or ELF-32 / IA64 which is also known as Itanium. To determine the type of program file you can use the file command:

Itanium

file suprtool

suprtool:       ELF-32 executable object file - IA64

PA_RISC

file suprtool

suprtool:       PA-RISC1.1 executable dynamically linked -not stripped

The PA_RISC binary can run on both platforms but you need to have PA_RISC libraries for Eloquence or Oracle if you are using the Oracle module. An Itanium binary will not run on a PA_RISC machine and will fail with "cannot execute".

Of  course we've made a provision to identify if you are running the ia version of Suprtool in the banner and verify command with the ia after the UX :

SUPRTOOL/UXia/Copyright Robelle Solutions Technology Inc. 1981-2009.

(Version 5.2 Internal)  MON, JUN  8, 2009, 11:26 AM  Type H for help.

PA_RISC Loading

Suprtool by default looks in the libraries in any of the directories named in SHLIB_PATH.  For example to insure that Suprtool resolves the library loads you can set the  SHLIB_PATH system wide in your /etc/profile file in the following manner:

 export SHLIB_PATH=/opt/eloquence6/lib/pa11_32:/opt/oracle/lib

If you do not have the SHLIB_PATH variable set to a value where the libraries can be found, Suprtool will then try to load from their default names locations.  For Eloquence the default location is :/opt/eloquence6/lib/pa11_32.

The Oracle interface will first try to load libclntsh.so and then attempt to load libclntsh.sl from $ORACLE_HOME/lib32/libclntsh.sl.

Itanium Loading

You can change Suprtool to pay attention to LD_LIBRARY_PATH and use dlopen to load libraries, you can set the environment variable:

export ROBELLE_DYN_LOAD =Y.

It is generally advisable to use DLOPEN or the ROBELLE_DYN_LOAD option when using the Itanium version. The PA_RISC version of Suprtool can use  either type of loading, the default or the dlopen method invoked with ROBELLE_DYN_LOAD.

Running the PA_RISC version on Itanium:

You can of course run the PA_RISC version of Suprtool, however, given that the PA_RISC version requires SHLIB_PATH to point to PA_RISC libraries may go against the configuration necessary for other programs that may need SHLIB_PATH to point to Native Itanium libraries.

The solution to this is fairly simple, you can create a command file (let's say /opt/robelle/cmd/suprtool) that runs suprtool for you, of course you need to insure your path variable has /opt/robelle/cmd before /opt/robelle/bin.

You can then have the following commands in the /opt/robelle/cmd/suprtool command file:

export SAVED_SHLIB_PATH=$SHLIB_PATH

export SHLIB_PATH=/opt/oracle/pa_risc/lib:/opt/eloquence/lib/pa11_32

/opt/robelle/bin/suprtool $@

export SHLIB_PATH=$SAVED_SHLIB

Essentially all it does save the current SHLIB_PATH setting, sets it to point to PA_RISC libraries, runs suprtool and then resets the library back.

Suprtool for Itanium

Now that you know all about PA_RISC and Itanium you do need to be aware of what Suprtool for Itanium is in terms of new code and risk for potential issues. Suprtool for Itanium is completely in C code. This does not mean that it is all new C code however, the majority of the Suprtool code is still based on SPL, but is converted to C, using Allegro's SPLASH compiler.

So while the C code is new it is based on the original SPLash code, however, given differences between C and SPLash not all code can be automatically converted in some cases. We worked closely with Allegro to find ways to have the source code work and address the various issues that came up. The entire time Allegro improved the SPLash to C converter.

So while we are based on the original Suprtool we do have new code paths in the Native Itanium version and other potential issues where the C code might not work in exactly the same manner as the SPLash code.

Having said that we have tested this against our test suites, and improved and added a large number of tests to our HP-UX test suites. We also began Alpha testing 24 months ago and have been beta testing for the last year with our two best VAR customers.

 

Compatibility

Suprtool for AMXW would use the file size stored in the SD label as opposed to the actual physical file size that AMXW uses. 

::FILE FILE80;REC=-80,,F,ASCII
::supramxw
SUPRTOOL/AMXW/Copyright Robelle Solutions Technology Inc.1981-2007.
(Version 5.0)  TUE, JAN 08, 2008,  2:42 PM  Type H for help.
>I STFILE
>DEF ABCXYZ,1,11
>EXT ABCXYZ
>O FILE80,LINK
>X
IN=26, OUT=26. CPU-Sec=1. Wall-Sec=1.

 

>FO FILE80
File: FILE80     (SD Version B.00.00)  No linefeeds
Entry:                     Offset
    ABCXYZ               X11     1
Limit: 1023  EOF: 26  Entry Length: 11  Blocking: 1
>E
::LISTF FILE80,2

 

ACCOUNT=  AMXWQA      GROUP=  FDE

 

FILENAME  CODE  ------------LOGICAL RECORD-----------  ----SPACE----
                SIZE  TYP        EOF      LIMIT R/B    SECTORS #X MX

 

FILE80    1084   82B  FA          26       1023   1          9  1  *

 

So what happens is if an output link file is created with a file equation making the file bigger, any subsequent files that are created from the resulting output file are actually made smaller as you can see below.

 


::supramxw
SUPRTOOL/AMXW/Copyright Robelle Solutions Technology Inc.1981-2007.
(Version 5.0)  TUE, JAN 08, 2008,  2:42 PM  Type H for help.

>i FILE80
>O FILE80A
>X
Warning:  Using Output FILE80A,Link
IN=26, OUT=26. CPU-Sec=1. Wall-Sec=1.

>E
::LISTF FILE80A,2

ACCOUNT=  AMXWQA      GROUP=  FDE

 

FILENAME  CODE  ------------LOGICAL RECORD-----------  ----SPACE----
                SIZE  TYP        EOF      LIMIT R/B    SECTORS #X MX

 

FILE80A   1084   11B  FA          26       1023   1          2  1  *

 

 Suprtool for AMXW now honours the physical record size and the FILE80A file will now have a record size of 80.

The HP-UX and AMXW versions of AMXW no longer have Set varsubcompat on as the default.  The default is now off and can be turned on with the set command or the –cv option.

Previously, Suprtool would treat an “R” type field in an Eloquence database as an R type while the data inside Eloquence is  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 “R4”, but internally Suprtool will treat as IEEE, which is how Eloquence stores and treats the numbers.

Consequently STExport will now support items in SD files that are condidered R type, however it correctly will map them to IEEE.

Suprtool/UX 5.0 is now compatible with all versions of HP-UX 11.2x, as well as Oracle version 8 and higher.

Suprtool/UX version 4.8.02 and lower is compatible with HP-UX 9.0 and higher and Oracle 7.

Fastread option is now set to On for Suprtool for HP-UX the regular version. The Dynamic loading version of Suprtool has a  default value of off to start.

Suprtool 5.2 is necessary for use with Oracle 11 and case sensitive passwords.

Itanium Compatibility

There are a couple of differences in the Itanium version of Suprtool, which you need to be aware of.

The DBEdit module is not available in the Itanium versions of Suprtool. This module is invoked by the EDIT command.

The layout for the Verify command is slightly different then the PA-RISC versions of Suprtool.

CPU Serial Number (uname)

This program runs only on CPUs whose serial numbers have been encoded (the "uname" on HP-UX). If it fails to run and you get an "invalid HPSUSAN" error message, contact Robelle for assistance, via support@robelle.com or the support number at 1-800-453-8970.

Documentation

The user manual contains the full description of all the Suprtool suite of products including Dbedit, 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.

You can download our manuals and Change Notices in various formats and order printed (hardcopy) manuals from our web site at:

 http://www.robelle.com/library/manuals/.


Installation

Overview

The following instructions describe the installation process of a new Suprtool release. The new version overwrites an existing version of Suprtool on your HP-UX system.

Installation Instructions

There are typically two main types of installations. You can find the Suprtool for AMXW regular install instructions here:

http://www.robelle.com/downloads/install-amxwprod.html

You can find the Suprtool for AMXW build on your system instructions on the link below. You will need this install if you are going to require the KSAM option, Dynamic Image loading or Omnidex support, or intend to run on Itanium:

http://www.robelle.com/downloads/install-amxwbuildprod.html

Installation Assistance

If you have any questions or run into any problems, please call us. Technical support is available on weekdays from 8 a.m. to 4 p.m. Pacific time at 1.289.480.1060. Technical support can also be obtained via e-mail at: support@robelle.com  If your new version of software will not run, you can page someone from technical support by calling the support number, or you can typically easily run extend with the disaster option to tide you over until business hours. Instructions for this are available at:

http://www.robelle.com/disaster/

 


Enhancements in Version 5.9.10

 

Introduction

Suprtool is constantly being updated with new features. The following section describes the new enhancements to Suprtool since Suprtool 5.9

$INRECNUM

The if / extract commands can now utilize a new function called $INRECNUM, which allows you to use the input record number in certain tasks. For example, the task below would find record number 11.

    In somefile

    If $inrecnum=11  

You can also, utilize the $inrecnum function in the extract command:

    In somefile

    Def recnum,1,4,double

    Ext recnum=$inrecnum

The $inrecnum function was designed to find records especially in the instance where duplicate records are in a particular data source and cannot be isolated by any other means.

 

describes the new enhancements to Suprtool since Suprtool 5.9

$LEADZEROZ

The if / extract commands can now utilize a new function called $LEADZEROZ, which allows you to add leading zeroes to a specific display field. This was designed specifically for the extract command and fixing up data but can be used in the if command as well.

$NUMBER is capable of fixing up numbers, but the new $LEADZEROZ function is more lightweight and simply adds leading zeroes, and has an option to justify right as shown below:

/PRINT LEADZERO

1

 2

  3

   4

    5

     6

      7

       8

      9

10

12

12345

220

RUN SUPRTOOL.PUB.ROBELLE

 

SUPRTOOL/Copyright Robelle Solutions Technology Inc. 1981-2017.

(Version 5.9.10 Internal)  Mon, Feb 27, 2017,  3:48 PM  Type H for help.

>IN LEADZERO.SUPRTEST

>DEF A,1,12,DISPLAY

>EXT A

>OUT *

>XEQ

1

 2

  3

   4

    5

     6

      7

       8

      9

10

12

12345

220

IN=13, OUT=13. CPU-Sec=1. Wall-Sec=1.

 

>IN LEADZERO.SUPRTEST

>DEF A,1,12,DISPLAY

>EXT A=$LEADZEROZ(A,J)

>out *

>xeq

000000000001

000000000002

000000000003

000000000004

000000000005

000000000006

000000000007

000000000008

000000000009

000000000010

000000000012

000000012345

000000000220

IN=13, OUT=13. CPU-Sec=1. Wall-Sec=1.

The $LEADZEROZ function cannot fix issues like commas and decimal places in a display field, this can be handled by the $number function.

$LEADZEROB

The if / extract commands can now utilize a new function called $LEADZEROB, which allows you to add leading zeroes to a specific byte field. This was designed specifically for the extract command and fixing up data but can be used in the if command as well.

 

/PRINT LEADZERO

1

 2

  3

   4

    5

     6

      7

       8

      9

10

12

12345

220

RUN SUPRTOOL.PUB.ROBELLE

 

SUPRTOOL/Copyright Robelle Solutions Technology Inc. 1981-2017.

(Version 5.9.10 Internal)  Mon, Feb 27, 2017,  3:48 PM  Type H for help.

>IN LEADZERO.SUPRTEST

>DEF A,1,12,byte

>EXT A

>OUT *

>XEQ

1

 2

  3

   4

    5

     6

      7

       8

      9

10

12

12345

220

IN=13, OUT=13. CPU-Sec=1. Wall-Sec=1.

 

>IN LEADZERO.SUPRTEST

>DEF A,1,12,byte

>EXT A=$LEADZEROB(A,J)

>out *

>xeq

000000000001

000000000002

000000000003

000000000004

000000000005

000000000006

000000000007

000000000008

000000000009

000000000010

000000000012

000000012345

000000000220

IN=13, OUT=13. CPU-Sec=1. Wall-Sec=1.

 

$JUSTIFYL

The if / extract commands can now utilize a new function called $JUSTIFYL, which allows you to left justify text to the left side of a field.

 

>in leadzero

>def b,1,12,byte

>ext b=$justifyl(b)

>out *

>xeq

1

2

3

4

5

6

7

8

9

10

12

12345

220

IN=13, OUT=13. CPU-Sec=1. Wall-Sec=1.

 

$JUSTIFYR

The if / extract commands can now utilize a new function called $JUSTIFYR, which allows you to right justify text to the right side of a field.

>in leadzero.suprtest

>def a,1,12,byte

>ext a=$justifyr(a)

>out *

>xeq

           1

           2

           3

           4

           5

           6

           7

           8

           9

          10

          12

       12345

         220

IN=13, OUT=13. CPU-Sec=1. Wall-Sec=1.

 

 

 

$RESPACE

The if / extract commands can now utilize a new function called $RESPACE, which allows you to fixup byte data that has multiple spaces in between text.

>in respace.suprtest

>def text,1,40

>ext text

>out *

>xeq

this  is  a  test

 this is a        test

this  is  a   test

this         is a test

this   is   a   test

this is a test

 please note this   is   a     test

this  is   a   test

this    is      a      test

this is a test

       this   is   a   test

 this is a test

this    is    a    test

this is a test

dummy   record

this is a  not   test

silly   record

IN=30, OUT=30. CPU-Sec=1. Wall-Sec=1.

 

>in respace.suprtest

>ext text=$respace(text,J)

>out *

>xeq

this is a test

this is a test

this is a test

this is a test

this is a test

this is a test

please note this is a test

this is a test

this is a test

this is a test

this is a test

this is a test

this is a test

this is a test

dummy record

this is a not test

silly record

IN=30, OUT=30. CPU-Sec=1. Wall-Sec=1.

 

 

Enhancements in Version 5.9

 

Introduction

Suprtool is constantly being updated with new features. The following section describes the new enhancements to Suprtool since Suprtool 5.8.10

$Month

The if / extract commands can now utilize a new function called $Month, which will add a given number of months to a given date in the format of ccyymmdd or yyyymmdd.

For Example:

    In somefile

    Item mydate,date,ccyymmdd

    Def targetdate,1,4,double

    Ext targetdate=$month(mydate,+4)

The above task will take the field mydate and add four months to it. Suprtool will check if the date is valid and adjust the date within reason. For example if the given month for mydate has 31 days and the day is 31, and the month mydate becomes when the date is added to has only 30 days. The date will be adjusted to have the 30th for the day.

 

Excel Command

The Excel command can be used to produce columns of data that when imported will preserve spaces or leading zeroes.

EXCEL PRESERVE <fieldname>

Example

STExport can generate columns that are imported into Excel in such a way that leading zeroes are preserved. While the format produced is not traditional CSV, the format will produce a field in the form:

="00055555"

This form when imported into Excel will preserve the leading zeroes. In order to invoke this format the Excel command has very simple syntax:

$in filexcel

$col fixed

$quote double

$zero leading

$excel preserve newchar int-field

$out *

$xeq

These simple commands will generate a file that will have the usually formatted fields as well as some fields formatted specifically for preserving spaces and leading zeroes in Excel.

The result of such an STExport task will look as follows:

="    11111 ",=" 01111", 0000011111,+00000011111

="    11111 ",=" 02222", 0000022222,+00000022222

 


Json Output

The JSON command specifies STExport to generate Json output. Use the JSON to produce Java Script Object Notation documents for either Internet or Intranet applications.

 

JSON

OBJECT "string"

ONEPERLINE

Example

STExport can generate JSON output with just a few commands.

$input file1sd

$JSON

$output myJSON

$xeq

These four simple commands will generate a file that can be read by various applications. The result of such an STExport task will look as follows:

[{"CHAR-FIELD":"11111","INT-FIELD":1111,"ZONED-FIELD":11111}]

Object

The Object option allows the JSON data to be wrapped in a specific Object description.

 

JSON Object "Json object"

 

Looks like this:

 

{"Json object":

[{\"CHAR-FIELD":\"11111",

\"INT-FIELD"\:1111,

\"DBL\-FIELD"\:11111,

\"PACKED\-FIELD"\:+1111,

\"PACKED\.-FIELD"\:+11111,

\"QUAD\-FIELD"\:11111,

\"ID\-FIELD"\:1,

\"LOGICAL\-FIELD"\:111,

\"DBLLOG\-FIELD"\:11111,

\"ZONED\-FIELD"\:11111

}]

}

 

Note that the example of the Output has one field per line with data. Normally this would have to be specified via the command line but the data is shown this way simply due to space constraints.

 

OnePerLine

 

For files that have many fields you may want to consider using the OneLine option of the JSON command:

 

JSON OnePerLine

 

STExport will put each field and data on one line with the appropriate beginning and end notation.

 

[{\"CHAR\-FIELD"\:"11111",

\"INT\-FIELD"\:1111,

\"DBL\-FIELD"\:11111,

\"PAC\KED\-FIELD"\:+11111,

\"PAC\KED\.-FIELD"\:+11111,

\"QUAD\-FIELD"\:11111,

\"ID\-FIELD"\:1,

\"LOG\ICAL\-FIELD"\:1111,

\"DBL\LOG\-FIELD"\:11111,

\"ZONED\-FIELD"\:11111

}]

Multiple Json Commands

 

You can enter multiple JSON commands per task to set the JSON options you require.

 

$in file1sd

$JSON Object "Json object"

$JSON OnePerLine

$out *

$xeq

 

An example of the output generated by the above commands is as follows:

 

{"Json object":

[{"CHAR\-FIELD"\:"11111",

\"INT\-FIELD"\:1111,

\"DBL\-FIELD"\:11111,

\"PACKED\-FIELD"\:+11111,

\"PACKED\.-FIELD"\:+11111,

\"QUAD\-FIELD"\:11111,

\"ID\-FIELD"\:1,

\"LOGICAL\-FIELD"\:1111,

\"DBLLOG\-FIELD"\:11111,

\"ZONED\-FIELD"\:11111

}]

}

 

           

MySQL Access

Suprtool/Open now has the ability to read MySQL databases via the Open and Select commands. We are looking for alpha, beta testers and feedback specifically on how to treat certain data items. Please e-mail Neil Armstrong at neil@robelle.com to request a trial of this software.

 


Enhancements in Version 5.8

 

Introduction

Suprtool is constantly being updated with new features. The following section describes the new enhancements to Suprtool since Suprtool 5.7.11

Input ($first/$last)

Suprtool now has $first and $last mnemonics, which can be used on a range selection of records on the input command. It was designed to handle a request to list the last N number of records in a file as in:

 

Input somefile($last-10/$last)

Suprtool will parse the Range selection and semantically check if the record range entered is logical. For instance, $first-2 and $last+10, which do not make logical sense would throw and error. Similarly if a record only has 5 records in it then $last-10 or $first+7, would also throw an error.


Enhancements in Version 5.7

 

Introduction

Suprtool is constantly being updated with new features. The following section describes the new enhancements to Suprtool since Suprtool 5.6.

stexpmgr

STExport now has it’s own “suprmgr” file now, which will be executed on startup of STExport. STExport will by default look for /opt/robelle/stexpmgr, or if $ROBELLE variable is set it will execute $ROBELLE/stexpmgr.

linkmgr

Suprlink now has it’s own “suprmgr” file now, which will be executed on startup of Suprlink. Suprlink will by default look for /opt/robelle/linkmgr, or if $ROBELLE variable is set it will execute $ROBELLE/linkmgr.

$Proper

Suprtool now has the $proper function which will shift to upper case the first character of a byte type field and after any space or ampersand. It will also shift to lower case any other characters in the byte-field.

>in mprod

>list stan

>xeq

Apr 29, 2014 13:00                 File: mprod                Page 1  

 

PRODUCT-DESC

 

skil 3/8" variable speed drill

b&d router

skil var. sp. auto-scroll saw

skil 8 1/2" circular saw

b&d cordless screwdriver

makita 8 1/4" circular saw

b&d variable speed jigsaw

makita 1/2" router

makita 3/8" var. speed drill

skil router

b&d 7 1/4" circular saw

b&d 3/8" variable speed drill

makita 1" jigsaw

Considering the following data, you can fix all of the product names with one simple task:

>in mprod

>ext product-desc=$proper(product-desc)

>list stan

>xeq

May 01, 2014 11:40                 File: MPROD                   Page 1  

 

PRODUCT-DESC

 

Skil 3/8" Variable Speed Drill

B&D Router

Skil Var. Sp. Auto-Scroll Saw

Skil 8 1/2" Circular Saw

B&D Cordless Screwdriver

Makita 8 1/4" Circular Saw

B&D Variable Speed Jig Saw

Makita 1/2" Router

Makita 3/8" Var. Speed Drill

Skil Router

B&D 7 1/4" Circular Saw

B&D 3/8" Variable Speed Drill

Makita 1" Jig Saw

 

Note that any character after a space, “&”, or “-“ is upshifted for a proper name. Suprtool will also downshift those characters that do not qualify as needing proper capitalization and it is a capital character, the proper function will downshift those characters. See an example below:

 

>IN NAME

>LIST

>XEQ

>IN NAME.NEIL.GREEN (0) >OUT $NULL (0)

NAME            = NEIL ARMSTRONG

 

>IN NAME

>EXT NAME=$PROPER(NAME)

>LIST

>XEQ

>IN NAME.NEIL.GREEN (0) >OUT $NULL (0)

NAME            = Neil Armstrong

The $proper function only works on byte type fields. (5.6.12)

$Translate

Suprtool now has a $translate function which in conjunction with the translate command allows you to build a translation table, whereby you can translate from any byte character to any character. We have also added a method to a supplied translate table which will allow you to obscure the data such that it can’t be read.

>in newprod

>list

>xeq

>IN NEWPROD.NEIL.GREEN (0) >OUT $NULL (0)

PRODUCT-DESC    = Skil 3/8" Variable Speed Drill

 

>IN NEWPROD.NEIL.GREEN (1) >OUT $NULL (1)

PRODUCT-DESC    = B&D Router

 

>in newprod

>translate tounread

>ext product-desc=$translate(product-desc)

>out unread,link

>xeq

IN=13, OUT=13. CPU-Sec=1. Wall-Sec=1.

 

>in unread

>num 1

>list

>xeq

>IN UNREAD.NEIL.GREEN (0) >OUT $NULL (0)

PRODUCT-DESC    = Hzxo .2)? Epcxpqot Hatts Rcxoo

Warning:  NUMRECS exceeded; some records not processed.

IN=2, OUT=1. CPU-Sec=1. Wall-Sec=1.

 

>in unread

>translate toread

>ext product-desc=$translate(product-desc)

>list

>xeq

>IN UNREAD.NEIL.GREEN (0) >OUT $NULL (0)

PRODUCT-DESC    = Skil 3/8" Variable Speed Drill

 

>IN UNREAD.NEIL.GREEN (1) >OUT $NULL (1)

PRODUCT-DESC    = B&D Router


You can make your own Translate table using the Translate command, where you can specify the character you want to translate and what you want to translate to, using Decimal Notation. So if you want to translate “A” to “Z”, you would type the command:

Translate “^65:^90”

So you specify the from character on the left in decimal which is the capital-A and the to-character is also in decimal format which is capital-Z, which is decimal 90. If you want to reverse the translation you can simply do the following command and translate the field back with:

Translate “^90:^65”

This is not meant to be an encryption solution, but it will help obfuscate test date really quickly. (5.6.12)


Enhancements in Version 5.6

Introduction

Suprtool is constantly being updated with new features. The following section describes the new enhancements to Suprtool since Suprtool 5.5

Extract Command

Suprtool's extract command now has three new keywords, which can be used for extract range feature. You can now say extract $all, extract  $first / $last on an SD file or Image/Eloquence dataset. The intention is to make your scripts more easily maintained. If you had a script that you wanted to put a sequence number at the beginning and then extract the rest of the dataset you previously had to specify the starting field and the ending field. For example if the first field in a dataset was order-no and the last field was pst-code you may have a script that looked like this.

 

base orddb

get customers

def seq-no,1,4,double

ext seq-no=$counter

ext order-no / pst-code

out newfile,link

xeq

If you added any fields to the beginning or end of the dataset you would have to re-write the script. Now you can write the script as being:

base orddb

get customers

def seq-no,1,4,double

ext seq-no=$counter

ext $all

out newfile,link

xeq

You can also write the script using $first / $last as your preference, but $first and $last are also useful if you need to add data into the middle of the fields you extract:

base orddb

get customers

def seq-no,1,4,double

ext $first / zip

ext seq-no=$counter

ext tax-code / $last

out newfile,link

xeq

Please note that if a self-describing file has a fieldname that is a duplicate field and one of the duplicate fields is the last field in the file, then $first / $last and $all, will only extract up to the first occurrence of the duplicate fieldname. This may seem as an issue but it is consistent with what Suprtool does currently with extract from a range. Currently and prior to the $first / $last enhancement Suprtool would have extracted only up to the first occurrence of the field if you had a file such as this:

>form

File: newfile     (SD Version B.00.00)  Has linefeeds

       Entry:                     Offset

          CHAR-FIELD           X5      1

          INT-FIELD            I1      6

          DBL-FIELD            I2      8

          PACKED-FIELD         P12    12

          PACKED*-FIELD        P12    18

          QUAD-FIELD           I4     24

          ID-FIELD             I1     32

          LOGICAL-FIELD        K1     34

          DBLLOG-FIELD         K2     36

          ZONED-FIELD          Z5     40

          FILLER               X36    45

          FILLER               X36    81

    Entry Length: 116  Blocking: 1

Notice that FILLER is a duplicate named field, so if you entered, extract char-field / filler, Suprtool would only extract up to and including the first FILLER field. For consistency, extract $first / $last behaves the same way.

Data Items Support

Suprtool now supports 512 data items in both Eloquence datasets and SD files and Oracle fields. STExport and Suprlink have also been updated to support the increased number of data items in the SD fields that they read, but please note that other limitations still exist. [5.5.10]

$SubCount

$SubCount has been added to provide a counter that only gets reset at a given sort break.

 

In file1sd

Sort char-field

Def control-count,1,4,double

Ext $first / $last

Ext control-count=$subcount(char-field)

Out newfile,link

xeq

What Suprtool will do in this case is start incrementing a number starting with 1, and increase by 1 for any given char-field value. This way you can add a counter based on a sort break for a given field.

CCTL on Output

Suprtool for AMXW now detects if the output file has cctl and if it does it will now use the correct controlcode on FWRITE.

 

Defined Items Support

Suprtool for AMXW now supports a greater number of defined items, equivalent to what Suprtool for MPE supports.


Bugs Fixed

Bugs Fixed In Suprtool 5.9.11

Perfwrite.  Set AMXW Perfwrite On would cause Suprtool to fail when doing output somefile,append.

Bugs Fixed In Suprtool 5.9

Add Command.  The Add command would fail if a Table in an Oracle database accessible by a given username had more than 2.1 billion entries on Oracle 11 and higher.

Bugs Fixed In Suprtool 5.6.10

If Command.  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.”

 

Bugs Fixed In Suprtool 5.5.11

COPY command. Suprtool for AMXW had a conflict and would fail when copying a C/ISAM file from inside Suprtool.

 

Bugs Fixed In Suprtool 5.5.04

SD File Copy. Suprtool would use an incorrect field definition on a straight copy of an SD file if the input file had a duplicate field name with different byte lengths. (HP-UX only)

 

Bugs Fixed In Suprtool 5.5.03

Extract Command. Suprtool would give an incorrect result when doing an Arithmetic Expression that has more than one set of brackets as in: extract amt-p=(packed-field + packed-field) – (packed-field *2) (Itanium only)

Bugs Fixed In Suprtool 5.5.02

Decimal to Ascii. Suprtool and STExport would incorrectly assume a positive sign for a packed-decimal field that had an invalid sign value, when converting from Decimal to Ascii. (Itanium only)

Bugs Fixed In Suprtool 5.5.01

Ifouroutput. Set  Ifouroutput  on  extracts would fail at xeq time with an "Unknown if  execute phase" error in the PA_RISC  version,  when  an  alignment  issue  would occur in some circumstances.

KSAM files. Suprtool for AMXW would fail to open a "KSAM" file in AMXW when the implementation was done via CISAM.

Fields. Suprtool for AMXW did not allocate enough space to support the same number of defined fields and items as previous versions.

Bugs Fixed In Suprtool 5.5

$edit function. The $edit function did not work well with alpha based edit masks and if the target was greater than 32 characters.

Output,data. Suprtool would write out double the calculated record size when set oracle integer was on or set ifouroutput was on, and output,data option was used and no extract commands were specified.