Introduction of Calling Quick Screens as Functions

Michael Lee Michael.Lee@mclsystemsinc.com
Wed, 26 May 2004 07:21:02 -0700


This is a multi-part message in MIME format.

--Boundary_(ID_eR6oeUvPl62Xs5cqvuVw6g)
Content-type: text/plain; charset=us-ascii; format=flowed
Content-transfer-encoding: 7BIT

Hi Viet,

There are a couple of ways to set the terminal type including, I think, 
a SETVAR command. I usually just add the TERM option to the QUICK 
command as follows:
QUICK AUTO=qkgo TERM=VT100

The type of terminal doesn't really matter unless you need it to display 
as I've occasionally needed for debugging purposes. To find a valid type 
enter QUICK NOTERMPOLL online and enter a ?. This will show a list of 
valid types. I've almost always used VT100 though and not had any 
difficulties (excepting the one debugging attempt).

You should also make sure to redirect the output so you don't get a 
bunch of extra lines in your job script. Just modify the above line 
slightly as follows:
QUICK AUTO=qkgo TERM=VT100 > $NULL

One time I was charged with the task of changing an existing order entry 
program to do bulk entry of data. By using redirection of input to a 
flat ascii input file I was able to prompt for all the fields in a 
slightly modified version of that same QUICK screen. Now one does not 
want to get an error in a batch process (as there's no user to make 
corrections) so I had a preprocess massage routine that weeded out bad 
data and sent an error file to the user for their perusal. In the first 
few tests a few errors did get through though and that's why I needed to 
see the output of the program to find what error occurred on which 
entry. This is not something I'd recommend to the novice programmer but 
it is an example of where one can prompt for data using the existing 
ENTRY and UPDATE procedures in a batch screen.

Regards,


Michael Lee
MCL Systems Inc.


Deskin, Bob wrote:

> We never documented QUICK in batch in the books and I don't remember 
> whether there were any conference papers or SupportLink articles about 
> it. I'm out of the office for a while but I'll check when I get back.
>  
> Strictly speaking, it's quite simple. There's no output display device 
> so you need to set the terminal type appropriately - someone please 
> help me here, I can't remember what the setting is. Usually there's no 
> input because you would have to mimic exactly what QUICK expects and 
> that can be very tricky. So once you have the output device, you just 
> run the screen. There's no layout section because there's no display. 
> You have to make sure that your processing doesn't prompt for anything 
> (data or commands) and is self-contained. Usually the INITIALIZE 
> procedure is used to contain all the processing. You run QUICK with 
> AUTO pointing to the screen file or a QKGO if that's needed. And 
> don't forget to exit the screen using the RETURN verb. For example:
>  
> screen batch menu  ; it's a menu because there's no PRIMARY and I'm 
> picky :-)
> file input designer
> file output designer
> procedure initialize
>   begin
>     while retrieving input
>       begin
>         get output via index-segment using index-segment of input
>         if accessok
>           then
>             begin
>               let item of output = item of input
>               put output
>               end
>         end
>       return
>     end
> build
>  
>
> Bob Deskin             
> Product Manager, Application Development Tools
> Cognos Inc. 3755 Riverside Drive, Ottawa ON K1G 4K9 CANADA
> bob.deskin@cognos.com (613) 738-1338 ext 7268
>
>     -----Original Message-----
>     From: Viet Nguyen [mailto:VNguyen@wsboces.org]
>     Sent: May 26, 2004 9:18 AM
>     To: Deskin, Bob; powerh-l@lists.sowder.com
>     Subject: RE: Introduction of Calling Quick Screens as Functions
>
>     Hi All, just for my own benefits could someone point me to where I
>     can find more details on how to use quick in batch mode? Books,
>     examples? Etc... would be helpful - I know that QTP has its place
>     but I just like to be able to see what the program is doing while
>     testing some small runs.
>
>     Thanks.
>
>     Viet.
>
>      
>
>  
>
>        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.
>

--Boundary_(ID_eR6oeUvPl62Xs5cqvuVw6g)
Content-type: text/html; charset=us-ascii
Content-transfer-encoding: 7BIT

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
  <title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Hi Viet,<br>
<br>
There are a couple of ways to set the terminal type including, I think,
a SETVAR command. I usually just add the TERM option to the QUICK
command as follows:<br>
QUICK AUTO=qkgo TERM=VT100<br>
<br>
The type of terminal doesn't really matter unless you need it to
display as I've occasionally needed for debugging purposes. To find a
valid type enter QUICK NOTERMPOLL online and enter a ?. This will show
a list of valid types. I've almost always used VT100 though and not had
any difficulties (excepting the one debugging attempt). <br>
<br>
You should also make sure to redirect the output so you don't get a
bunch of extra lines in your job script. Just modify the above line
slightly as follows:<br>
QUICK AUTO=qkgo TERM=VT100 &gt; $NULL<br>
<br>
One time I was charged with the task of changing an existing order
entry program to do bulk entry of data. By using redirection of input
to a flat ascii input file I was able to prompt for all the fields in a
slightly modified version of that same QUICK screen. Now one does not
want to get an error in a batch process (as there's no user to make
corrections) so I had a preprocess massage routine that weeded out bad
data and sent an error file to the user for their perusal. In the first
few tests a few errors did get through though and that's why I needed
to see the output of the program to find what error occurred on which
entry. This is not something I'd recommend to the novice programmer but
it is an example of where one can prompt for data using the existing
ENTRY and UPDATE procedures in a batch screen.<br>
<br>
Regards,<br>
<br>
<br>
Michael Lee<br>
MCL Systems Inc.<br>
<br>
<br>
Deskin, Bob wrote:<br>
<blockquote type="cite"
 cite="mid2B4E386EAEC90947802323BF373DC0ECF63593@sottemail1.ent.ad.cognos.com">
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-16">
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-16">
  <meta http-equiv="Content-Type" content="text/html; ">
  <meta content="Word.Document" name="ProgId">
  <meta content="MSHTML 5.50.4937.800" name="GENERATOR">
  <meta content="Microsoft Word 10" name="Originator">
  <link href="cid:filelist.xml@01C44302.49753470" rel="File-List">
<!--[if gte mso 9]><xml>
 <o:OfficeDocumentSettings>
  <o:DoNotRelyOnCSS/>
 </o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:SpellingState>Clean</w:SpellingState>
  <w:GrammarState>Clean</w:GrammarState>
  <w:DocumentKind>DocumentEmail</w:DocumentKind>
  <w:EnvelopeVis/>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]-->
  <style>@font-face {
	font-family: Tahoma;
}
@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; mso-header-margin: .5in; mso-footer-margin: .5in; mso-paper-source: 0; }
P.MsoNormal {
	FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso-style-parent: ""; mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman"
}
LI.MsoNormal {
	FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso-style-parent: ""; mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman"
}
DIV.MsoNormal {
	FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso-style-parent: ""; mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman"
}
A:link {
	COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
SPAN.MsoHyperlink {
	COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
A:visited {
	COLOR: purple; TEXT-DECORATION: underline; text-underline: single
}
SPAN.MsoHyperlinkFollowed {
	COLOR: purple; TEXT-DECORATION: underline; text-underline: single
}
P.MsoAutoSig {
	FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman"
}
LI.MsoAutoSig {
	FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman"
}
DIV.MsoAutoSig {
	FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman"
}
P {
	FONT-SIZE: 12pt; MARGIN-LEFT: 0in; MARGIN-RIGHT: 0in; FONT-FAMILY: "Times New Roman"; mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman"; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto
}
SPAN.EmailStyle16 {
	COLOR: navy; FONT-FAMILY: Arial; mso-style-type: personal; mso-style-noshow: yes; mso-ansi-font-size: 10.0pt; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial
}
SPAN.EmailStyle20 {
	COLOR: navy; FONT-FAMILY: Arial; mso-style-type: personal-reply; mso-style-noshow: yes; mso-ansi-font-size: 10.0pt; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt
}
SPAN.GramE {
	mso-style-name: ""; mso-gram-e: yes
}
DIV.Section1 {
	page: Section1
}
OL {
	MARGIN-BOTTOM: 0in
}
UL {
	MARGIN-BOTTOM: 0in
}
  </style><!--[if gte mso 10]>
<style>
 /* Style Definitions */ 
 table.MsoNormalTable
	{mso-style-name:"Table Normal";
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-parent:"";
	mso-padding-alt:0in 5.4pt 0in 5.4pt;
	mso-para-margin:0in;
	mso-para-margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:10.0pt;
	font-family:"Times New Roman";}
</style>
<![endif]--><!--[if gte mso 9]><xml>
 <u1:OfficeDocumentSettings>
  <u1:DoNotRelyOnCSS/>
 </u1:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <u2:WordDocument>
  <u2:Zoom>0</u2:Zoom>
  <u2:DocumentKind>DocumentEmail</u2:DocumentKind>
  <u2:EnvelopeVis/>
 </u2:WordDocument>
</xml><![endif]-->
  <div>
  <div><span class="863003713-26052004"><font face="Arial"
 color="#0000ff" size="2">We never documented QUICK in batch in the
books and I don't remember whether there were any conference papers or
SupportLink articles about it. I'm out of the office for a while but
I'll check when I get back.</font></span></div>
  <div>&nbsp;</div>
  <div><span class="863003713-26052004"><font face="Arial"
 color="#0000ff" size="2">Strictly speaking, it's quite simple. There's
no output display device so you need to set the terminal type
appropriately - someone please help me here, I can't remember what the
setting is. Usually there's no input because you would have to mimic
exactly what QUICK expects and that can be very tricky. So once you
have the output device, you just run the screen. There's no layout
section because there's no display. You have to make sure that your
processing doesn't prompt for anything (data or commands)&nbsp;and is
self-contained. Usually the INITIALIZE procedure is used to contain all
the processing. You run QUICK with AUTO pointing to the screen file or
a QKGO if that's needed. And don't&nbsp;forget&nbsp;to exit the screen using the
RETURN verb.&nbsp;For example:</font></span></div>
  <div>&nbsp;</div>
  <div><span class="863003713-26052004"><font face="Arial"
 color="#0000ff" size="2">screen batch menu&nbsp; ; it's a menu because
there's no PRIMARY and I'm picky :-)</font></span></div>
  <div><span class="863003713-26052004"><font face="Arial"
 color="#0000ff" size="2">file input designer</font></span></div>
  <div><span class="863003713-26052004"><font face="Arial"
 color="#0000ff" size="2">file output designer</font></span></div>
  <div><span class="863003713-26052004"><font face="Arial"
 color="#0000ff" size="2">procedure initialize</font></span></div>
  <div><span class="863003713-26052004"><font face="Arial"
 color="#0000ff" size="2">&nbsp; begin</font></span></div>
  <div><span class="863003713-26052004"><font face="Arial"
 color="#0000ff" size="2">&nbsp;&nbsp;&nbsp; while retrieving input</font></span></div>
  <div><span class="863003713-26052004"><font face="Arial"
 color="#0000ff" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; begin</font></span></div>
  <div><span class="863003713-26052004"><font face="Arial"
 color="#0000ff" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; get output via index-segment using
index-segment of input</font></span></div>
  <div><span class="863003713-26052004"><font face="Arial"
 color="#0000ff" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if accessok</font></span></div>
  <div><span class="863003713-26052004"><font face="Arial"
 color="#0000ff" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; then</font></span></div>
  <div><span class="863003713-26052004"><font face="Arial"
 color="#0000ff" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; begin</font></span></div>
  <div><span class="863003713-26052004"><font face="Arial"
 color="#0000ff" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;let item of output = item of
input</font></span></div>
  <div><span class="863003713-26052004"><font face="Arial"
 color="#0000ff" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;put output</font></span></div>
  <div><span class="863003713-26052004"><font face="Arial"
 color="#0000ff" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;end</font></span></div>
  <div><span class="863003713-26052004"><font face="Arial"
 color="#0000ff" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end</font></span></div>
  <div><span class="863003713-26052004"><font face="Arial"
 color="#0000ff" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return</font></span></div>
  <div><span class="863003713-26052004"><font face="Arial"
 color="#0000ff" size="2">&nbsp;&nbsp;&nbsp; end</font></span></div>
  <div><span class="863003713-26052004"><font face="Arial"
 color="#0000ff" size="2">build</font></span></div>
  <div>&nbsp;</div>
  <div><span class="863003713-26052004"><font face="Arial"
 color="#0000ff" size="2">
  </font>
  <p><font face="Arial" color="#0000ff" size="2"><font face="Arial"
 size="2">Bob Deskin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font><br>
  <font face="Arial" size="2">Product Manager</font><font face="Arial"
 size="2">,</font> <font face="Arial" size="2">Application Development
Tools</font> <br>
  <font face="Arial" size="2">Cognos Inc.</font> <font face="Arial"
 size="2">3755 Riverside Drive</font><font face="Arial" size="2">,</font>
  <font face="Arial" size="2">Ottawa ON K1G 4K9 CANADA</font> <br>
  <font face="Arial" size="2"><a class="moz-txt-link-abbreviated" href="mailto:bob.deskin@cognos.com">bob.deskin@cognos.com</a></font> <font
 face="Arial" size="2">(613) 738-1338 ext</font> <font face="Arial"
 size="2">7268</font></font></p>
  </span></div>
  <blockquote dir="ltr" style="margin-right: 0px;">
    <div class="OutlookMessageHeader" dir="ltr" align="left"><font
 face="Tahoma" size="2">-----Original Message-----<br>
    <b>From:</b> Viet Nguyen [<a class="moz-txt-link-freetext" href="mailto:VNguyen@wsboces.org">mailto:VNguyen@wsboces.org</a>]<br>
    <b>Sent:</b> May 26, 2004 9:18 AM<br>
    <b>To:</b> Deskin, Bob; <a class="moz-txt-link-abbreviated" href="mailto:powerh-l@lists.sowder.com">powerh-l@lists.sowder.com</a><br>
    <b>Subject:</b> RE: Introduction of Calling Quick Screens as
Functions<br>
    <br>
    </font></div>
    <div class="Section1">
    <p class="MsoNormal"><font face="Arial" color="navy" size="2"><span
 style="font-size: 10pt; color: navy; font-family: Arial;">Hi <span
 class="GramE">All</span>, just for my own benefits could someone point
me to where I can find more details on how to use quick in batch mode? <span
 class="GramE">Books, examples?</span> Etc&#8230; would be helpful &#8211; I know
that QTP has its place but I just like to be able to see what the
program is doing while testing some small runs.<o:p></o:p></span></font></p>
    <p class="MsoNormal"><font face="Arial" color="navy" size="2"><span
 style="font-size: 10pt; color: navy; font-family: Arial;">Thanks.<o:p></o:p></span></font></p>
    <p class="MsoNormal"><font face="Arial" color="navy" size="2"><span
 style="font-size: 10pt; color: navy; font-family: Arial;">Viet.<o:p></o:p></span></font></p>
    <p class="MsoNormal"><font face="Arial" color="navy" size="2"><span
 style="font-size: 10pt; color: navy; font-family: Arial;"><o:p>&nbsp;</o:p></span></font></p>
<!--[if !supportLists]--><!--[endif]--><!--[if !supportLists]--><!--[endif]--><!--[if !supportLists]--><!--[endif]--><!--[if !supportLists]--><!--[endif]--><!--[if !supportLists]--><!--[endif]--><!--[if supportFields]><span 
class=EmailStyle16><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;mso-bidi-font-size:12.0pt'><span style='mso-element:field-begin'></span><span 
style='mso-spacerun:yes'>&nbsp;</span>AUTOTEXTLIST \s &quot;E-mail Signature&quot; <span 
style='mso-element:field-separator'></span></span></font></span><![endif]--><!--[if supportFields]><span 
class=EmailStyle16><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;mso-bidi-font-size:12.0pt'><span style='mso-element:field-end'></span></span></font></span><![endif]--></div>
  </blockquote>
  </div>
  <div>&nbsp;</div>
  <div>
  <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font face="Arial" size="2">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>
  </div>
</blockquote>
</body>
</html>

--Boundary_(ID_eR6oeUvPl62Xs5cqvuVw6g)--