SSELECT INTO A FILE

371 views
Skip to first unread message

mdachi

unread,
Dec 28, 2010, 4:26:14 AM12/28/10
to jBASE
Hello all,

I would like to capture information that is returned from the SSELECT
jsh command and push the contents into a file. My requirement is that
to get the list of all accounts with their minimum balances. To start
with, I need a list of all accounts and their available balances.

We are using T24 R08 and jBase 5.0.

Thanks,

Hamisi
---------

Daniel Klein

unread,
Dec 28, 2010, 11:21:50 AM12/28/10
to jb...@googlegroups.com
Use redirection, e.g.

SELECT file > output.txt

or write a BASIC program and use EXECUTE/CAPTURING, then write the 'captured' output to a file

or (best yet) use compiled jQL.

Dan


--
Please read the posting guidelines at: http://groups.google.com/group/jBASE/web/Posting%20Guidelines

IMPORTANT: Type T24: at the start of the subject line for questions specific to Globus/T24

To post, send email to jB...@googlegroups.com
To unsubscribe, send email to jBASE-un...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

Kemtur Vikram

unread,
Dec 28, 2010, 11:39:13 AM12/28/10
to jb...@googlegroups.com
hi,
Try this.
SSELECT FBNK.ACCOUNT
n records selected
>SELECT FBNK.ACCOUNT SAVING EVAL"ACCOUNT.NUMBER:'>':any other field"
n records selected
>SAVE.LIST mylist
n records saved in mylist

mylist is saved in &SAVEDLISTS&
The list is delimited by ">".

Regards
Vikram

Rick Weiser

unread,
Dec 28, 2010, 2:18:41 PM12/28/10
to jb...@googlegroups.com
You want to use jBasic for this.

OPEN 'FILE1' TO F.FILE1 ELSE STOP 201,'FILE1'
OPEN 'FILE2' TO F.FILE2 ELSE STOP 201,'FILE2'

SELECT F.FILE1

DONE = 0
LOOP
    READNEXT ID ELSE DONE = 1
UNTIL DONE DO
    READ REC FROM F.FILE1,ID THEN
         CUSTID = whatever
         REC1 = ''
         REC1<xx> = REC<accountbalance>
         WRITE REC1 ON F.FILE2,CUSTID
    END
REPEAT

El Yorch

unread,
Dec 30, 2010, 12:03:39 PM12/30/10
to jBASE
you can try this:

on jbase prompt
1) first prepare the screen
~--> TERM Y,X (Y are the columns, X are the rows)

2) next put the name of the file
~--> COMO ON filename

3) put your LIST command
~--> LIST FBNK.ACCOUNT CATEGORY (if you want only CATEGORY field)

4) the list scroll down in the screen (here is important the size of
TERM, because if the rows are not enough, then you have to press some
key of keyboard)

5) finally, lookup your file in the &COMO& directory

~/&COMO& -->

6) now you can edit the file to eliminate some wrogn characters and
open in excel of something like that to exploit


Regards

Jim Idle

unread,
Dec 30, 2010, 2:01:28 PM12/30/10
to jb...@googlegroups.com
Guys,


Don’t do any of the hokey trying to capture output. Just use JQLCOMPILE
and JQLEXECUTE. They are in the manual and specifically designed to do
this sort of thing.

Jim

Reply all
Reply to author
Forward
0 new messages