replacing queries with NER functions In JDE

JDdev

JDdev

Well Known Member
we are trying to fetch information through sql queries where as the same needs to be replaced by writing NER's (calling them through java connectors).I just want to know for some of the queries multiple records will be the output. in such a case how should we plan our NEr's to be?

( Though I expect evrytime My NER will be giving single record thru its parameters) It wud be of great help if somebody sugest on this.

Thanks in adavance,
 
JDev,
If the plan is to do only thru NER then many years before i designed such NER. You can simulate the fetch next in NER and pass the flag as output. if the fetch next has reached the last record set the flag. the calling process can check the falg before each call to the NER. Hope this helps.

Chan
 
You can try this in NER but you will need to use table handles and pass the table handle back to the calling Java process. Basically you will need the following E1 function calls:

Init - opens tables, executes query, passes table handles back to java app
RecordIterator - pass table handles in and retrieves next record in result set
Term - closes passed table handles

The Java process will need to be sure and use the same session ID on the init, iter and term calls. This would actually be much easier to code in C than NER.
 
yes Boster is correct i missed to quote it in my post but you will need to save and pass the table handle during each call.

Chan
 
Back
Top