Resources

More about This Product

Feedback

SAS/C

The SAS/C® Tour


Translating, Compiling and Prelinking ftoc.cxx

The procedure for translating, compiling and prelinking a C++ program from the DOS shell is very similar to the way you compile and prelink a C program. The sascc370 driver is used in both cases.

  1. To translate, compile and prelink the ftoc.cxx program, make C:\test\ftocxx your current working directory and enter the following command:

    sascc370 -v ftoc.cSascc370 –v –o ftoc.out ftoc.cxx
    Your output will be similar to the following:

    
    SAS/C Compiler Driver V7.00.01
    Copyright (C) 2000 SAS Institute Inc.
    set INCLUDE370='C:\Program Files\SAS Institute\SASC701\Include'
    
    "C:\Program Files\SAS Institute\SASC701\host\wnt\bin\cxx" 
    -Adigraph1 -Adigraph2 -DCROSS370=1 -XA -Hu '-mftoc' "ftoc.cxx" 'C:\TEMP\sascc80.79.c'
    
    "C:\Program Files\SAS Institute\SASC701\host\wnt\bin\lc1" 
    -dCROSS370=1 -hu -n! -cxx '-sftoc' '-oC:\TEMP\sascc81.1.q' "C:\TEMP\sascc80.79.c"\
    SAS/C Release 7.00.01 (Target 370 Cross Compiler)
    Copyright(c) 2000 by SAS Institute Inc.  All Rights Reserved.
    *** No errors; No warnings; No user suppressed warnings
    
    "C:\Program Files\SAS Institute\SASC701\host\wnt\bin\lc2" 
    '-oftoc.obj' "C:\TEMP\sascc81.1.q"
    SAS/C Compiler(Phase 2)Release 7.00.01
    Copyright(c) 2000 by SAS Institute Inc.  All Rights Reserved.
    
    "C:\Program Files\SAS Institute\SASC701\host\wnt\bin\cool" 
    -o "ftoc.out" -L"C:\Program Files\SAS Institute\SASC701" ftoc.obj 
    "C:\Program Files\SAS Institute\SASC701"/lib/libcxx.a "C:\Program Files\SAS Institute\SASC701"/lib/mvs/libc.a
    SAS/C (R) C Object Code Pre-linker Release 7.00.01
    Copyright(c) 2000 by SAS Institute Inc.  All Rights Reserved.
    
    cool: Note 1010: Pre-linking completed with return code = 0
    
      
    Notice that cxx, lc1, lc2, and cool have been invoked.
  2. Use the DIR command to list the files in your C:\test\ftoc.cxx directory. You should have an ftoc.obj file which is the output from the compiler and ftoc.out file which is the prelinked output file. You can FTP the ftoc.out file over to MVS and create a load module using the same procedure described above for ftoc.c.