PxPlus User Forum

Twitter Twitter Twitter

Author Topic: *plus\web\request  (Read 1745 times)

Jeffrey Ferreira

  • Diamond Member
  • *****
  • Posts: 175
  • I must have taken a wrong turn at Albuquerque.
    • View Profile
*plus\web\request
« on: August 08, 2019, 04:28:47 PM »
Hello,

i've been using *plus\web\request a lot but periodically (once  a day)
i get an error 47 at line 100

recvhdr$=stp(r$(1,o-1),3,$0D$)+$0A$

my first thought is to put an error branch on call and then re-try it...

but has anyone else experienced this error and maybe know a fix

jeff
« Last Edit: August 08, 2019, 04:31:18 PM by Jeffrey Ferreira »

chrisk

  • Member
  • **
  • Posts: 14
    • View Profile
Re: *plus\web\request
« Reply #1 on: August 08, 2019, 05:25:09 PM »
Jeff,

If you want to try putting a fix in *plus/web/request, give this a try:

A few lines ahead of your error, you should see a line where r$ being cleared (just before the while loop).  Try adding o=0 (reset variable o to zero) to that line.  The line will then look like this:

r$=""; o=0

Basically, this ensures o is reset each time the while loop is encountered.  In the normal flow, that is not very critical.  However, if a redirect is encountered and the read record inside the while loop times out, I could see that causing the error 47.

HTH
Chris Kukuchka
Sequoia Group, Inc.

Jeffrey Ferreira

  • Diamond Member
  • *****
  • Posts: 175
  • I must have taken a wrong turn at Albuquerque.
    • View Profile
Re: *plus\web\request
« Reply #2 on: August 08, 2019, 05:46:25 PM »
Chris et al,
thanks
i backed up program.
put change in and saved it.
the request still works ...so that is good....
question:  why did my variables change from lowercase to uppercase in the pxplus program?
should i be concerned
jeff
« Last Edit: August 08, 2019, 05:52:42 PM by Jeffrey Ferreira »

chrisk

  • Member
  • **
  • Posts: 14
    • View Profile
Re: *plus\web\request
« Reply #3 on: August 08, 2019, 07:43:41 PM »
Jeff,

Check out the 'LC' system parameter.  That and some other mixed case logic determines how variables appear when a program is listed.  Generally speaking, I would not worry about it.

Chris Kukuchka
Sequoia Group, Inc.

Mike King

  • Diamond Member
  • *****
  • Posts: 3811
  • Mike King
    • View Profile
    • BBSysco Consulting
Re: *plus\web\request
« Reply #4 on: August 09, 2019, 02:55:22 PM »
Two things...

  • The addition of the "o=0" to that line was added in PxPlus 2018.
  • Don't worry about the case change.  In our development department here we run with Mixed case enabled in order to make our programs more readable, however internally variable names are case insensitive so changing them to upper or lower case will not matter.
Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com