[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
- Subject: Re: Error writing to a file
- From: "Beller, Jay" <jbeller@LBISOFTWARE.COM>
- Date: Thu, 8 Nov 2001 10:22:31 -0500
When writing out the file, string literals can have an implicit field width
(their current width), but numeric fields must be declared as 1-, 2- or
4-byte widths (e.g., #Years_of_service:1).
However, since you're writing out a .csv, you should convert the numeric
fields to character strings (use edit masks to get the format you want) and
then write out the string variable. When imported into a spreadsheet, the
fact that the element contains numeric data will cause the data to import as
numeric.
-----Original Message-----
From: Grewal, Navi A. [mailto:navi.grewal@EXELONCORP.COM]
Sent: Thursday, November 08, 2001 10: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.
************************************************************************