[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



Navi,

You should move your numeric variables to character variables before writing
out to the file. For example, move #std_hours to $std_hours 09.99 and move
#years_of_service to $year_of_service 09999. You will not have any problems
if you do this.




Clint Lu
Sr. Programmer/Analyst
Caremark Rx, Inc.
Phone: (847) 559-4717
Fax    : (847) 559-4840


-----Original Message-----
From: Grewal, Navi A. [mailto:navi.grewal@EXELONCORP.COM]
Sent: Thursday, November 08, 2001 9:04 AM
To: SQR-USERS@list.iex.net
Subject: Error writing to a file


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.
************************************************************************