DICTIONARY FOR A CONSTANT

12 views
Skip to first unread message

jlogdup

unread,
Oct 12, 2009, 9:10:28 AM10/12/09
to jBASE
Hello, I am trying to put a comma character as separator on my reports
but is not working as simple as listing ","

Example,
I want something like:


LIST MYFILE field1 "," field2 "," field3


but the outout still the same:

1 100001 MIKE W
2 100002 SAM W
3 100003 NICK C

And I do want
1 , 100001 , MIKE , W
2 , 100002 , SAM , W
3 , 100003 , NICK , C

How I can put the character comma beetwen the fields ?

Thanks

Daniel Klein

unread,
Oct 12, 2009, 9:41:44 AM10/12/09
to jb...@googlegroups.com
You will need to create a dictionary item that concatenates the
fields that you want.

Dan

John Fenlon

unread,
Oct 12, 2009, 4:58:47 PM10/12/09
to jb...@googlegroups.com
You could also use

SQLSELECT field1, ',', field2, ',', field3 FROM MYFILE

(btw - don't use double quotes use single one as per example)

To remove headings etc see the doco for environmental settings.

john

Simon Verona

unread,
Oct 12, 2009, 5:50:32 PM10/12/09
to jb...@googlegroups.com
I've not read the full thread, but you could create a dictionary that displays a comma...

eg  ED DICT MYFILE COMMA
001 S
002 0
003 \
004
005
006
007 A;","
008
009 L
010 1

Then you can do :  

LIST MYFILE FIELD1 COMMA FIELD2 COMMA FIELD3 COMMA FIELD4

not mega elegant but should work.

regards
Simon

Artiom Popov

unread,
Oct 13, 2009, 10:37:55 AM10/13/09
to jBASE
SELECT MYFILE SAVING EVAL 'field1:",":field2:",":field3'
LIST MYFILE
Reply all
Reply to author
Forward
0 new messages