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

Re: Error writing to a file



>From the SQR manual:

When writing numeric variables, the length argument is required. Only 1,2 or 4 
byte binary integers are written. Floating point values are not supported 
directly in the WRITE command. However, you can first convert floating point 
numbers to strings and then write the string.

HTH,
Peter

>>> "Grewal, Navi A." <navi.grewal@EXELONCORP.COM> 2001/11/08 11:04:02 am >>>
Hi Everyone,
I am trying to write to a fileand i am getting following errors( they ar at
the end in red) can someone please help me with this
Thanks a lot

begin-procedure Open-File
   Open 'c:\temp\PTOtesting.csv' as 1 for-writing record=250
   status = #Filestat
   if #Filestat <> 0
      display 'Unsuccessful opening the output file'
   end-if
end-procedure
begin-procedure Write-Employee-Record

   Write 1 from
                $company           -
                $comma          -
                $emplid         -
                $comma          -
                $business_unit       -
                $comma          -
                $fullpt           -
                $comma          -
                $rating_scale        -
                $comma          -
                $status        -
                $comma          -
                $hire_dt        -
                $comma          -
                $service_dt      -
                $comma          -
                #std_hours        -
                $comma          -
                #Years_of_service      -
                $comma          -
                #entitlement         -

end-procedure



Error on line 151:
   (SQR 3211) #Numeric variables and literals must have :length of 1, 2 or 4
bytes.
   Write 1 from

Error on line 153:
   (SQR 3211) #Numeric variables and literals must have :length of 1, 2 or 4
bytes.
   Write 1 from

Error on line 155:
   (SQR 3211) #Numeric variables and literals must have :length of 1, 2 or 4
bytes.
   Write 1 from

Error on line 157:
   (SQR 3503) Unknown variable type.
   Write 1 from

Navi Grewal
Senior Analyst
215.841.5834
Exelon
BSC Information Technology




************************************************************************
This e-mail and any of its attachments may contain Exelon Corporation
proprietary information, which is privileged, confidential, or subject
to copyright belonging to the Exelon Corporation family of Companies.
This e-mail is intended solely for the use of the individual or entity
to which it is addressed.  If you are not the intended recipient of this
e-mail, you are hereby notified that any dissemination, distribution,
copying, or action taken in relation to the contents of and attachments
to this e-mail is strictly prohibited and may be unlawful.  If you have
received this e-mail in error, please notify the sender immediately and
permanently delete the original and any copy of this e-mail and any
printout. Thank You.
************************************************************************