“Improper data type” with query in Rocket UNIVERSE database

半世苍凉 提交于 2019-12-24 11:36:47

问题


I am trying to do a simple LIST from the UV command line:

LIST PSUB TSN.COMMENT

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.**

Looking further, I can see the following details on the field:

TSN.COMMENT
TYPE: I
LOC: SUBR('DICT.GET.LEDGER.DET.VALUE',FIELD(@ID,'~',4),FIELD(@ID,'~',6),FIELD(@ID,' ',5)"R%3",'3')<1,1,2>
CONV:
NAME: TSN
FORMAT: 13L
SM: S 

The application we are using against this database is EPICOR Ecplise -- Reports generated from the tools they provide that include this field do work, so I don't think there is a problem with the data file -- I think it is just me; I'm not that familiar with this type of database and don't know what I don't know.

The DICT.GET.LEDGER.DET.VALUE Program is as follows:

ED OC DICT.GET.LEDGER.VALUE 531 lines long.

----: P
0001:           SUBROUTINE (VAL,ATTB)
0002:           $INCLUDE AD.DIR CC~COMMON
0003: *
0004: *
<--And lots more after that -->

I think the code is OK because there are lots of other I type fields that use similar SUBR's that error out in the same way when called directory from UV. I think I'm just missing something.

And then looking at what is in CC~COMMON:

          COMMON /STDCOM/ COMDATA(150),SECURITY,MAIN.MEN,FILES(50),AOFILES(150),GLDATA(35)
** Version# 13 - 05/07/2008 - 10:24am - BABS - main

          COMMON FLAGS(100)
          COMMON TCL.LEVEL., RECALL.FLAG, E.MESS.
          COMMON LED(200),OLED(200),LD(150),OLD.LD(150)
          COMMON PRD(200),PRDP(30),PRD.BR(70),PRDC.BR(30),PRDD.BR(40)
          COMMON PGRP(10),PLNE(30),PLNE.BR(20),PLNB(5),BL.BR(50)
          COMMON CUS(200),CUSS(200),MA(40)
          COMMON TAX(20),AR(50)
          COMMON SCROLL.VAR, SVIEW.DEF., SVIEW.DATA.(10)

          $INCLUDE CC EQU.ESC.OBJECT
          $INCLUDE CC EQUATES

          PROMPT CHAR(0)
!BABS~05/07/08~10:24
* Compiled by ECLIPSE on 02/11/12 09:29 from CC:COMMON
*** Version# 13 - 05/07/2008 - 10:24am - BABS - main

回答1:


You will need to create a wrapper routine to call OPEN.STANDARD.FILES:

>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. This is important if you are not starting Epicor's framework, like when you want to access this data with .NET or ODBC.

-Nathan



来源:https://stackoverflow.com/questions/22578268/improper-data-type-with-query-in-rocket-universe-database

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!