[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

dat output files -Reply



Hi  Yolanda

I write flatfiles by selecting the columns is wish to be
included in the file and then format them into fixed lengths
through the print command. This will create a .LIS file you
can specify the filename if you so choose.
Example:

 !fORMAT FOR FLAT FILE


 print    $lastname     (0,0,015)      ! NAME
 print    $div               (0,0,002)      ! DIVISION
 print    &dept            (0,0,003)      ! DEPT
 print    &pltsite          (0,0,002)      ! PLT SITE
 print    $location        (0,0,010)      ! LOCATION
 print    $Phone          (0,0,013)      ! PHONE
 print    $dcode          (0,0,001)      ! D CODE
 print    $device          (0,0,005)      ! DEVICE DESCRIPTION
 print    &changedte    (0,0,008)       edit mm/dd/yy
 print    $hnum           (0,0,008)      ! H NUMBER
 print    &port             (0,0,004)      ! PORT
 print    &harm           (0,0,005)      ! HARMONICA
 print    &idf               (0,0,008)      ! IDF
 print    &node           (0,0,008)      ! NODE



NEW-PAGE
 FROM COMPANY
  WHERE COMPANY.COMPANY =  &ENAME
END-SELECT
END-PROCEDURE

begin-setup
  page-size 1 0297
  no-formfeed
end-setup


Hope this helps
Wes

Wes Williams
Sundstrand Aerospace
815.226.6196
wwilliams@snds.com


>>> YMCKINNE
<YMCKINNE%LANIER.COM@internet.rkd.snds.com>
01/16/98 12:56pm >>>
     I am a new user of sqr and I am trying to create a flat file.
I am
     opening and writing to a file within my sqr code.  When I
run my code,
     my output is sent to my temp file in my c directory.

     When I run my code, I am not finding my .dat file in the
temp file on
     my c directory or anywhere on my c drive.  I was
wondering if someone
     could give me some advice on what I might try to fix the
problem.


     My code is as follows:

     begin-procedure init
     do create_file
     end-procedure !init

     !**************************************************************
     !Create File
     !**************************************************************

     begin-procedure create_file
          open '{filename.dat}'as 1 for-writing stat=#status
record=2050
     end-procedure !create_file


     Thanks,

     Yolanda