SUPPORT / SAMPLES & SAS NOTES
 

Support

Usage Note 15647: Documentation for SAS/TOOLKIT® software

DetailsAboutRate It

There is no single and comprehensive document for SAS/TOOLKIT for SAS®9. Since SAS® 6, changes and enhancements for SAS/TOOLKIT have been released as supplemental documentation to the original SAS 6 SAS/TOOLKIT reference, "SAS/TOOLKIT Software: Usage and Reference, Version 6, First Edition."

The supplemental information that explains SAS/TOOLKIT changes and enhancements follows:

SAS® 6

SAS Technical Report P-245 SAS/TOOLKIT Software: Changes and Enhancements Releases 6.08 and 6.09

SAS Technical Report P-246 SAS/TOOLKIT Software: Graphics Capabilities, Releases 6.08

SAS® 7

There were no changes made to SAS/TOOLKIT software for SAS 7.

SAS® 8

Changes made for SAS 8 are described in Changes and Enhancements for Version 8.1 of SAS/TOOLKIT.

Although this document explicitly references SAS 8.1, the changes apply to SAS 8 in general.

SAS®9

Changes to SAS/TOOLKIT for SAS®9 are as follows:

  • You can no longer use XO_NVARS as the option to SAS_XOINFO to obtain the number of variables. Instead, you must now use XO_NUMVARS, and the return value is a long integer (XO_NVARS used a pointer to a short integer). Also, for C coding, there is a typedef of SASNVARS that can be used instead of hard coding 'long'. This also impacts parsing code where SFLP returns a pointer to a varnum list. These are now lists of longs instead of lists of shorts. Note that SAS_XFFILE, SAS_XVFIND, and SAS_XVPUTCV are all called with varnum pointers.
  • Format names are now 32 characters instead of 8. When using the SAS_XFNAME routine, the first argument is now treated as a string of length 32. The SAS_XFNAME routine considers the format name terminated when it encounters the first blank, null terminator, or the 32nd character, whichever comes first.
  • The X_STRING structure now uses an unsigned short instead of a signed short for maxlen and curlen. Note, however, that the length of character variables is still limited to 32,767 for the DATA step. There are some other circumstances, such as macro processing, where the string can exceed 32K.
  • SAS_XVFINDX is added to handle long varnames:
       rctype rc;
       ptr fileid;
       ptr varnamep;
       int varnamel;
       SASNVARS varnum;
       ...
       rc = SAS_XVFINDX(fileid,varnamep,varnamel,&varnum);

    The varnamep pointer refers to a variable name, with varnamel indicating the length of this variable name. If the RC is returned as 0, the varnum value is set to the located variable number. Compare this to SAS_XVFIND:

      rc = SAS_XVFIND(fileid,varname,&varnum);

    Varname is assumed to point to an 8-byte variable name.

The differences between SAS 8 and SAS 9 are shown in the following example sources:

  • cengxmpl.c fills format names with sizeof(np->nform) (now 32) instead of a hard coded 8.
  • cexample.c uses XO_NUMVARS instead of XO_NVARS. It declares the receiving variable as SASNVARS.
  • cfunc.c declares its routines using unsigned short * instead of short *.
  • csimple.c is using lists of SASNVARS instead of lists of shorts.
     

SAS®9.4M5 (TS1M5)

This section describes the changes to SAS/TOOLKIT for SAS 9.4M5.

Before SAS 9.0 was first released in August of 2002, there was a requirement that any SAS/TOOLKIT application needed to be recompiled and relinked. Previously, this had been a requirement when a new major version of the SAS system was released. However, in SAS 9, you did not have to rebuild the SAS/TOOLKIT. Therefore, any subsequent SAS release could use the same images, as long as the operating system was the same.

Starting in SAS 9.4M5, you needed to rebuild SAS/TOOLKIT applications that were not on z/OS (MVS). This requirement was due to a low-level change for SAS images. So, SAS/TOOLKIT applications built prior to SAS 9.4M5 could still be run in SAS 9.4M5 (under z/OS) without a problem. Also, if any of the SAS_DSS* routines were used (SAS_DSSRSI, SAS_DSSRSIT, SAS_DSSRSN, or SAS_DSSRSIF), then you might need to change the source code.

This change is required because the following union exists in the SYMINFO structure, defined in uwproc.h:

     union
      {
        ptr             cloc;
        double          *floc;
        struct X_STRING {
         unsigned short maxlen;   /* The allocated length           */
         unsigned short curlen;   /* The current length             */
         ptr   data;              /* The pointer to the string data */
          }             *tloc;
      } loc;                      /* Value storage location        */


The definition of the X_STRING structure changed in SAS 9.4M5. However, this definition was not changed in uwproc.h. The definition should have changed to the following:

     union
      {
        ptr             cloc;
        double          *floc;
        struct X_STRING {
         long maxlen;            /* The allocated length            */
         long curlen;            /* The current length             */
         ptr   data;             /* The pointer to the string data */
          }             *tloc;
      } loc;                     /* Value storage location        */

 
 

For Windows platforms and MVS, 'long long' is used instead of 'long'.

If you are using any of the SAS_DSS routines, you might need to change the SYMINFO structure in uwproc.h. Note that if the elements of the X_STRING structure are not accessed, such that only FLOC or CLOC is used, then there is no need to change this definition.

If you are using IBM assembly language on MVS and using one of the SAS_DSS* routines, you might be accessing the maxlen, curlen, or data fields. Note that these fields are not defined in the SYMINFO DSECT. The DSECT has the following field defined:

syminfo_loc           ds a

If you were accessing the maxlen field, you would previously have had code similar to the following:

l    r1,syminfo_loc
lh   r0,0(r1)         maxlen value
lh   r2,2(r1)         curlen value
l    r3,4(r1)         r3->data

In SAS 9.4M5, the code changes to the following, using different offsets:

l    r1,syminfo_loc
lh   r0,6(r1)         maxlen value
lh   r2,14(r1)        curlen value
l    r3,16(r1)        r3->data


Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemSAS/TOOLKITMicrosoft Windows XP Professional9 TS M0
Microsoft Windows NT Workstation9 TS M0
Microsoft Windows Server 2003 Enterprise Edition9 TS M0
Microsoft Windows Server 2003 Standard Edition9 TS M0
Microsoft® Windows® for 64-Bit Itanium-based Systems9 TS M0
Microsoft Windows Server 2003 Datacenter Edition9 TS M0
Microsoft Windows 2000 Professional9 TS M0
Microsoft Windows 2000 Server9 TS M0
Microsoft Windows 2000 Advanced Server9 TS M0
Microsoft Windows 2000 Datacenter Server9 TS M0
Linux9 TS M0
z/OS9 TS M0
64-bit Enabled Solaris9 TS M0
Solaris9 TS M0
Tru64 UNIX9 TS M0
64-bit Enabled AIX9 TS M0
OpenVMS Alpha9 TS M0
64-bit Enabled HP-UX9 TS M0
HP-UX IPF9 TS M0
HP-UX9 TS M0
AIX9 TS M0
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.