× Discuss on Template programming, jBASE programming, Enquiries, No-File enquiry, Enquiry routines, Version, Version routines, Menus, Abbriviations, Creating local reference fields, Fast path enquiries, Creating charts and graphs, Generating Reports, Deal slips, Straight through processing, Multi Company and Multi Book setup, Tabbed screens, Composite Screens, T24 API, etc...

Read last record in $His

  • tantivy
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
14 years 3 months ago #6673 by tantivy
Read last record in $His was created by tantivy
Hi All!
I have a problem about not exist in table live. It moved in table $HIS.
Now I want read the lastest record in $His. How do I?
Thank all!

Please Log in or Create an account to join the conversation.

  • jpb
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • retired . . . ¯\_(ツ)_/¯
More
14 years 3 months ago #6674 by jpb
Replied by jpb on topic Re: Read last record in $His
CALL F.READ.HISTORY(FN.HISFILE,RECORD.ID,R.HISTORY,F.HISFILE,ERR)

Please Log in or Create an account to join the conversation.

  • tantivy
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
14 years 3 months ago - 14 years 3 months ago #6678 by tantivy
Replied by tantivy on topic Re: Read last record in $His
Problem is not be determined lastest RECORD.ID??
ID;1 or ID;2 or ID;3 ... or ID;nn is lastest ID in history?
I want know last ID faster as faster in $his!
thank!
Last edit: 14 years 3 months ago by tantivy.

Please Log in or Create an account to join the conversation.

  • jpb
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • retired . . . ¯\_(ツ)_/¯
More
14 years 3 months ago #6680 by jpb
Replied by jpb on topic Re: Read last record in $His
With F.READ.HISTORY you have the highest ;nn returned as RECORD.ID and read the respective record into R.HISTORY if successful.

The call is done with the normal ID, so without ;nn !
The following user(s) said Thank You: tantivy

Please Log in or Create an account to join the conversation.

  • tantivy
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
14 years 3 months ago #6710 by tantivy
Replied by tantivy on topic Re: Read last record in $His
I don't know! How can I get last RECORD.ID (RECORD.ID;nn) in $His?
To read last record with RECORD.ID in His
CALL F.READ(FN.TABLE$HIS,RECORD.ID;nn,RES,F.TABLE$HIS,ERROR.CODE)
thank all!

Please Log in or Create an account to join the conversation.

  • jpb
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • retired . . . ¯\_(ツ)_/¯
More
14 years 3 months ago - 14 years 3 months ago #6711 by jpb
Replied by jpb on topic Re: Read last record in $His
Dear tantivy,

please read carefully the above.
There is no need to supply the history-id when you use F.READ.HISTORY.
Try CALL F.READ.HISTORY(FN.TABLE$HIS,RECORD.ID,RES,F.TABLE$HIS,ERROR.CODE)

If you want to use F.READ there is no other way that doing a select in advance or start reading with ;1 and loop thru till you get an error.
Last edit: 14 years 3 months ago by jpb.

Please Log in or Create an account to join the conversation.

  • tantivy
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
14 years 3 months ago #6741 by tantivy
Replied by tantivy on topic Re: Read last record in $His
SORRY! BECAUSE OF I HAVE NEVER KNOWN F.READ.HISTORY()
NOW, I USED F.READ.HISTORY!!!
THANKS VERRY MUCH!

Please Log in or Create an account to join the conversation.

  • tantivy
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
14 years 1 month ago - 14 years 1 month ago #7470 by tantivy
Replied by tantivy on topic Re: Read last record in $His
I HAVE A PROBLEM WITH 'F.READ.HISTORY'!
I HAVE LAST RECORD FROM THAT BUT I CAN'T KNOW NUMBER OF LAST RECORD!
SUCH AS: 1020477;42 OR 1020477;43 OR 1020477;44
-> HOW DO I KNOW THAT?
THANKS!
Last edit: 14 years 1 month ago by tantivy.

Please Log in or Create an account to join the conversation.

More
14 years 1 month ago #7472 by Lars
Replied by Lars on topic Re: Read last record in $His
In R.RECORD you have the field CURR.NO,
thats your number, eg. for CUSTOMER R.RECORD(EB.CUS.CURR.NO)

Please Log in or Create an account to join the conversation.

  • tantivy
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
14 years 1 month ago #7480 by tantivy
Replied by tantivy on topic Re: Read last record in $His
OH!
THANK Lars!!!
I SAW!!!

Please Log in or Create an account to join the conversation.

More
14 years 1 month ago #7513 by powerstar
Replied by powerstar on topic Re: Read last record in $His
EXAMPLE:

CRT 'INPUT LD ID'
INPUT LD.ID
CRT 'INPUT DATE TO'
INPUT DATE.TO
*DATE.TO = 20110506
SELECT.STATEMENT = 'SELECT ':FN.LD.LOANS.AND.DEPOSITS$HIS : 'WITH @ID LIKE': LD.ID : '...' : 'AND CATEGORY GE 21050 AND CATEGORY CATEGORY LE 21074 AND DATE.TIME LE':DATE.TO:'2359' : 'BY-DSND @ID'
LD.LOANS.AND.DEPOSITS$HIS.LIST = ''
LIST.NAME = ''
SELECTED = ''
SYSTEM.RETURN.CODE = ''
CALL EB.READLIST(SELECT.STATEMENT,LD.LOANS.AND.DEPOSITS$HIS.LIST,LIST.NAME,SELECTED,SYSTEM.RETURN.CODE)
*LD.LOANS.AND.DEPOSITS$HIS.LIST = LD1022500123;42VMLD1022500123;41 ........
*LD.LAST.HIS = LD1022500123;42
LD.LAST.HIS = LD.LOANS.AND.DEPOSITS$HIS.LIST<1,1>
CRT LD.LAST.HIS

Please Log in or Create an account to join the conversation.

  • tantivy
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
14 years 1 month ago #7517 by tantivy
Replied by tantivy on topic Re: Read last record in $His
Using READLIST is verry verry long!

Please Log in or Create an account to join the conversation.

  • jpb
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • retired . . . ¯\_(ツ)_/¯
More
14 years 1 month ago #7536 by jpb
Replied by jpb on topic Re: Read last record in $His
Tantivy,

after F.READ.HISTORY the RECORD.ID contains the correct number (including ;nnn)!

Please Log in or Create an account to join the conversation.

  • tantivy
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
14 years 1 month ago #7559 by tantivy
Replied by tantivy on topic Re: Read last record in $His
Thank jpb!
:)!

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #8223 by mbalaji
Replied by mbalaji on topic Re: Read last record in $His
Hi All,
Please make use of T24 Core routine EB.READ.HISTORY.REC

example:
HIS.ID = FT1234567
FN.FT.HIS = 'F.FUNDS.TRANSFER$HIS' ; F.FT.HIS = ''
CALL OPF(FN.FT.HIS,F.FT.HIS)
HIS.REC = ''
YERROR = ''
CALL EB.READ.HISTORY.REC(F.FT.HIS,HIS.ID,HIST.REC,YERROR)
HIS.REC --->>>>> this variable will hold the latest curr.no record array

Please Log in or Create an account to join the conversation.

Time to create page: 0.057 seconds