Thanks Symeon

 

I have created one program file (outfile ) with followinf contents
Facing compilation error

 

OPEN 'CUSTOMER' TO FIL ELSE STOP 201 'CUSTOMER'

OPENSEQ 'OUTPUT.CSV' TO CSVFIL

WEOFSEQ CSVFIL

SELECT FIL

LOOP WHILE READNEXT ID DO

 READ REC FROM FIL,ID THEN

 LINE = '"' : CHANGE(CHANGE(REC,@AM,'","'),@SVM,',') : '"'

 WRITESEQ LINE ON CSVFIL ELSE CRT 'CAN NOT EWRITE TO CSV FILE'

END

REPEAT

 

 

Facing compilation error

 

:BASIC BP outfile

 

Compiling Unibasic: BP/outfile in mode 'u'.

main program: syntax error at or before

<line 2> OPENSEQ 'OUTPUT.CSV' TO CSVFIL

         ------------------------------^

Expecting: ELSE

 

compilation failed

 

 

 

Thanks & Regards,

Dattatraya Walgude

DBA Team 

Rsystems International Ltd, Pune,

( : +91-20-22909212

 

 

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Symeon Breen
Sent: Monday, October 12, 2009 4:28 PM
To: 'U2 Users List'
Subject: Re: [U2] Unibasic: Sample program - to extract data from Table

 

The big question is extract to what ?  csv ? xml ? another data table ?

 

Here is a very quick simple extract to a csv - this is just off the top
of

my head so i have not compiled it or tested it.

 

OPEN 'FILE' TO FIL ESLE STOP 201,'FILE'

OPENSEQ 'OUTPUT.CSV' TO CSVFIL

WEOFSEQ CSVFIL

SELECT FIL

LOOP WHILE READNEXT ID DO

 READ REC FROM FIL,ID THEN

 LINE = '"' : CHANGE(CHANGE(REC,@AM,'","'),@SVM,',') : '"'

 WRITESEQ LINE ON CSVFIL ELSE CRT 'CAN NOT EWRITE TO CSV FILE'

END

REPEAT

 

 

 

 

Rgds

Symeon.

 

 

-----Original Message-----

From: [email protected]

[mailto:[email protected]] On Behalf Of Dattatraya

Walgude

Sent: 12 October 2009 06:14

To: [email protected]

Subject: [U2] Unibasic: Sample program - to extract data from Table

 

Dear All

 

 

 

I am new in Unidata/Unibasic, I want a sample program to extract data

from one of our big history table.

 

 

 

Kindly give me any link/ suggestion.

 

Thanks & Regards,

Dattatraya Walgude

 

 

 

 

 

 

****************  Disclaimer *****************

 

 

 

 

This mail, including any attachments contains confidential and
privileged

information for the sole use of the addressee(s). If you are not the

intended recipient, 

 

please notify the sender by e-mail and delete the original message.  Any

unauthorized review, use, disclosure, dissemination, forwarding,
printing or

copying of

 

 this email or any action taken in reliance on this e-mail is strictly

prohibited and are unlawful. This e-mail may contain viruses. R Systems

International Limited  has 

 

taken every reasonable precaution to minimize this risk.  R Systems

International Limited is not liable for any damage you may sustain as a

result of any virus in this e-mail. 

 

Before opening the e-mail or attachment, You should carry out your own
virus

checks. R Systems International Limited reserves the right to record,

monitor, and inspect

 

 all email communications through its internal and external networks.  R

Systems International Ltd prohibits its information systems from being
used

to view, store or forward 

 

offensive or discriminatory material.

 

 

 

******** End of Disclaimer ********

 

_______________________________________________

U2-Users mailing list

[email protected]

http://listserver.u2ug.org/mailman/listinfo/u2-users

 

_______________________________________________

U2-Users mailing list

[email protected]

http://listserver.u2ug.org/mailman/listinfo/u2-users

 

 

_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to