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

Re: Everything You Always Wanted to Know About .CSV but Were Afra id t o Ask



No Declare Report, No Print Statements.

Look for a sample program to clone, and focus on how to open the file and
how to write to the file.

example
Open c:\temp\myfile.csv as 1
   for-writing
   record=1000
   status= #Open1

Instead of print statements

Write 1 from $Variable:10
                 ',':1
                 $Variable:50
                 ',':1

Each time you write to file = 1 line

and so on.

Bruce



-----Original Message-----
From: Turner, Ivan [mailto:Ivan.Turner@QWEST.COM]
Sent: Thursday, October 11, 2001 5:09 PM
To: SQR-USERS@list.iex.net
Subject: Re: Everything You Always Wanted to Know About .CSV but Were
Afra id t o Ask


I want to write a file that the end user can open in Excel.  Can I specify a
csv file format in an OPEN statement? Or can I specify a csv format and file
extension  in DECLARE-REPORT and use PRINT statments?

-----Original Message-----
From: Weaver, Judith R [mailto:WeaverJR@USAFOO.UNITEDSPACEALLIANCE.COM]
Sent: Thursday, October 11, 2001 4:35 PM
To: SQR-USERS@list.iex.net
Subject: Re: Everything You Always Wanted to Know About .CSV but Were
Afra id t o Ask


Ivan
I don't believe that it's necessary (or possible)to delare or specify a .csv
file.  The attributes that determine whether a .csv file is recognized as
such by software such as Microsoft's Excel is to write out comma delimited
records to a file name <whatever>.csv.
To read a comma delimited file using SQR, simply OPEN the file for READING
and READ each record into a $variable and then UNSTRING this $variable by
',' into receiving $variables.

-----Original Message-----
From: Turner, Ivan [mailto:Ivan.Turner@QWEST.COM]
Sent: Thursday, October 11, 2001 4:13 PM
To: SQR-USERS@list.iex.net
Subject: Re: Everything You Always Wanted to Know About .CSV but Were
Afra id t o Ask


If I can't specify it there, where do I specify it?

-----Original Message-----
From: Turner, Ivan [mailto:Ivan.Turner@QWEST.COM]
Sent: Thursday, October 11, 2001 3:47 PM
To: SQR-USERS@list.iex.net
Subject: Everything You Always Wanted to Know About .CSV but Were Afraid
t o Ask


I never thought I would need to use a .CSV file so aI always deleted the CSV
messages.  Now I have questions.
Can I specify a csv file and format in DECLARE-REPORT?
Can I specify a csv file and format in an OPEN stmt?

If so, how?

Ivan C. Turner
Qwest Communications Intl., Inc.