AS400 V4R4M0 -- 6.07F FILE statement NEED option

Oran Shapitka oran@intertechsystems.com
Mon, 30 Apr 2001 13:34:45 -0600


This is a multi-part message in MIME format.

------=_NextPart_000_00A9_01C0D17A.51FE00B0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Without looking at the code and the data, it would be difficult to know for
sure.  Knowing that the use of a designer file stipulates that all
read\write activity is the responsibility of the programmer, I would guess
that the NEED option would not doing anything for you (I know I should look
this up in the manual, but after 17 years, you kind of know how the product
behaves.)  I would guess that your record complex has not had a changed from
the default values and therefore your record is not being written out.  I
would take one of the fields on the file and change it to a bogus value,
then set it back again.  This will force the record complex to be in a state
to be written.  Also read in the manual about the reset command if you plan
on writing multiple records out on the file.

Hope this helps to point you in the right direction for solving the problem.

Oran

Warning:  The advice and or opinions stated above may be worth exactly the
compensation received for providing the same.

-----Original Message-----
From: powerh-l-admin@cube.swau.edu [mailto:powerh-l-admin@cube.swau.edu]On
Behalf Of Rendell Requiro
Sent: Monday, April 30, 2001 12:56 PM
To: powerh-l@lists.swau.edu
Subject: AS400 V4R4M0 -- 6.07F FILE statement NEED option


Are there any limitations when using the NEED option on a DESIGNER file
statement?  Sometimes the following code snippet works, other times no
DESIGNER file records are created.

my file statement is

    file TRANSFER-IN designer need 1

during a DESIGNER procedure I do a GET to the DESIGNER file TRANSFER-IN

    get TRANSFER-IN viaindex (...) via (...) using (...) optional
    if not accessok
    then begin
               put TRANSFER-IN
           end

Most of the time TRANSFER-IN records are created, maybe 20-30% of the time,
no records are created.  I am baffled -- any ideas why this might occur?

Rendell Requiro
AG Business Management, Inc.
rendell@agbus.com
831-455-2355   x101  voice
831-455-2264             fax
www.agbus.com


------=_NextPart_000_00A9_01C0D17A.51FE00B0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.3315.2869" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D603402419-30042001>Without looking at the code and the data, it =
would be=20
difficult to know for sure.&nbsp; Knowing that the use of a designer =
file=20
stipulates that all read\write activity is the responsibility of the =
programmer,=20
I would guess that the NEED option would not doing anything for you (I =
know I=20
should look this up in the manual, but after 17 years, you kind of know =
how the=20
product behaves.)&nbsp; I would guess that your record complex has not =
had a=20
changed from the default values and therefore your record is not being =
written=20
out.&nbsp; I would take one of the fields on the file and change it to a =
bogus=20
value, then set it back again.&nbsp; This will force the record complex =
to be in=20
a state to be written.&nbsp; Also read in the manual about the reset =
command if=20
you plan on writing multiple records out on the =
file.</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D603402419-30042001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN =
class=3D603402419-30042001>Hope=20
this helps to point you in the right direction for solving the=20
problem.</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D603402419-30042001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D603402419-30042001>Oran</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D603402419-30042001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D603402419-30042001>Warning:&nbsp; The advice and or =
opinions&nbsp;stated=20
above may be&nbsp;worth exactly the&nbsp;compensation&nbsp;received for=20
providing the same.</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D603402419-30042001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D603402419-30042001></SPAN></FONT><FONT face=3DTahoma =
size=3D2>-----Original=20
Message-----<BR><B>From:</B> powerh-l-admin@cube.swau.edu=20
[mailto:powerh-l-admin@cube.swau.edu]<B>On Behalf Of </B>Rendell=20
Requiro<BR><B>Sent:</B> Monday, April 30, 2001 12:56 PM<BR><B>To:</B>=20
powerh-l@lists.swau.edu<BR><B>Subject:</B> AS400 V4R4M0 -- 6.07F FILE =
statement=20
NEED option<BR><BR></DIV></FONT>
<DIV><FONT size=3D2>Are there any limitations when using the NEED option =
on a=20
DESIGNER file statement?&nbsp; Sometimes the following code snippet =
works, other=20
times no DESIGNER file records are created.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D2>my file statement is&nbsp; </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D2>&nbsp;&nbsp;&nbsp; file TRANSFER-IN designer need=20
1</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D2>during a DESIGNER procedure I do a GET to the =
DESIGNER file=20
TRANSFER-IN</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D2>&nbsp;&nbsp;&nbsp; get TRANSFER-IN viaindex (...) =
via (...)=20
using (...) optional </FONT></DIV>
<DIV><FONT size=3D2>&nbsp;&nbsp;&nbsp; if not accessok</FONT></DIV>
<DIV><FONT size=3D2>&nbsp;&nbsp;&nbsp; then begin</FONT></DIV>
<DIV><FONT=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;=20
put TRANSFER-IN</FONT></DIV>
<DIV><FONT =
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
end</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D2>Most of the time TRANSFER-IN records are created, =
maybe 20-30%=20
of the time, no records are created.&nbsp; I am baffled -- any ideas why =
this=20
might occur?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D2>Rendell Requiro<BR>AG Business Management, =
Inc.<BR><A=20
href=3D"mailto:rendell@agbus.com">rendell@agbus.com</A><BR>831-455-2355&n=
bsp;&nbsp;=20
x101&nbsp;=20
voice<BR>831-455-2264&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;=20
fax<BR><A=20
href=3D"http://www.agbus.com">www.agbus.com</A><BR></FONT></DIV></BODY></=
HTML>

------=_NextPart_000_00A9_01C0D17A.51FE00B0--