- Forum
- T24 Technical Discussions
- T24 Administration
- Move all records from a table to other enviroment
Move all records from a table to other enviroment
- fxzpy2000
- Topic Author
- Offline
- New Member
- Posts: 5
- Thank you received: 0
How to move all records from a table to other enviroment? Its same function with DL.DEFINE, but
DL.DEFINE we must define per record.
Example:
table CUSTOMER.
ID Name
001 A
002 B
003 C
004 d
if using DL.DEFINE we must define id customer
CUSTOMER
001
CUSTOMER
002
....
CUSTOMER
004
have t24 tools for make a pack table customer with all records?. because i want to move table customer with all records to another environment.
Thx
Please Log in or Create an account to join the conversation.
- Gigiipse
- Offline
- Senior Member
- Posts: 40
- Thank you received: 1
jsh--> mkdir CUSTOMER.MOVE
Give full rights to local folder
jsh--> chmod -R 777 CUSTOMER.MOVE
Then copy the data from CUSTOMER to your new folder.
jsh--> SELECT FBNK.CUSTOMER
> COPY FROM FBNK.CUSTOMER TO CUSTOMER.MOVE
This will copy all data to this folder. Use some FTP utility to copy the CUSTOMER.MOVE to another environment and use the same command to move the data to CUSTOMER.
If you want to have an exact copy you might need to delete all the records from your second environment before you copy them. You should also make a backup before do this in case you get error that customers are missing.
Please Log in or Create an account to join the conversation.
- jpb
- Offline
- Moderator
- TAFj-R20 - 'unix'
- Posts: 2854
- Thank you received: 649
Why not create OFS messages and process these in the destination environment (e.g. with a routine that loops thru CUSTOMER and calls OFS.BUILD.RECORD(APP.NAME,OFSFUNCT,PROCESS,OFSVERSION,GTSMODE,NO.OF.AUTH,TRANSACTION.ID,RECORD,OFSRECORD) for each record and stored the resulting OFSRECORD in a file that you then copy over and load into your env.)
* Incoming parameters:
* - APP.NAME The application for which ofs will be invoked
* - OFSFUNCT The function (I,A,R or D)
* - PROCESS The OFS process (should be allways "PROCESS")
* - OFSVERSION The version used to input this transaction
* - GTSMODE The GTS.MODE to be used in this transction. This
* mode will overwrite the GTS.MODE set in the version
* - NO.OF.AUTH The number of authorisers to be used. This number
* overwrite the NO.OF.AUTH set in the version
* - TRANSACTION.ID The transaction id to be used. (mainly used with
* functions A, R or D)
* - RECORD The record in dynamic array format
* Outgoing parameters:
* - OFSRECORD The OFS record built from the incoming parameters
Please Log in or Create an account to join the conversation.
- ridik
- Offline
- Premium Member
- Posts: 94
- Thank you received: 0
OFS.BUILD.RECORD generate the OFS message without the NOINPUT fields, but there applications where there are fields that does not have this NOINPUT mark and even though they can not be update through OFS, because is updated by the core ACCOUNT application. For example, in ACCOUNT, field CURRENCY.MARKET (IN2&&NOCHANGE).
Do you know a work around to identify this kind of fields in an application?
BR
Please Log in or Create an account to join the conversation.
- kripesh
- Offline
- Platinum Member
- Posts: 451
- Thank you received: 63
Have a great day !
Please Log in or Create an account to join the conversation.
- ridik
- Offline
- Premium Member
- Posts: 94
- Thank you received: 0
can you explain how it is used?
thanks
BR
Please Log in or Create an account to join the conversation.
- ridik
- Offline
- Premium Member
- Posts: 94
- Thank you received: 0
I have found references that indicate this is a very old tool used by TEMENOS when creating multi-company books. It was used before DL.DEFINE appears.
BR
Please Log in or Create an account to join the conversation.
- jpb
- Offline
- Moderator
- TAFj-R20 - 'unix'
- Posts: 2854
- Thank you received: 649
When using OFS.BUILD.RECORD there is no parameter to exclude NOCHANGE, you have to generate the OFS on your own and exclude the field by reading the StandardSelection and identify NOCHANGE, NOINPUT, NV.EXTERN and EXTERN in SYS.VAL.PROG / USR.VAL.PROG.
Within an application (template) you can rely on field 3 of the T array.
The use of CRI is hooked to some special system settings as it uses Q-pointers to retrieve data.
This means that you have to set up "accounts" in SYSTEM (as D- or R-pointers) which can be used in the Q-pointers.
Sounds confusing? - it is indeed!
Please Log in or Create an account to join the conversation.
- ridik
- Offline
- Premium Member
- Posts: 94
- Thank you received: 0
I agree with your statement. And I tried that already, but faced the problem that some NOCHANGE fields need to be populate on OFS and others no.
For example, in ACCOUNT , you find in SS the following fields definition POSITION.TYPE (IN2SSS&&NOCHANGE), CURRENCY (IN2CCY&&NOCHANGE), CURRENCY.MARKET (IN2&&NOCHANGE).
If you generate the OFS with OFS.BUILD.RECORD it will included these 3 fields, but when the OFS message is processed CURRENCY.MARKET will launch an error, cause it can not be updated.
If you filter the NOCHANGE fields out of the generated OFS message, then you will get that CURRENCY is missing and that is a problem for no internal accounts.
That's why a made a post in here, trying to get a workaround
BR.
Please Log in or Create an account to join the conversation.
- jpb
- Offline
- Moderator
- TAFj-R20 - 'unix'
- Posts: 2854
- Thank you received: 649
Please Log in or Create an account to join the conversation.
- ridik
- Offline
- Premium Member
- Posts: 94
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- jpb
- Offline
- Moderator
- TAFj-R20 - 'unix'
- Posts: 2854
- Thank you received: 649
Please Log in or Create an account to join the conversation.
- ridik
- Offline
- Premium Member
- Posts: 94
- Thank you received: 0
I'm using a regular comma version with NO.OF.AUTH = 0, EXC.INC.RTN = NO, GTS.CONTROL = NULL.
This is an example of what is going on. When generating OFS message using OFS.BUILD.RECORD, I can not exclude the NOCHANGE fields because I will loose CURRENCY and POSITION.TYPE, and both are needed. As a result I will have CURRENCY.MARKET in the message too, and that launch an error when it gets process.
This is an example:
jsh train ~ -->tSS OFSTELNET
<tSS version="1.1"><t24version>R13</t24version><t24pid>21865</t24pid><t24ofssource>OFSTELNET</t24ofssource><clientIP/></tSS>
ACCOUNT,/I/PROCESS/1/0/,INPUTT/123456/CU0010001/////,026999,CUSTOMER:1:1="3",CATEGORY:1:1="1000",ACCOUNT.TITLE.1:1:1="ACCOUNT TITLE",SHORT.TITLE:1:1="SHORT TITLE",POSITION.TYPE:1:1="TR",CURRENCY:1:1="USD",CURRENCY.MARKET:1:1="1",ACCOUNT.OFFICER:1:1="6901",OTHER.OFFICER:1:1="1102",LOCAL.REF:2:1="402010161",LOCAL.REF:3:1="S",PASSBOOK:1:1="NO",OPENING.DATE:1:1="20140717",ALLOW.NETTING:1:1="NO",HVT.FLAG:1:1="NO",
026999//-1/NO,CURRENCY.MARKET:1:1=NOINPUT FIELD
EXIT
jsh train ~ -->
These is the OFS.SOURCE definition
SOURCE.NAME....... OFSTELNET
1 DESCRIPTION....... OFSTELNET
2 SOURCE.TYPE....... TELNET
3. 1 LOGIN.ID....... any
5 MAX.CONNECTIONS... 10
14 LOG.DETAIL.LEVEL.. NONE
24 SYNTAX.TYPE....... OFS
26 GENERIC.USER...... INPUTTER
31 FIELD.VAL......... YES
BR
Please Log in or Create an account to join the conversation.
- jpb
- Offline
- Moderator
- TAFj-R20 - 'unix'
- Posts: 2854
- Thank you received: 649
Please Log in or Create an account to join the conversation.
- Forum
- T24 Technical Discussions
- T24 Administration
- Move all records from a table to other enviroment