It is worth noting that lines 107 - 110 are all doing an INSERT.  The lines 
before and after do not.

I'm not sure what that may or may not point to, but it is worth noting.  Any 
chance that what they are inserting is the problem (i.e. POLREC and VNDKEY are 
null or something other than what you suspect)?

JRI

-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of dale kelley
Sent: Friday, July 26, 2013 9:42 AM
To: U2 Users List
Subject: Re: [U2] [UD] BASIC Code Failing

This is all very interesting to hear.  I have a customer who has occasional 
instances when they complain that a supply receipt has failed to update the 
"last receipt" fields.  This is the code:

0092: 
***********************************************************************
0093: 7000:* UPDATE SUPPLIES
0094: 
***********************************************************************
0095: SUPKEY = POLREC<2>
0096: GOSUB 7300   * reads suprec
0097: IF SUPREC EQ "" THEN
0098:    RETURN
0099: END
0100: SUPREC<16,1> = SUPREC<16,1> + OCONV(POLREC<13,RCPSUB>,"MD4")
0101: NEWQTY = 0
0102: LOCCNT = DCOUNT(SUPREC<15>,@VM)
0103: FOR LOCSUB = 1 TO LOCCNT
0104:    NEWQTY = NEWQTY + SUPREC<16,LOCSUB>
0105: NEXT LOCSUB
0106: SUPREC<3> = NEWQTY
0107: SUPREC = INSERT(SUPREC,2,1,0,POLREC<6>)
0108: SUPREC = INSERT(SUPREC,11,1,0,POLREC<11,RCPSUB>)
0109: SUPREC = INSERT(SUPREC,12,1,0,FIELD(POLKEY,".",1))
0110: SUPREC = INSERT(SUPREC,13,1,0,VNDKEY)
0111: GOSUB 7400    * writes suprec
0112: RETURN
----:

I have never been able to figure out why line 106 gets executed but 107
- 110 do not.

My customer refers to it as "the lawnmower man".

dale

_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://cp.mcafee.com/d/FZsScz8scCQmhP3P3yb3NKVJ6WarZQrFCzASzt5d-Waq9EVdEThjvKztCVJ6WapEVvpood79Kl8XUz458qmDm56RLzaIundEqmDm56RLzaIundImIejthvW_8IfecnpWZOWtTCujhKUepLORQr8EGTKVOEuvkzaT0QSyrhdTdTdw0PVkDjUCvzPqrp7w0e2qKMM-l9OwXn6QOXtfzgSSCnrFYq5O5mUm-wafBitfyp-fdFJAu00CS7TbCMnWhEwdbojjdbFEwdboj3ziWq81Ag60Qid40Bl3Ph0bX8-k29KVLbCN1DxO_sIf
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to