0

I am trying to query a rocket UNIVERSE database. For the most part it works, until I hit certain types of fields that are of type I (not all, but some). In the vendor documentation (EPICOR ECLIPSE) it mentions as a note the following, "Any dictionary that contains a reference to a common file handle will not work without a call to 'OPEN.STANDARD.FILES' so you may need to wrap standard dictionaries."

So my question is how to do that?

When I query the database directly from TCL (cd c:/u2/eclipse and type "uv" to get to the TCL environment) I get the following.

"LIST PSUB TSN.COMMENT 07:37:39am  22 Mar 2014  PAGE    1
@ID..................................... TSN..........

**Program "DICT.GET.LEDGER.DET.VALUE": Line 9, Improper data type.**

When I run the same query within the vendor's application environment it works. Their environment is a DOS like menu system that does allow one to drop down to a TCL environment as well. But, obviously something in their managed environment satisfies dependencies that are needed to make a successful query.

The first few lines of the subroutine are as follows:

>ED OC OPEN.STANDARD.FILES
429 lines long.

----: P
0001:           SUBROUTINE
0002:           $INCLUDE AD.DIR CC~COMMON
0003: *
0004: *
0005: *
0006: *
0007: *
0008: *
0009: *
0010: *
0011: *
0012: *
0013: *
0014: *
0015: *
0016: *
0017: *
0018: *
0019: *
0020:           IF FILES.ARE.OPEN$ THEN RETURN
0021: *
0022:           OPEN 'ABC.CODES'        TO ABCCFILE    ELSE
----:
0023:              FLNM = 'ABC.CODES'
----:
0024:              GOSUB EXIT.OPN
.
.
.
shawno
  • 343
  • 1
  • 3
  • 17
  • Is OPEN.STANDARD.FILES a subroutine or main line program? You can tell by looking at line 001 on OPEN.STANDARD.FILES. If it contains the words SUBROUTINE OPEN.STANDARD.FILES, then it is a subroutine. If so, then will have to wrap this routine a program. If not, then execute OPEN.STANDARD.FILES before the "LIST PUBS...". – International Spectrum Mar 26 '14 at 20:41
  • Thanks for your comment. It is a subroutine. To wrap this routine in a program -- what do I do? Wrap it how? – shawno Mar 27 '14 at 04:22
  • Can you provide me with what the 1st line with SUBROUTINE on it says. Need to know if there are arguments. – International Spectrum Mar 27 '14 at 20:47
  • Sure, I have edited the main post to include that information. Thanks for looking into this further! – shawno Mar 28 '14 at 02:23

1 Answers1

2

To create a wrapper for this routine, do the following:

>ED BP OPEN.STANDARD.FILES.TCL
001 * OPEN.STANDARD.FILES.TCL
002 CALL OPEN.STNADARD.FILES
003 STOP
004 END

>BASIC BP OPEN.STANDARD.FILES.TCL
>CATALOG BP OPEN.STANDARD.FILES.TCL

Then you can execute OPEN.STANDARD.FILES.TCL before your list statement. I just noticed that you are have this tagged for "u2netsdk". Are you accessing Epicor using .NET api, or the "cd c:/u2/eclipse" and "uv"?

If you are using the .NET api, then you can call OPEN.STANDARD.FILES directly from the .NET api before your EXECUTE the list statement.

-Nathan

  • This is awesome. Thank you very much. To your question -- initially I was just testing things out from TCL on the command line, but then got stuck. I was getting the same errors from .NET. The goal is to do this using .NET. So can I ask one more thing? How to call this from .NET? Thanks again! – shawno Mar 29 '14 at 00:13
  • Also, as this question is related to the following that I initiated: http://stackoverflow.com/questions/22578268/improper-data-type-with-query-in-rocket-universe-database?rq=1 If you want to post a follow up comment on that one I will mark it as answered by you. Thanks again. – shawno Mar 29 '14 at 00:15
  • Thank you, Nathan, for helping with subroutine and programs. If you want to call from .NET, you can do the following: 1. Install U2 Toolkit for .NET Provider v1.3.0 2. If you using BASIC Subroutine, you have two choices: a. Use ADO.NET Provider and call subroutine in .NET b. Use UO.NET API and call subroutine in .NET 3. If you using BASIC PROGRAMS a. Use UO.NET’s UniCommand Class and execute this program. 4. Refer .NET Samples in Github : https://github.com/RocketSoftware/u2-servers-lab/tree/master/U2-Toolkit – Rajan Kumar Mar 31 '14 at 20:45