SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 45200: The FDSTART option of the ARG statement might generate an incorrect argument list and thus cause errors

DetailsHotfixAboutRate It

The FDSTART option of the ARG statement in a SASCBTBL argument definition table for calling DLLs from SAS allows grouping arguments as "structures" to a C language routine. However, when certain combinations of argument types are used this way, the argument list to be passed can be generated incorrectly, such as passing null pointers that can cause a program tp stop.

Click the Hot Fix tab in this note to access the hot fix for this issue.

After the hot fix is in place, you also must bracket the argument structures with a new FDEND token to delineate the structure's end. An example of a SASCBTBL so modified is shown below:

routine fe2test
  minarg=8
  maxarg=8
  returns=long;
  arg   1 update char  byaddr        format=$cstr32.;
  arg   2 input  char  byaddr        format=$cstr32.;
  arg   3 input  num   byvalue       format=ib4.;
  arg   4 update num   fdstart fdend format=ib4.;
  arg   5 update num   fdstart       format=ib4.;
  arg   6 update num                 format=ib4.;
  arg   7 update num                 format=ib4.;
  arg   8 update num   fdend         format=ib4.;

In this example, there are 2 aggregates, such that the called routine has 5 arguments: arguments 1 and 2 are "by address," argument 3 is passed "by value," argument 4 is an "aggregate" of one numeric, and, finally, argument 5 is an aggregate of 4 numerics.



Operating System and Release Information

Product FamilyProductSystemProduct ReleaseSAS Release
ReportedFixed*ReportedFixed*
SAS SystemBase SASMicrosoft® Windows® for 64-Bit Itanium-based Systems9.219.3_M29.2 TS2M39.3 TS1M0
Microsoft Windows Server 2003 Datacenter 64-bit Edition9.219.3_M29.2 TS2M39.3 TS1M0
Microsoft Windows Server 2003 Enterprise 64-bit Edition9.219.3_M29.2 TS2M39.3 TS1M0
Microsoft Windows XP 64-bit Edition9.219.3_M29.2 TS2M39.3 TS1M0
Microsoft® Windows® for x649.219.3_M29.2 TS2M39.3 TS1M0
Microsoft Windows Server 2003 Datacenter Edition9.219.3_M29.2 TS2M39.3 TS1M0
Microsoft Windows Server 2003 Enterprise Edition9.219.3_M29.2 TS2M39.3 TS1M0
Microsoft Windows Server 2003 Standard Edition9.219.3_M29.2 TS2M39.3 TS1M0
Microsoft Windows Server 2003 for x649.219.3_M29.2 TS2M39.3 TS1M0
Microsoft Windows Server 20089.219.3_M29.2 TS2M39.3 TS1M0
Microsoft Windows Server 2008 for x649.219.3_M29.2 TS2M39.3 TS1M0
Microsoft Windows XP Professional9.219.3_M29.2 TS2M39.3 TS1M0
Windows 7 Enterprise 32 bit9.219.3_M29.2 TS2M39.3 TS1M0
Windows 7 Enterprise x649.219.3_M29.2 TS2M39.3 TS1M0
Windows 7 Home Premium 32 bit9.219.3_M29.2 TS2M39.3 TS1M0
Windows 7 Home Premium x649.219.3_M29.2 TS2M39.3 TS1M0
Windows 7 Professional 32 bit9.219.3_M29.2 TS2M39.3 TS1M0
Windows 7 Professional x649.219.3_M29.2 TS2M39.3 TS1M0
Windows 7 Ultimate 32 bit9.219.3_M29.2 TS2M39.3 TS1M0
Windows 7 Ultimate x649.219.3_M29.2 TS2M39.3 TS1M0
Windows Vista9.219.3_M29.2 TS2M39.3 TS1M0
Windows Vista for x649.219.3_M29.2 TS2M39.3 TS1M0
* 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.