QTP, QUIZ Files with commas.
Seamus BROWNE
Seamus.Browne@partage.org
Wed, 17 Oct 2001 15:49:42 +0200
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_01C15712.9315F130
Content-Type: text/plain;
charset="iso-8859-1"
Hi,
I found your posting on the PH list, concerning the commas within records.
On a HP3000, the awk utility
Someone already suggested in reply to your posting that it would be easier
to do the REPLACE op outside of PH, from within a job.
HP3000 users have access to the Unix ( PosiX ) utility "awk". AWK.HPBIN.SYS.
Awk seems to be the standard for parsing, replacing data in files or
building new files
with reformatted data (using the printf function) .
I have not used it, yet.
The syntax is here <http://vectorsite.tripod.com/tsawk2.html#m2>
http://vectorsite.tripod.com/tsawk2.html#m2
Now if I may widen the debate.
We are having the same kind of comma problem here. Or soon will be, when
we start receiving big files from Internet cgis. (Common gateway interfaces)
Fields in these files are separated by "|" or commas or semi-colons and the
object of the game is to get them into the (Image) database.
Now I think that that is problem that will be facing hundreds of PH users
the
world over.
Introducing a REPLACE function in QTP and QUIZ would certainly increase
efficiency, but in world where file portability is an absolute necessity, it
would
only be a very small step.
What I am looking for is a file conversion utility that would take a file
from the Net,
full of data with separators and transform it into a standard PH subfile.
Or even a PH "portable subfile" (i.e. a data file and a mini-dictionary
file). When
I say a file conversion utility, this could be a job or command file that
calls awk
and/or other stuff but eventually produces a file directly recognisable by
PH
and without the hassle of declaring a file in the dictionary.
Anyone interested in putting this together ?
Seamus.Browne@partage.org
------_=_NextPart_001_01C15712.9315F130
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns=3D"http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<meta name=3DProgId content=3DWord.Document>
<meta name=3DGenerator content=3D"Microsoft Word 9">
<meta name=3DOriginator content=3D"Microsoft Word 9">
<link rel=3DFile-List href=3D"cid:filelist.xml@01C15724.F3C38200">
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:DoNotRelyOnCSS/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:DocumentKind>DocumentEmail</w:DocumentKind>
<w:HyphenationZone>21</w:HyphenationZone>
<w:EnvelopeVis/>
</w:WordDocument>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:536871559 0 0 0 415 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0cm;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:11.0pt;
mso-bidi-font-size:12.0pt;
font-family:Verdana;
mso-fareast-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;
text-underline:single;}
p.MsoAutoSig, li.MsoAutoSig, div.MsoAutoSig
{margin:0cm;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:11.0pt;
mso-bidi-font-size:12.0pt;
font-family:Verdana;
mso-fareast-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";}
span.StyleCourrierlectronique15
{mso-style-type:personal-compose;
mso-ansi-font-size:10.0pt;
mso-ascii-font-family:Arial;
mso-hansi-font-family:Arial;
mso-bidi-font-family:Arial;
color:black;}
@page Section1
{size:595.3pt 841.9pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;
mso-header-margin:35.4pt;
mso-footer-margin:35.4pt;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=3DFR link=3Dblue vlink=3Dpurple =
style=3D'tab-interval:35.4pt'>
<div class=3DSection1>
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'>Hi, =
<o:p></o:p></span></font></span></p>
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'>I found =
your
posting on the PH list, concerning the commas within =
records.<o:p></o:p></span></font></span></p>
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'><![if =
!supportEmptyParas]> <![endif]><o:p></o:p></span></font></span></p>=
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><b><font =
size=3D2
color=3D"#333399" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333399;mso-ansi-language:EN-GB;font-weig=
ht:
bold'>On a HP3000, the awk utility =
<o:p></o:p></span></font></b></span></p>
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'>Someone =
already
suggested in reply to your posting that it would be =
easier<o:p></o:p></span></font></span></p>
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'><span
style=3D"mso-spacerun: yes"> </span>to do the REPLACE op outside =
of PH, from
within a job.<o:p></o:p></span></font></span></p>
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'>HP3000 =
users have
access to the Unix ( PosiX ) utility "awk". =
AWK.HPBIN.SYS.<o:p></o:p></span></font></span></p>
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'><![if =
!supportEmptyParas]> <![endif]><o:p></o:p></span></font></span></p>=
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'>Awk =
seems to be
the standard for parsing, replacing data in files or building new files =
<o:p></o:p></span></font></span></p>
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'>with =
reformatted
data (using the printf function) .<o:p></o:p></span></font></span></p>
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'><![if =
!supportEmptyParas]> <![endif]><o:p></o:p></span></font></span></p>=
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'>I have =
not used
it, yet. <o:p></o:p></span></font></span></p>
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'>The =
syntax is
here <a href=3D"http://vectorsite.tripod.com/tsawk2.html#m2"><font =
color=3D"#333333"><span
style=3D'color:#333333'>http://vectorsite.tripod.com/tsawk2.html#m2</spa=
n></font></a><o:p></o:p></span></font></span></p>
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'><![if =
!supportEmptyParas]> <![endif]><o:p></o:p></span></font></span></p>=
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><b><font =
size=3D2
color=3D"#333399" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333399;mso-ansi-language:EN-GB;font-weig=
ht:
bold'>Now if I may widen the =
debate.<o:p></o:p></span></font></b></span></p>
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'>We are =
having
the same kind of comma problem here. <span style=3D"mso-spacerun:
yes"> </span>Or soon will be, =
when<o:p></o:p></span></font></span></p>
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'>we =
start receiving
big files from Internet cgis. (Common gateway =
interfaces)<o:p></o:p></span></font></span></p>
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'>Fields =
in these
files are separated by "|" or commas or semi-colons and =
the<o:p></o:p></span></font></span></p>
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'>object =
of the
game is to get them into the (Image) =
database.<o:p></o:p></span></font></span></p>
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'><![if =
!supportEmptyParas]> <![endif]><o:p></o:p></span></font></span></p>=
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'>Now I =
think
that that is problem that will be facing hundreds of PH users =
the<o:p></o:p></span></font></span></p>
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'>world =
over.<o:p></o:p></span></font></span></p>
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'><![if =
!supportEmptyParas]> <![endif]><o:p></o:p></span></font></span></p>=
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'>Introduc=
ing a REPLACE
function in QTP and QUIZ would certainly =
increase<o:p></o:p></span></font></span></p>
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'>efficien=
cy, but
in world where file portability is an absolute necessity, it would =
<o:p></o:p></span></font></span></p>
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'>only be =
a very
small step.<o:p></o:p></span></font></span></p>
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'><![if =
!supportEmptyParas]> <![endif]><o:p></o:p></span></font></span></p>=
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'>What I =
am
looking for is a file conversion utility that would take a file from =
the Net, <o:p></o:p></span></font></span></p>
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'>full of =
data with
separators and transform it into a standard PH subfile. =
<o:p></o:p></span></font></span></p>
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'>Or even =
a PH "portable
subfile" (i.e. a data file and a mini-dictionary file). When =
<o:p></o:p></span></font></span></p>
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'>I say a =
file conversion
utility, this could be a job or command file that calls awk =
<o:p></o:p></span></font></span></p>
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'>and/or =
other
stuff but eventually produces a file directly recognisable by PH =
<o:p></o:p></span></font></span></p>
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'>and =
without the
hassle of declaring a file in the =
dictionary.<o:p></o:p></span></font></span></p>
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'><![if =
!supportEmptyParas]> <![endif]><o:p></o:p></span></font></span></p>=
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'>Anyone
interested in putting this together =
?<o:p></o:p></span></font></span></p>
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'><![if =
!supportEmptyParas]> <![endif]><o:p></o:p></span></font></span></p>=
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'>Seamus.B=
rowne@partage.org<o:p></o:p></span></font></span></p>
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'><![if =
!supportEmptyParas]> <![endif]><o:p></o:p></span></font></span></p>=
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'><![if =
!supportEmptyParas]> <![endif]><o:p></o:p></span></font></span></p>=
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'><![if =
!supportEmptyParas]> <![endif]><o:p></o:p></span></font></span></p>=
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'><![if =
!supportEmptyParas]> <![endif]><o:p></o:p></span></font></span></p>=
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'><![if =
!supportEmptyParas]> <![endif]><o:p></o:p></span></font></span></p>=
<p class=3DMsoNormal><span class=3DStyleCourrierlectronique15><font =
size=3D2
color=3D"#333333" face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial;color:#333333;mso-ansi-language:EN-GB'><![if =
!supportEmptyParas]> <![endif]><o:p></o:p></span></font></span></p>=
</div>
</body>
</html>
------_=_NextPart_001_01C15712.9315F130--