Writing into Sequential file on Unix Solaris Powerhouse envir onment

Fry, Mark Mark.Fry@COGNOS.com
Wed, 30 Apr 2003 10:46:42 +0100


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C30EFD.67F2B560
Content-Type: text/plain;
	charset="iso-8859-1"

Hi Sagar,

If you want to get this to run on unix without an error, it needs a unix
shell to run within.

You could try this:

RUN COMMAND "sh -c 'GENRIC=<file name>'"

I'm not sure what this would accomplish here, though.  As soon as the
command is complete, the shell is closed and the environment variable
(GENRIC) disappears with it...

Better to use the SETSYSTEMVALUE function, as suggested by Terry Curran ie

IF NOT SETSYSTEMVALUE( "GENRIC", "<file name>" )
   THEN ERROR "Cannot set value"

Best regards,

Mark Fry
Mark.Fry@Cognos.com

-----Original Message-----
From: Goparaju, Vidyasagar [mailto:VGoparaju@tradepointsystems.com]
Sent: 29 April 2003 21:23
To: 'powerh-l@lists.swau.edu'
Subject: RE: Writing into Sequential file on Unix Solaris Powerhouse
envir onment


Hi All,

I am getting runtime error in QUICK when I set the system variable using RUN
COMMAND "GENRIC=<file name>"

I tried RUN COMMAND "set GENRIC=<file name>" also. It did not work. Same
command is working OK when I type it on the command line.

Please help.

Thanks
Sagar

 -----Original Message-----
From: 	Rohde Dirk [mailto:Dirk.Rohde@vpgroup.com] 
Sent:	Tuesday, April 29, 2003 10:11 AM
To:	'Goparaju, Vidyasagar'
Cc:	'powerh-l@lists.swau.edu'
Subject:	RE: Writing into Sequential file on Unix Solaris Powerhouse
envir onment

Try using the Unix "touch" command for creating your sequential file. This
command will create the file if it does not exist or just update the modify
date if it already exists and will work much quicker than qutil. Also, by
using the "dd" command with "if=<input_file> of=<output_file> cbs=80
conv=unblock", you can split a file into separate carriage-return delimited
records that is readable by a program like "vi". These are HP-UX Korn Shell
commands but I believe that there are similar commands available on Solaris.

Dirk Rohde
VantagePoint Systems Inc.

-----Original Message-----
From: Goparaju, Vidyasagar [mailto:VGoparaju@tradepointsystems.com]
Sent: Monday, April 28, 2003 1:38 PM
To: 'powerh-l@lists.swau.edu'
Subject: Writing into Sequential file on Unix Solaris Powerhouse
environme nt


				Hi All,

				I am in the process of migrating my
Powerhouse Application on VMS to Unix Solaris under Oracle environment.

				We left the sequential files within the
Powerhouse dictionary. Because the physical files for these records are
created during the runtime to create command procedures.

				I have a GENERIC 80 characters sequential
file.

1.	I have created physical file using QUITL (There is not equivalent to
CREATE/FDL on Unix environment. May be I don't know).
2.	Written all the commands into the GENRIC.dat file from QUICK.
a.	Quiz << exit
b.	Exec $MLT/SYCUSLST nogo
c.	Set rep dev disc name sycuslst 
d.	Set nobl
e.	Go
f.	<parm>
g.	<parm>
h.	exit
3.	On VMS the file looks like line sequential. But on Unix system
everything is one long string.
4.	Only "more" command is showing this file line by line. I could not
open it using VI.
5.	If I create the above command procedure using VI editor manually. It
is working fine. But I could not make it to work when I create it from
QUICK.

				My objective is:
1.	Create a sequential file with similar attributes to GENERIC with
name <prog id>+date+time.sh
2.	Write commands and parameters into it using Powerhouse QUICK
program.
3.	Execute the command procedure from QUICK and delete the command
procedure when the report is created.
4.	Above procedure is already working on VMS system. I am trying to
migrate the same function to UNIX environment.

				Please help.

				Thanks
				Sagar
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l@lists.swau.edu
Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu
Unsubscribe: "unsubscribe <password>" in message body to
powerh-l-request@lists.swau.edu
http://lists.swau.edu/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l@lists.swau.edu
Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu
Unsubscribe: "unsubscribe <password>" in message body to
powerh-l-request@lists.swau.edu
http://lists.swau.edu/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.

This message may contain privileged and/or confidential information.  If you
have received this e-mail in error or are not the intended recipient, you
may not use, copy, disseminate or distribute it; do not open any
attachments, delete it immediately from your system and notify the sender
promptly by e-mail that you have done so.  Thank you.

------_=_NextPart_001_01C30EFD.67F2B560
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2654.89">
<TITLE>RE: Writing into Sequential file on Unix Solaris Powerhouse =
envir onment</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>Hi Sagar,</FONT>
</P>

<P><FONT SIZE=3D2>If you want to get this to run on unix without an =
error, it needs a unix shell to run within.</FONT>
</P>

<P><FONT SIZE=3D2>You could try this:</FONT>
</P>

<P><FONT SIZE=3D2>RUN COMMAND &quot;sh -c 'GENRIC=3D&lt;file =
name&gt;'&quot;</FONT>
</P>

<P><FONT SIZE=3D2>I'm not sure what this would accomplish here, =
though.&nbsp; As soon as the command is complete, the shell is closed =
and the environment variable (GENRIC) disappears with it...</FONT></P>

<P><FONT SIZE=3D2>Better to use the SETSYSTEMVALUE function, as =
suggested by Terry Curran ie</FONT>
</P>

<P><FONT SIZE=3D2>IF NOT SETSYSTEMVALUE( &quot;GENRIC&quot;, =
&quot;&lt;file name&gt;&quot; )</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp; THEN ERROR &quot;Cannot set =
value&quot;</FONT>
</P>

<P><FONT SIZE=3D2>Best regards,</FONT>
</P>

<P><FONT SIZE=3D2>Mark Fry</FONT>
<BR><FONT SIZE=3D2>Mark.Fry@Cognos.com</FONT>
</P>

<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Goparaju, Vidyasagar [<A =
HREF=3D"mailto:VGoparaju@tradepointsystems.com">mailto:VGoparaju@tradepo=
intsystems.com</A>]</FONT>
<BR><FONT SIZE=3D2>Sent: 29 April 2003 21:23</FONT>
<BR><FONT SIZE=3D2>To: 'powerh-l@lists.swau.edu'</FONT>
<BR><FONT SIZE=3D2>Subject: RE: Writing into Sequential file on Unix =
Solaris Powerhouse</FONT>
<BR><FONT SIZE=3D2>envir onment</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>Hi All,</FONT>
</P>

<P><FONT SIZE=3D2>I am getting runtime error in QUICK when I set the =
system variable using RUN</FONT>
<BR><FONT SIZE=3D2>COMMAND &quot;GENRIC=3D&lt;file =
name&gt;&quot;</FONT>
</P>

<P><FONT SIZE=3D2>I tried RUN COMMAND &quot;set GENRIC=3D&lt;file =
name&gt;&quot; also. It did not work. Same</FONT>
<BR><FONT SIZE=3D2>command is working OK when I type it on the command =
line.</FONT>
</P>

<P><FONT SIZE=3D2>Please help.</FONT>
</P>

<P><FONT SIZE=3D2>Thanks</FONT>
<BR><FONT SIZE=3D2>Sagar</FONT>
</P>

<P><FONT SIZE=3D2>&nbsp;-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: &nbsp; Rohde Dirk [<A =
HREF=3D"mailto:Dirk.Rohde@vpgroup.com">mailto:Dirk.Rohde@vpgroup.com</A>=
] </FONT>
<BR><FONT SIZE=3D2>Sent:&nbsp;&nbsp; Tuesday, April 29, 2003 10:11 =
AM</FONT>
<BR><FONT SIZE=3D2>To:&nbsp;&nbsp;&nbsp;&nbsp; 'Goparaju, =
Vidyasagar'</FONT>
<BR><FONT SIZE=3D2>Cc:&nbsp;&nbsp;&nbsp;&nbsp; =
'powerh-l@lists.swau.edu'</FONT>
<BR><FONT SIZE=3D2>Subject:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
RE: Writing into Sequential file on Unix Solaris Powerhouse</FONT>
<BR><FONT SIZE=3D2>envir onment</FONT>
</P>

<P><FONT SIZE=3D2>Try using the Unix &quot;touch&quot; command for =
creating your sequential file. This</FONT>
<BR><FONT SIZE=3D2>command will create the file if it does not exist or =
just update the modify</FONT>
<BR><FONT SIZE=3D2>date if it already exists and will work much quicker =
than qutil. Also, by</FONT>
<BR><FONT SIZE=3D2>using the &quot;dd&quot; command with =
&quot;if=3D&lt;input_file&gt; of=3D&lt;output_file&gt; cbs=3D80</FONT>
<BR><FONT SIZE=3D2>conv=3Dunblock&quot;, you can split a file into =
separate carriage-return delimited</FONT>
<BR><FONT SIZE=3D2>records that is readable by a program like =
&quot;vi&quot;. These are HP-UX Korn Shell</FONT>
<BR><FONT SIZE=3D2>commands but I believe that there are similar =
commands available on Solaris.</FONT>
</P>

<P><FONT SIZE=3D2>Dirk Rohde</FONT>
<BR><FONT SIZE=3D2>VantagePoint Systems Inc.</FONT>
</P>

<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Goparaju, Vidyasagar [<A =
HREF=3D"mailto:VGoparaju@tradepointsystems.com">mailto:VGoparaju@tradepo=
intsystems.com</A>]</FONT>
<BR><FONT SIZE=3D2>Sent: Monday, April 28, 2003 1:38 PM</FONT>
<BR><FONT SIZE=3D2>To: 'powerh-l@lists.swau.edu'</FONT>
<BR><FONT SIZE=3D2>Subject: Writing into Sequential file on Unix =
Solaris Powerhouse</FONT>
<BR><FONT SIZE=3D2>environme nt</FONT>
</P>
<BR>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>Hi =
All,</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>I am in the =
process of migrating my</FONT>
<BR><FONT SIZE=3D2>Powerhouse Application on VMS to Unix Solaris under =
Oracle environment.</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>We left the =
sequential files within the</FONT>
<BR><FONT SIZE=3D2>Powerhouse dictionary. Because the physical files =
for these records are</FONT>
<BR><FONT SIZE=3D2>created during the runtime to create command =
procedures.</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>I have a =
GENERIC 80 characters sequential</FONT>
<BR><FONT SIZE=3D2>file.</FONT>
</P>

<P><FONT SIZE=3D2>1.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I have created =
physical file using QUITL (There is not equivalent to</FONT>
<BR><FONT SIZE=3D2>CREATE/FDL on Unix environment. May be I don't =
know).</FONT>
<BR><FONT SIZE=3D2>2.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Written all the =
commands into the GENRIC.dat file from QUICK.</FONT>
<BR><FONT SIZE=3D2>a.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Quiz &lt;&lt; =
exit</FONT>
<BR><FONT SIZE=3D2>b.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Exec $MLT/SYCUSLST =
nogo</FONT>
<BR><FONT SIZE=3D2>c.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set rep dev disc =
name sycuslst </FONT>
<BR><FONT SIZE=3D2>d.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set nobl</FONT>
<BR><FONT SIZE=3D2>e.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Go</FONT>
<BR><FONT SIZE=3D2>f.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;parm&gt;</FONT>
<BR><FONT SIZE=3D2>g.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;parm&gt;</FONT>
<BR><FONT SIZE=3D2>h.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit</FONT>
<BR><FONT SIZE=3D2>3.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; On VMS the file =
looks like line sequential. But on Unix system</FONT>
<BR><FONT SIZE=3D2>everything is one long string.</FONT>
<BR><FONT SIZE=3D2>4.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Only =
&quot;more&quot; command is showing this file line by line. I could =
not</FONT>
<BR><FONT SIZE=3D2>open it using VI.</FONT>
<BR><FONT SIZE=3D2>5.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If I create the =
above command procedure using VI editor manually. It</FONT>
<BR><FONT SIZE=3D2>is working fine. But I could not make it to work =
when I create it from</FONT>
<BR><FONT SIZE=3D2>QUICK.</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>My objective =
is:</FONT>
<BR><FONT SIZE=3D2>1.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Create a sequential =
file with similar attributes to GENERIC with</FONT>
<BR><FONT SIZE=3D2>name &lt;prog id&gt;+date+time.sh</FONT>
<BR><FONT SIZE=3D2>2.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Write commands and =
parameters into it using Powerhouse QUICK</FONT>
<BR><FONT SIZE=3D2>program.</FONT>
<BR><FONT SIZE=3D2>3.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Execute the command =
procedure from QUICK and delete the command</FONT>
<BR><FONT SIZE=3D2>procedure when the report is created.</FONT>
<BR><FONT SIZE=3D2>4.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Above procedure is =
already working on VMS system. I am trying to</FONT>
<BR><FONT SIZE=3D2>migrate the same function to UNIX =
environment.</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>Please =
help.</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>Thanks</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>Sagar</FONT>
<BR><FONT SIZE=3D2>=3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =
=3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D</FONT>
<BR><FONT SIZE=3D2>Mailing list: powerh-l@lists.swau.edu</FONT>
<BR><FONT SIZE=3D2>Subscribe: &quot;subscribe&quot; in message body to =
powerh-l-request@lists.swau.edu</FONT>
<BR><FONT SIZE=3D2>Unsubscribe: &quot;unsubscribe =
&lt;password&gt;&quot; in message body to</FONT>
<BR><FONT SIZE=3D2>powerh-l-request@lists.swau.edu</FONT>
<BR><FONT SIZE=3D2><A =
HREF=3D"http://lists.swau.edu/mailman/listinfo/powerh-l" =
TARGET=3D"_blank">http://lists.swau.edu/mailman/listinfo/powerh-l</A></F=
ONT>
<BR><FONT SIZE=3D2>This list is closed, thus to post to the list you =
must be a subscriber.</FONT>
<BR><FONT SIZE=3D2>=3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =
=3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D</FONT>
<BR><FONT SIZE=3D2>Mailing list: powerh-l@lists.swau.edu</FONT>
<BR><FONT SIZE=3D2>Subscribe: &quot;subscribe&quot; in message body to =
powerh-l-request@lists.swau.edu</FONT>
<BR><FONT SIZE=3D2>Unsubscribe: &quot;unsubscribe =
&lt;password&gt;&quot; in message body to =
powerh-l-request@lists.swau.edu</FONT>
<BR><FONT SIZE=3D2><A =
HREF=3D"http://lists.swau.edu/mailman/listinfo/powerh-l" =
TARGET=3D"_blank">http://lists.swau.edu/mailman/listinfo/powerh-l</A></F=
ONT>
<BR><FONT SIZE=3D2>This list is closed, thus to post to the list you =
must be a subscriber.</FONT>
</P>

<P><FONT SIZE=3D2>This message may contain privileged and/or =
confidential information.&nbsp; If you have received this e-mail in =
error or are not the intended recipient, you may not use, copy, =
disseminate or distribute it; do not open any attachments, delete it =
immediately from your system and notify the sender promptly by e-mail =
that you have done so.&nbsp; Thank you.</FONT></P>

</BODY>
</HTML>
------_=_NextPart_001_01C30EFD.67F2B560--