/*
 +---------------------------------------------------------------------------+
 |									     |
 |     Copyright (c) 1990                  The INHEDO Application Developer  |
 |									     |
 |     All rights reserved. No part of this program or publication may be    |
 |     reproduced, transmitted, transcribed, stored in a retrieval system,   |
 |     or translated into any language or computer language, in any form or  |
 |     by any means, electronic, mechanical, magnetic, optical, chemical,    |
 |     biological, or otherwise, without the prior written permission of:    |
 |									     |
 |	      The INHEDO Application Developer   (002) 281-3686	             |
 |									     |
 +---------------------------------------------------------------------------+
 |	@(#)rdpar     	1.0				1/28/90	10:41:37     |
 |	rdpar : Lee parametros de tabla 				     |
 |									     |
 |		Written by Rafael Alcaraz     The Santa Cruz Operation	     |
 +---------------------------------------------------------------------------+
*/
	i=1;
	for (j=0;j<nh;j++)
	{
		count=0L;
		if (ph[j][3]>49)
		{
			i=ph[j][3]-49;
			if (dbd[i][3]==0)
			{
				strcpy(m1,dbr[i][0]);
				m1[strlen(dbr[i][0])-3]=0;
				if ((fr=open(m1,O_RDONLY)) >0)
				{
					dbd[i][3]=0;
					lseek (fr,count,0);
					while ((read(fr,ptr[i][dbd[i][3]],ph[j][2]))) dbd[i][3]++;
					close(fr);
				}
				else if ((fr=open(dbr[i][0],O_RDONLY)) >0)
				{
					dbd[i][3]=0;
					lseek (fr,count,0);
					while ((read(fr,ptr[i][dbd[i][3]],ph[j][2])))
					{
						dbd[i][3]++;
						count =dbd[i][3];
						count *=dbd[i][0];
						lseek (fr,count,0);
					}
					close(fr);
				}
				else
				{
					printf ("rddbr : Cannot open =%s= %d\r\n",dbr[i],i);
					sleep(1);
					exit(1);
				}
			}
		}
	}

	for (j=0;j<nc;j++)
	{
		count=0L;
		if (pd[0][j][3]>49)
		{
			i=pd[0][j][3]-49;
			if (dbd[i][3]==0)
			{
				strcpy(m1,dbr[i][0]);
				m1[strlen(dbr[i][0])-3]=0;
				if ((fr=open(m1,O_RDONLY)) >0)
				{
					dbd[i][3]=0;
					lseek (fr,count,0);
					while ((read(fr,ptr[i][dbd[i][3]],pd[0][j][2]))) dbd[i][3]++;
					close(fr);
				}
				else if ((fr=open(dbr[i][0],O_RDONLY)) >0)
				{
					dbd[i][3]=0;
					lseek (fr,count,0);
					while ((read(fr,ptr[i][dbd[i][3]],pd[0][j][2])))
					{
						dbd[i][3]++;
						count =dbd[i][3];
						count *=dbd[i][0];
						lseek (fr,count,0);
					}
					close(fr);
					i++;
				}
				else
				{
					 printf ("rddbr : Cannot open %s\r\n",dbr[i]);
					 exit(1);
				}
			}
		}
	}

