George,

See my answer to Bjorn Behr when he asked the same question in April 2009.

[Begin]
This is the error you get when the I-Descriptor calls a subroutine that does a 
SELECT. See this reply from Glenn Herbert to the same problem in March 2004. 

"Yeah. It's actually a bug in the program/itype unloading code that won't allow 
you to do this. I ran upon this in May 2003 and, subsequently, put in a fix 
within the DataStage engine so that it works. Should be an easy fix once its 
understood." 

Guess they've not got around to fixing it yet. Dependant on the select in the 
subroutine it can usually be worked around by using UniBasic commands like 
SELECTINDEX. 

[End]

Cheers,
Andy


________________________________
 From: George Gallen <ggal...@wyanokegroup.com>
To: U2 Users <u2-users@listserver.u2ug.org> 
Sent: Thursday, 7 November 2013, 19:05
Subject: [U2] Non-SQL re-entrant query calls are not allowed??? (UV 10.0.2 )
 

OK.

I Setup a Subroutine that if I call from an IDESC Gives me the following error:
Non-SQL re-entrant query calls are not allowed'

Am I to take this as, you can't do a SELECT on a file, from an IDESC Subroutine?

However, If I call it from another basic program, it works just fine.

The program runs the following code:
   CMD="SELECT FRED-XREF-FILE WITH FILENAME = '":FILENAME:"' TO 5"
   PRINT CMD
   EXECUTE CMD RTNLIST CAPTURING JUNK
   PRINT JUNK
   PRINT @SELECTED:" SELECTED"
   SIDNO=""
   LOOP
      READNEXT ID FROM 5 ELSE EXIT
      PRINT ID
      SIDNO=FIELD(ID,"_",2)
   REPEAT
*

And the IDESC:
0001: I
0002: SUBR('*CRM.RETURN.PROFESSION','MASTER.HEMONC',@ID)
0003:
0004: PROFESSION
0005: 30L
0006: S

It's the SELECT that fails - but only when run from the IDESC

Example:

0001: FILE="MASTER.HEMONC"
0002: ID="123456"
0003: CALL *CRM.RETURN.PROFESSION(PROFESSION,FILE,ID)
0004: PRINT PROFESSION



George Gallen
Senior Programmer/Analyst
Accounting/Data Division, EDI Administrator
ggal...@wyanokegroup.com
ph:856.848.9005 Ext 220
The Wyanoke Group
http://www.wyanokegroup.com<http://www.wyanokegroup.com/>

_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to