× Discuss on porting data from legacy systems to T24. Data mapping, Data Migration tool, Extract Statergy, Writing runbook, Cut-over, Migrate static and Financial data, Balance transfer, Technical and Functional reconciliation, etc…

Export of Multiple T24 JBASE tables to CSV file

  • Flatbunny
  • Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 6 months ago #12665 by Flatbunny
I have created a process to recurse through the data in an installation of R10 Model bank and create CSV Files. I need a snapshot of all of the tables their column names, data types and a small subset of data (20 rows). The output does not need to be perfect.

Following some research I have this process working using PowerShell C# and jremote.dll running on a VMware XP install with R10.

I am a noob with T24 and jBASE and this is the only thing I expect to need to do. I work for a Temenos Partner providing training solutions for end users - and have no training in the technology. Although I have found some excellent information here and in some jBASE documentation, I have been unable to find what I need.

Where I have come unstuck - which I expected given the complexity of T24 is in mapping column names and data types to rows. I'm not certain how I should do this or even if it is possible using this method.

I am using "LIST-ITEM " + $tableName + "]D" to get the 'Meta' data. And "LIST $tableName" to get the row data. However the resulting 'Meta' data consists of multiple dictionary definitions, all apparently running together (and missing some of the data I get when looking at the same info using jsh) and the ordering appears to allow multiple instances of multiple integers e.g. (0,0,1,2,3,4,4). Not to mention the problem of dealing with entries of varying descriptor types D, I, A etc. I also need to understand better how the data types are determined - I have been unable to find information about all the descriptors, or indeed any information on the values allowed in each of the descriptors attribute definitions.

Does anyone have any suggestions?

Thanks.


To illustrate where I am here is an example of the CSV content I have at the moment:

D|D|D|PH|PH|I|D|D|D|D|D|D|D|I|I|D|D|D|D|D|D|D|PH|SequenceNo 1
3|0|0|||@ID[1,2]|4|5|6|9|11|13|0|@ID[1,12]|@ID[13,8]|1|2|7|8|10|12|14|1?1?1?1?1?1?1?1?1?1?1?1?1?1|CustomerCode 1
||||||||||||F;0;C1;C12;[]|||||||||||ValueDate 1
VALUE.DATE|@ID|CONTRACT.NO.DATE|||APPLICATION.ID|ACTION.CODE|CURRENCY.CODE|AMOUNT|ALONE.MERGE|AUTHOR|FILE.NAME|CONT.ID.ARC|CONTRACT.ID|TRANSACTION.DATE|SEQUENCE.NO|CUSTOMER.CODE|INTEREST.RATE|ADVICE.CODE|STATUS|CURRENT.NO|FILE.KEY||ActionCode 1
11R|22R|22R|||2L|6L|3L|18R|1R|35R|35R|12L|12L|11L|2R|10R|11R|4R|6R|3R|14R||CurrencyCode 1
M|||||S|M|M|M|M|M|M||S|S|M|M|M|M|M|M|M||Amount 1
|||||||||||||||||||||||InterestRate 1
LD093387270520091227|LD093387270520091227|LD093387270520091227|00?00?00?00|100315?100315?100315?100315|20091227?20091227?20091227?20091227|057009?057009?057009?057009|???|???|???|3010?3030?2030?2030|???|???|EOD?EOD?EOD?EOD|8?8?8?8|F.LD.LOANS.AND.DEPOSITS?F.LD.LOANS.AND.DEPOSITS?F.LD.LOANS.AND.DEPOSITS?F.LD.LOANS.AND.DEPOSITS|???|LD0933872705

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

  • jpb
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • TAFj-R20 - 'unix'
More
11 years 6 months ago #12666 by jpb
When you use the DICT file you should only look upon definitions with type = D.
These represent real "fields" in the application.

Try using : LIST DICT $fileName @ID *A1 *A2 FMT"3R" *A3 *A4 FMT"35L" *A5 WITH *A1 EQ "D" ID-SUPP

The fields are
*A1 D
*A2 AttributeNo
*A3 Conversion
*A4 Header (equal to ID)
*A5 Format
as described here : www.jbase.com/r5/knowledgebase/manuals/3...an/sup12_I_TYPES.htm

When you do a LIST $fileName you get back the attributes in the sequence defined in the @ record of the DICT
(which can also miss some attributes).

To get around this use the field-names in the sequence of the result of the DICT received before.

You can reduce the resultset by adding SAMPLE 20 to your request,
e.g. LIST $tableName NAME.1 NAME.2 ... SAMPLE 20
The following user(s) said Thank You: Flatbunny

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

  • armin
  • armin's Avatar
  • Offline
  • Elite Member
  • Elite Member
  • “So long - and thanks for all the fish!”
More
11 years 6 months ago - 11 years 6 months ago #12678 by armin
Just reminded on LOCAL.REF.
To get these you have to select also type = I with *A2 (AttributeNo) like LOCAL.REF...

LIST DICT $fileName @ID *A1 *A2 FMT"20R" *A3 *A4 FMT"35L" *A5 WITH *A1 EQ "D" OR WITH (*A1 EQ "I" AND *A2 LIKE "LOCAL.REF...")ID-SUPP

using R11 on Unix
Last edit: 11 years 6 months ago by armin.
The following user(s) said Thank You: jpb, Flatbunny

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

Time to create page: 0.116 seconds