I am trying to create a simple loop to read an Oracle table several times with different schemas. I am creating a resident table containing all the schemas and using the peek command with a Do While loop to step through and load each one.
My issue is with the second peek command. It always returns a null value and the Load statement abends. I'm sure it is something very simple that I am overlooking.
I have attached a sample application using inline load statements to illustrate the issue. In this application, I simply want to read data from TAB1, TAB2 and TAB3 to build resident table TEST_TABLE. You will find that the applicaiton abends the second time the load statement is executed because vTableName is null.
Also, you will notice that the editor is flagging the load statement as if there is an error. I'm assuming that is because it does not know what value will be in vConcat.
I agree with you, it is stange how the first peek command works without quotes around the 3rd parameter. We use the peek command in numerous applications and have never included the quotes. Those peek commands are not used in a loop and are only executed once.
Do you agree with my statement regarding the editor flagging the load statement as if there was an error.
I've always used the peek() with quotes for the 1st and 3rd parameters and never had a problem. Just checked the Help and in fact I was wrong, it doesn't mention the need to use quotes in the 3rd parameter...
The editor thinks it is an error when you use a dollar-sign expansion before the load statement... You statement is ok.