[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: #include files in SQR (Unix)



one posible solution for your migration

modify your sqr program
#include 'rp_header.sh'
#include 'rp_footer.sh'

then in your shell that run sqr

sqr -i$OMS_SQR  program.sqr

this is the documentation of the -i flag
Specifies the list of directories that SQR will search when processing
the #INCLUDE directive if the include file does not exist in the current
directory and no specified path was specified for the file.  The
directory names must be separated by either commas (,) or semicolons
(;).  Always append the directory character to the end of each directory
name. See the -F  flag for a list of directory characters by operating
system.  For example, under UNIX:

-Ic:\sqr\inc,d:\sqr\incl




if you do not want to type the line
create a sqr.sh file in /usr/bin
#!/bin/sh
$SQRDIR/sqr -i$OMS_SQR $*


franck


Marlon Corrales wrote:
>
> Hello Everyone!
>
> Background:
>    Conversion from SQR 3.0 in VAX/VMS to SQR 4.3 Unix/Solaris.
>
> Problem:
> In our VAX/VMS SQR programs, we have #include directives which look
> like this
>
> #include 'oms_sqr:rp_header.sh'
> #include 'oms_sqr:rp_footer.sh'
> ....
> ....
>
> When we compile the program, it knows how to translate
> the environment logical oms_sqr to the correct subdirectory.
>
> In the converted program, we changed the above to:
>
> #include '$OMS_SQR/rp_header.sh'
> #include '$OMS_SQR/rp_footer.sh'
> ....
> ....
>
> When we tried to compile the program, we got the error:
>
> (SQR 4713) Cannot open the #INCLUDE file: '$OMS_SQR/rp_fatal.sh'
> (2): No such file or directory
>
> We have defined the environment variable OMS_SQR (exported it also).
> The test in Unix (we're using ksh) gives the following:
>
> $ echo $OMS_SQR
> /users/sqr/appl
> $
>
> It seems that compiling does not translate the $OMS_SQR to the
> proper subdirectory.
>
> Any suggestions on how to go about the problem above?
>
> Thnx.