Maybe not exactly what you are looking for - here is a program that will
analyse all data in a file and give a resume of which attributes/columns
have data and what kind of data. You could easily enhance this to tell you
if there is any mv or sub valued data in an attribute.  After running this
you will then know what definitions are missing from your dictionary


* Save in BP as ANALYSEFILE and compile and catalog
* to analyse a data file and give a resume of what attributes are used
* Usage - ANALYSEFILE {file name}

      s...@sentence
      IF Sen[1,4]="RUN " THEN Sen=Sen[5,999]
      IF Sen[1,11]#"ANALYSEFILE" THEN CRT "Verb must be called
ANALYSEFILE";STOP
      FN=TRIM(Sen[12,99])
      IF FN='' THEN
         CRT "ENTER FILE NAME :":
         PROMPT ''
         INPUT FN
      END
      AREC='' ;*VAL1= No of blank recs, 2=num numeric, 3= num text, 4=min
length, 5=max length
      AREC.HDR="Null":@VM:"Numeric":@VM:"Text":@VM:"Min len":@VM:"Max
len":@VM:'# with MVs'

      OPEN FN TO FIL ELSE CRT "Can not open file ":FN;STOP
      SELECT FIL
      cnt=0
      LOOP WHILE READNEXT ID DO
         cnt+=1
         READ REC FROM FIL,ID ELSE REC=''
         MAX=DCOUNT(REC,@AM)
         FOR X = 1 TO MAX
            REC.NULL=CHANGE(CHANGE(REC<X>,@VM,''),@SVM,'')='' ;*i.e. all
vals and subvals null
            IF COUNT(REC<X>,@VM) THEN AREC<X,6>+=1
            IF REC.NULL THEN
               AREC<X,1>+=1
            END ELSE
               IF NUM(REC<X,1,1>) THEN AREC<X,2>+=1 ELSE AREC<X,3>+=1
               REC.LEN=LEN(REC<X,1,1>)
               IF AREC<X,4>='' THEN
                  AREC<X,4>=REC.LEN
               END ELSE
                  IF REC.LEN < AREC<X,4> THEN AREC<X,4>=REC.LEN
               END
               IF REC.LEN > AREC<X,5> THEN AREC<X,5>=REC.LEN
            END
         NEXT X
      REPEAT

      CRT
      CRT "Analysis for ":cnt:" records of ":FN
      CRT
      CRT SPACE(15):AREC.HDR<1,1>'R#10':' ':AREC.HDR<1,2>'R#10':'
':AREC.HDR<1,3>'R#10':' ':AREC.HDR<1,4>'R#10':' ':AREC.HDR<1,5>'R#10'
      MAX=DCOUNT(AREC,@AM)
      FOR X=1 TO MAX
         CRT "Attribute ":X'R#4':' ':AREC<X,1>'R#10':' ':AREC<X,2>'R#10':'
':AREC<X,3>'R#10':' ':AREC<X,4>'R#10':' ':AREC<X,5>'R#10'
      NEXT X
      CRT "Finished."
   END


HTH

Symeon


-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Dattatraya
Walgude
Sent: 06 October 2009 08:43
To: u2-users@listserver.u2ug.org
Subject: [U2] How to check data dictionary?

Dear ALL 

We are working on UNIDATA version 6 and we need your guide line. 

 

One of the table is having many multivalve columns but by LISTDICT I can
not see. These columns have data but vendor program is showing all
columns data. As I do not know column name then let me know how to see
the other columns? May I need to update dictionary to table to see
column name or suggest any other ways 

By LISTDICT I can not see all column names. 

 

My questions are:- 

 

1) How to check data dictionary? 

2) How to select / extract data form this tables ( for all columns like
oracle select * from )? 

3) How to remove extra space from column ( like oracle Trim() ) 

 

Your suggestions are most well-come and waiting for your positive reply.


Regards 

Dattatraya

 

Thanks & Regards,
Dattatraya Walgude
DBA Team 
Rsystems International Ltd, Pune,
* : +91-20-22909212

 


****************  Disclaimer *****************
 

 

This mail, including any attachments contains confidential and privileged
information for the sole use of the addressee(s). If you are not the
intended recipient, 

please notify the sender by e-mail and delete the original message.  Any
unauthorized review, use, disclosure, dissemination, forwarding, printing or
copying of

 this email or any action taken in reliance on this e-mail is strictly
prohibited and are unlawful. This e-mail may contain viruses. R Systems
International Limited  has 

taken every reasonable precaution to minimize this risk.  R Systems
International Limited is not liable for any damage you may sustain as a
result of any virus in this e-mail. 

Before opening the e-mail or attachment, You should carry out your own virus
checks. R Systems International Limited reserves the right to record,
monitor, and inspect

 all email communications through its internal and external networks.  R
Systems International Ltd prohibits its information systems from being used
to view, store or forward 

offensive or discriminatory material.

 

******** End of Disclaimer ********

_______________________________________________
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