locked
SAS to VB.Net RRS feed

  • Question

  • User1122355199 posted

    Hello everyone and thanks for your help in advance.  I need to convert a set of SAS to VB.Net but have never worked with SAS and really know nothing about it.  There is a page with the formulas that I need to convert located at : http://www.cdc.gov/nccdphp/dnpao/growthcharts/resources/who-source-code.sas I really need to figure out how to convert this but don't know where to start.  Any help would be appreciated.

    Thursday, September 15, 2016 1:58 PM

Answers

  • User347430248 posted

    Hi Kmcnet,

    you can visit the SAS website. they have provided a code samples for Vb.Net and C#.Net.

    something like below.

    ' VB6 code
    ' Primary interface declared as coclass name (without the leading "I").
    Dim ws as new SAS.Workspace
    Dim fref as SAS.Fileref
    Dim name as string
    Set fref = ws.FileService.AssignFileref("myfilref", _
    "DISK", "c:\myfile.txt", "", name)
    ' Secondary interface must use COM interface name (requires "I").
    ' There is no "SAS.FileInfo" because this is only an interface,
    ' not an object (coclass).
    Dim finfo as SAS.IFileInfo
    ' Call a method on the default interface.
    debug.print fref.FilerefName
    ' Obtain a reference to the secondary interface on the object.
    set finfo = fref
    ' Make a call using the secondary interface.
    debug.print finfo.PhysicalName

    They also provide a support for this. so if you have any question regarding SAS you can ask there.

    These are some links of there website.

    Sample 25276: Reading SAS Data in .Net Using ADO and ADO.NET

    Programming in the .NET Environment with SAS

    Regards

    Deepak

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, September 16, 2016 10:41 AM

All replies

  • User347430248 posted

    Hi Kmcnet,

    you can visit the SAS website. they have provided a code samples for Vb.Net and C#.Net.

    something like below.

    ' VB6 code
    ' Primary interface declared as coclass name (without the leading "I").
    Dim ws as new SAS.Workspace
    Dim fref as SAS.Fileref
    Dim name as string
    Set fref = ws.FileService.AssignFileref("myfilref", _
    "DISK", "c:\myfile.txt", "", name)
    ' Secondary interface must use COM interface name (requires "I").
    ' There is no "SAS.FileInfo" because this is only an interface,
    ' not an object (coclass).
    Dim finfo as SAS.IFileInfo
    ' Call a method on the default interface.
    debug.print fref.FilerefName
    ' Obtain a reference to the secondary interface on the object.
    set finfo = fref
    ' Make a call using the secondary interface.
    debug.print finfo.PhysicalName

    They also provide a support for this. so if you have any question regarding SAS you can ask there.

    These are some links of there website.

    Sample 25276: Reading SAS Data in .Net Using ADO and ADO.NET

    Programming in the .NET Environment with SAS

    Regards

    Deepak

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, September 16, 2016 10:41 AM
  • User1122355199 posted

    Just what I needed.  Thanks for the help.

    Thursday, September 22, 2016 3:44 PM