[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ldmMcidas #UGB-430567]: Mcidas schema not registered



Hi Trung,

re: 
> When I ran one of my executable files 'gimcof.k' (produced from
> 'gimcof.mac'), I got the following error:
> 
> gimcof.k: Schema SGSS not registered ***
> 
> I debugged the codes and found the following line that caused the error
> 
> IMD= MDMAKE(MDNG,'SGSS',3,0,0,NDAY,CDOC)

Yup, MDMAKE creates an MD file using the specified schema.

> I did register the schema files (DCSGSS and DASGSS) using the command
> 'sche.k DCSGSS' and verified schema registration with the command
> 'lsche.k'. The SGSS schema was registered.

Very curious.  It is possible that the copy of SCHEMA being used when
running gimcof.k is different from the one used when you ran the
schema registration and listing commands.  To test out this theory, please
do the following:

<as the user you are running McIDAS commands as>
cd $MCDATA
mcenv

dmap.k SCHEMA
lsche.k SGSS

It is also possible that the version of the schema specified in the MDMAKE
call does not match the version registered in SCHEMA.  The Fortran code
in mdmake.for explicitly checks to verify that the schema version specified
matches the registered schema:

C
C-----FIND THE SCHEMA IN THE SCHEMA FILE
C
      SN=0
      SCHBEG=32768
      DO 2 J=1,500
         III= LWI(SFILE,J*HEDSIZ-HEDSIZ,2,STEST)
         IF (STEST(1).NE.PSNAME) GOTO 2
c---     flip version number
         call swbyt4(stest(2), 1)
         IF (PSVSN.EQ.0.OR.STEST(2).EQ.PSVSN) SN=J            <- SN only gets 
set if the requested schema
 2    CONTINUE                                                   version 
matches!
 3    IF (SN.EQ.0) THEN
        CALL EDEST('Schema '//CLIT(PSNAME)//' not registered',0)
        GOTO 90
      ENDIF

The MDMAKE call in gimcof.mac specifies that it wants SGSS version 3:

IMD= MDMAKE(MDNG,'SGSS',3,0,0,NDAY,CDOC)
                        ^________________ SGSS version 3 asked for

> I didn't understand why I kept getting this error. Did I miss anything?
> Any suggestion?

What is the version of SGSS registered in SCHEMA?  If they don't match, you
should modify gimcof.mac to either specify the matching schema version or
0 (zero) to say that you don't care if the versions match or not.

> Thank you,

No worries.

Cheers,

Tom
****************************************************************************
Unidata User Support                                    UCAR Unidata Program
(303) 497-8642                                                 P.O. Box 3000
address@hidden                                   Boulder, CO 80307
----------------------------------------------------------------------------
Unidata HomePage                       http://www.unidata.ucar.edu
****************************************************************************


Ticket Details
===================
Ticket ID: UGB-430567
Department: Support McIDAS
Priority: Normal
Status: Closed