[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
RE: [sqr-users] Read Flat file
- Subject: RE: [sqr-users] Read Flat file
- From: Bob Stone <bstone@fastenal.com>
- Date: Mon, 13 Dec 2004 16:38:43 -0600
- Delivery-date: Mon, 13 Dec 2004 17:39:54 -0500
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
Lets say you've already OPENed your file and you're using the READ command
to read in each line. If you're saying there's a header line that you dont
want (such as column names like SSNO and 'name'), then just read in the
extra line before you start your processing.
Read 1 into $input !THIS IS THE FIRST LINE - HEADER
! do nothing with header line
While 1 = 1
Read 1 into $input
if #end-file = 1
break
end-if
do process_data_line
end-while
-----Original Message-----
From: sqr-users-bounces+bstone=fastenal.com@sqrug.org
[mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of
radhika reddy
Sent: Monday, December 13, 2004 4:13 PM
To: sqr-users@sqrug.org
Subject: [sqr-users] Read Flat file
Hi,
I have a requirement where i have to read a flat file in SQR. The flat
file has heading and then the data. earlier i wrote some sqr's where i read
the data without heading like the following:-
but now i want to process the data without heading. Any ideas?
let $file = {FILEPREFIX}emplben.txt
OPEN $file AS 10
FOR-READING
RECORD=301:VARY
STATUS = #OPEN1
IF #OPEN1 =-1
SHOW 'ERROR OPENING INPUT FILE:'
let #prcs_run_status = #prcs_run_status_unsuccessful
let $prcs_message_parm1 = 'Unsuccessful Completion'
do Update-Prcs-Run-Status
STOP
END-IF
For example:-
SSNO Name
4453333333 Paul
3443434343 kim
Here i just want to process the data.
Thanks.
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users