IBM i将IFS文本文件中的数据解析到IBM i db2表中?

时间:2019-02-21 02:12:55

标签: ibm-midrange db2-400

是否可以将IFS文本文件中的数据解析到db2表中?我看到的示例使用DB2表中的字段。在下面的示例中,我们使用表MYLIB.DATA_IN中的字段JDATA。

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production 0  
PL/SQL Release 12.1.0.2.0 - Production 0  
"CORE 12.1.0.2.0 Production" 0  
TNS for IBM/AIX RISC System/6000: Version 12.1.0.2.0 - Production 0  
NLSRTL Version 12.1.0.2.0 - Production 0


Error starting at line : 27 in command -  
alter table TMP_REPAIR_TRIGGER_ANSWER add (ANSWER_PHRASE varchar2(4000))  
Error report -  
ORA-14450: attempt to access a transactional temp table already in use  
14450. 00000 -  "attempt to access a transactional temp table already in use"  
*Cause:    An attempt was made to access a transactional temporary table that  
           has been already populated by a concurrent transaction of the same  
           session.  
*Action:   do not attempt to access the temporary table until the  
           concurrent transaction has committed or aborted.  


Error starting at line : 27 in command -  
alter table TMP_REPAIR_TRIGGER_ANSWER add (ANSWER_PHRASE varchar2(4000))  
Error report -  
ORA-14450: attempt to access a transactional temp table already in use  
14450. 00000 -  "attempt to access a transactional temp table already in use"  
*Cause:    An attempt was made to access a transactional temporary table that  
           has been already populated by a concurrent transaction of the same  
           session.  
*Action:   do not attempt to access the temporary table until the  
           concurrent transaction has committed or aborted.  


Error starting at line : 11 in command -  
drop table TMP_REPAIR_TRIGGER_ANSWER  
Error report -  
ORA-14452: attempt to create, alter or drop an index on temporary table already in use  
14452. 00000 -  "attempt to create, alter or drop an index on temporary table already in use"  
*Cause:    An attempt was made to create, alter or drop an index on temporary  
           table which is already in use.  
*Action:   All the sessions using the session-specific temporary table have  
   to truncate table and all the transactions using transaction  
           specific temporary table have to end their transactions.  

1 个答案:

答案 0 :(得分:3)

这取决于IFS文件中文本的格式。如果您有固定的列或定界符分隔的值,CPYFRMIMPF可以解决问题。如果要将大量未格式化的文本加载到单个字段数据库文件中,则CPYFRMSTMF将起作用。如果您有XML或JSON,HTML或其他要解析的内容,则需要以其他方式进行。

那么简短的回答是“是”。没有更多信息,不可能长回答。