Hello:
This is my first question in this forum.
If I have some "updates", "inserts",.... in one bteq, and I want to verify if each operation is ok, How can I do this? I don't want to have a label error for each operation. Could I use variables to indicate which is the error and then goto a unique label error?
For example:
insert into tmp_table select 20,*,0,0,0 from x;
.if errorcode <> 0 THEN .goto label1;
update tmp_table set mm='hello'
.if errorcode <> 0 THEN .goto label2;
Is it posible
insert into tmp_table select 20,*,0,0,0 from x;
.if errorcode <> 0 THEN ERRORVARIABLE='Error in insert' .goto label1;
update tmp_table set mm='hello'
.if errorcode <> 0 THEN ERRORVARIABLE='Error in update' .goto label1;
.label 1
insert into error_table (ERRORVARIABLE)
.quit errorcode
Thanks and sorry for my English
This is my first question in this forum.
If I have some "updates", "inserts",.... in one bteq, and I want to verify if each operation is ok, How can I do this? I don't want to have a label error for each operation. Could I use variables to indicate which is the error and then goto a unique label error?
For example:
insert into tmp_table select 20,*,0,0,0 from x;
.if errorcode <> 0 THEN .goto label1;
update tmp_table set mm='hello'
.if errorcode <> 0 THEN .goto label2;
Is it posible
insert into tmp_table select 20,*,0,0,0 from x;
.if errorcode <> 0 THEN ERRORVARIABLE='Error in insert' .goto label1;
update tmp_table set mm='hello'
.if errorcode <> 0 THEN ERRORVARIABLE='Error in update' .goto label1;
.label 1
insert into error_table (ERRORVARIABLE)
.quit errorcode
Thanks and sorry for my English