T24: Programming (Jbasic)

2,480 views
Skip to first unread message

Crusader Sterling Pensions

unread,
Nov 9, 2009, 6:38:09 AM11/9/09
to jB...@googlegroups.com
 
Dear All,
 
I am trying to update customer details through updates generated into a CSV file, but its not working, find below my sample program:
 

     SUBROUTINE CUSTOMERUPDATE
     $INSERT I_COMMON
     $INSERT I_EQUATE
     $INCLUDE I_F.CUSTOMER
     $INSERT I_F.USER

     GOSUB INITIALIZE
     GOSUB PROCESS.REC
     RETURN

 INITIALIZE:
     FN.CUSTOMER = 'F.CUSTOMER'
     F.CUSTOMER = ''
     CALL OPF(FN.CUSTOMER,F.CUSTOMER)

 *    FN.USER = 'F.USER'
 *    F.USER = ''
 *    CALL OPF(FN.USER,F.USER)

     REC.STAT = ''
     RETURN

 PROCESS.REC:
     FILE.NAME = "TEST.csv"
     OPENSEQ "&SAVEDLISTS&",FILE.NAME TO F.SEQ.FILE.PATH ELSE RE
     Y.TRANS.CNT = 0
     YEOF = 0
     LOOP
         READSEQ R.SEQ.REC FROM F.SEQ.FILE.PATH ELSE YEOF = 1
     WHILE NOT(YEOF) DO

         PF.RET = FIELD(R.SEQ.REC,',',0)
         PIN.TOT = FIELD(R.SEQ.REC,',',1)
         SURNAME = FIELD(R.SEQ.REC,',',2)
         FIRSTNAME = FIELD(R.SEQ.REC,',',3)
         OTHERNAMES = FIELD(R.SEQ.REC,',',4)

       NAME.SHORT = SURNAME + ' ' + FIRSTNAME

 DEBUG

 *
 *        PFRET.ID = RET.ID
         RET.REC = ''
         RET.REC<EB.CUS.NAME.1> = SURNAME
         RET.REC<EB.CUS.SHORT.NAME> = NAME.SHORT
         RET.REC<EB.CUS.NAME.2> = FIRSTNAME

 

         CALL F.WRITE(FN.CUSTOMER:"$NAU",PF.RET,RET.REC)
 *        CALL JOURNAL.UPDATE(RET.ID)
     REPEAT
 *    RETURN
 END

Thanking you for your assistance.

regards

Daniel Klein

unread,
Nov 9, 2009, 8:31:33 AM11/9/09
to jb...@googlegroups.com

Jim Idle

unread,
Nov 9, 2009, 12:33:23 PM11/9/09
to jb...@googlegroups.com

Please read the posting guidelines before posting.

 

You can’t just send a program and say “It doesn’t work” – what the Zarquon does that mean? You have to help others help you and just posting a program and saying it does not work is the height of stupidity – especially when the posting guidelines are there to tell you not to do this.

 

Jim

PS: Perhaps when writing a program, it might help to know what language you are using – there is no such thing as Jbasic

Ashok Pandey

unread,
Nov 9, 2009, 11:00:33 AM11/9/09
to jb...@googlegroups.com
If you trying to update INAU file open NAU file no Live file

Try with:
FN.CUSTOMER = 'F.CUSTOMER$NAU'
F.CUSTOMER = ''
CALL OPF(FN.CUSTOMER,F.CUSTOMER)



Cheers
Ashok Pandey
23, Vieux-Chemin de Bernex
1233 Bernex/Geneva
Switzerland

foxy.md

unread,
Nov 10, 2009, 3:54:24 AM11/10/09
to jBASE
Before updating the customer record - read this record.
If the customer ID you are trying to update already exists - you will
spoil the rest of the fields...

On Nov 9, 12:38 pm, Crusader Sterling Pensions

paapu a.t.

unread,
Nov 10, 2009, 12:41:01 AM11/10/09
to jb...@googlegroups.com

Hi Crusader Sterling Pensions

find the attached routine.

Thanks & Regards,
atr
CUSTOMERUPDATE

Crusader Sterling Pensions

unread,
Nov 10, 2009, 3:02:33 AM11/10/09
to jb...@googlegroups.com
Hi Jim,
 
Pardon me for my blunders even as the moderator or whatever you still went too far with your comments

 

John Watson

unread,
Nov 10, 2009, 7:48:09 AM11/10/09
to jBASE
Hi,

As this is clearly an update to a T24 file I would suggest you use OFS
- no coding necessary.

If you persist with your program and corrupt the file I think we all
know that you will get no assistance from the HelpDesk.

OFS is well documented in the T24 user guides.

Regards,

John.

Jim Idle

unread,
Nov 10, 2009, 12:03:58 PM11/10/09
to jb...@googlegroups.com

Sigh – nobody ever reads anything.

 

Most people just get on this list, delete everything that comes in that isn’t about them and so ignore all my pleas to read the posting guidelines and include descriptions and so on. Then they post their own question and rely on the 20 or so people that actually do read the posts and answer other people’s questions. You are not one of the former though right? Hence you must have read the 20 requests I made over the previous 7 days or so for people to please read the posting guidelines, which means you just ignored me? Can you tell me why? Or did you just delet all the old posts to this list without reading them and make your own post?

 

Then you have the cheek to tell me I went too far in my comments to you? If you knew anything about me, you would be grateful that I went easy on you.

 

Also, can you please change your name from “Crusader Sterling Pensions” – this isn’t Facebook and we need to use our real names. Besides, I don’t think you are an authorized representative of “Crusader Sterling Pensions”.

 

Jim

CLIF

unread,
Nov 10, 2009, 12:20:27 PM11/10/09
to jBASE
Its the "whatever" your missing its the "whoever". Jim is the author
of jBASE and knows more about it then anyone. He is very generous in
the free help he gives us all in this forum so my best advice to you
is: politely bow to him, follow his rules, and just suck it up when he
criticizes you.

On Nov 10, 12:02 am, Crusader Sterling Pensions
<crusadersterlingale...@gmail.com> wrote:
> Hi Jim,
>
> Pardon me for my blunders even as the moderator or whatever you still went
> too far with your comments
>

Daniel Klein

unread,
Nov 10, 2009, 12:52:06 PM11/10/09
to jb...@googlegroups.com
...or you'll be 'fired' ;-)

Dan

kanesolve

unread,
Nov 10, 2009, 1:14:36 PM11/10/09
to jb...@googlegroups.com
I wonder why someone is trying to update a CUSTOMER file in a banking
software directly, bye-passing all the validations and updating of related
files.

Regards

Kannan

-----Original Message-----
From: jb...@googlegroups.com [mailto:jb...@googlegroups.com] On Behalf Of
John Watson
Sent: Tuesday, November 10, 2009 6:18 PM
To: jBASE
Subject: Re: T24: Programming (Jbasic)


Kevin Powick

unread,
Nov 10, 2009, 6:05:46 PM11/10/09
to jBASE
On Nov 10, 12:52 pm, Daniel Klein <danielklei...@gmail.com> wrote:
> ...or you'll be 'fired' ;-)

Repeatedly.

--
Kevin Powick

Crusader Sterling Pensions

unread,
Nov 11, 2009, 3:21:49 AM11/11/09
to jb...@googlegroups.com
Hi Jim,
 
sorry for my comment, just couldn't swallow easily you took me to the cleaners with your comment. I appreciate your effort as I do read your comments.
 
Once again am sorry.
 
thanks

 

Mike Preece

unread,
Nov 28, 2009, 8:20:13 AM11/28/09
to jBASE
perhaps change your FIELD extracts to start at ,1 instead of ,0

On Nov 9, 11:38 am, Crusader Sterling Pensions
Reply all
Reply to author
Forward
0 new messages