PxPlus User Forum

Twitter Twitter Twitter

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - John_S

Pages: [1] 2
Web Services / Re: Web request returns the program
« on: June 18, 2020, 04:49:13 PM »
It's working now.  I needed to add our standard prefixes at the top of the program.

Thanks for your help - much appreciated!

Web Services / Re: Web request returns the program
« on: June 18, 2020, 04:39:39 PM »
Since the file has an embedded IO program associated with it, I figured the error might be caused by it being unable to locate the IO program.  So I added the path to it to the prefix.  That fixed the error 121, but now I am getting an error 12 on line 1000.  I will keep trying.

Web Services / Re: Web request returns the program
« on: June 18, 2020, 04:26:00 PM »
Thanks Mike, for some reason I thought it needed to be a text file.

I have saved it as a regular program, and now I am getting an error 121 "invalid program format" on line 1000 where it is just opening a keyed file.


Web Services / Web request returns the program
« on: June 18, 2020, 03:18:38 PM »
Hello.  I am trying to implement an API that accepts a part number and verifies that it is on file.  The attached .pxp program is what the API executes.

I am testing the API by executing the following code:
2610 LET URL$="http://cetec.meowintl.com:8088/wal_checkpn.pxp?&prc=AMP&Part=164164-1"
2620 LET URL$=SUB(URL$," ","%20")
2630 LET URL$=SUB(URL$,"|","%7C")
2640 LET URL$=SUB(URL$,"^","%5E")
2650 !
2660 SETERR 2690
2670 CALL "*PLUS/WEB/REQUEST",URL$,X$,Y$,Z$; REM "x$ is data, y$ is response, z$=response header

After 2670 executes X$ is nothing, and Y$ is a listing of my API program.  I don't understand why I am getting a program listing instead of my XML result.  What am I doing wrong?

Version 14.1, RedHat Linux, using the PxPlus web server.

Programming / Re: Trapping error with DTE()
« on: February 14, 2020, 04:52:45 PM »
It traps the error for me, so I am not sure why it is throwing an error for you.  Here is my test code.  When I run it I get "bad date, error 41".

00010  LET OUTDT$="40129C0"
00020  LET DT$=DTE(MID(OUTDT$,1,2)+"/"+MID(OUTDT$,3,2)+"/"+ \
00030  PRINT DT$
00040  ESCAPE
00050  PRINT "bad date, error ",ERR
00060  ESCAPE

Thin Client/WindX / Re: Mark/copy option
« on: February 10, 2020, 05:17:12 PM »
Thanks Mike, that works great!  Our users will be very happy!

Thin Client/WindX / Mark/copy option
« on: February 10, 2020, 04:49:47 PM »
In WindX there is an option to mark/copy text by right clicking the icon, selecting edit, mark/copy, and then highlighting some text on the screen. It then pops up an option to copy the highlighted text to the clipboard.  This is very handy for our users, but they have to go through this procedure every time they want to highlight something and copy it.  Is there an option that will keep this enabled so they don't have to repeat this procedure each time?

Language / Re: INPUT in a cron job
« on: December 04, 2019, 05:29:46 PM »
Thanks Mike!

Language / Re: INPUT in a cron job
« on: December 04, 2019, 04:58:58 PM »
Thanks Ken.  I will pass this on to my associate.

Language / INPUT in a cron job
« on: December 04, 2019, 02:03:13 PM »

We run numerous PxPlus cron jobs on our RedHat server, and many of those programs can also be run on-demand in a regular session. Some of these programs have INPUT statements, and while we try to program them to skip INPUT statements when the user is "batch", we sometimes miss some of them.  This causes the cron process to hang, and it even appears to slow the system down.

Is there a system parameter that would issue a RELEASE if an INPUT statement is encountered in a cron job?  I figure the answer is No, and I don't even know how it would know it is a cron job, but my associate wanted me to post the question.

PxPlus 14.10.


Language / Re: Speed up writes to serial file
« on: November 08, 2019, 06:00:15 PM »
Thanks Mike, that is good to know!

Language / Re: Speed up writes to serial file
« on: November 08, 2019, 05:35:34 PM »
Thanks Mike.  I was opening the inventory file using OPEN INPUT, but I have changed it to OPEN LOAD at your suggestion.  I reran the program and it took 20 minutes which is a big improvement. It should be noted, however, that most of the staff has left for the day so there is not much competition for system resources at the moment.

Here is a code snippet of the read, building of the string for the serial file, and the print to the serial file.

7145 DIM M2A$[1:32]; READ (M2INVA,KEY=A$,DOM=*NEXT)M2A${ALL}
7155 LET OUT$=STP(A$(1,3),1)+QT$+STP(A$(4,26),2)+QT$+A$(30,2)+QT$+STP(B$,1)+QT$
7156 LET OUT$+=FNMDY$(N$)+QT$+FNMDY$(O$)+QT$+P$+QT$+Q$+QT$+R$+QT$+S$+QT$+T$+QT$
7157 LET OUT$+=STP(A30$,2)+QT$+STP(PAD(M2A$[8],12),2)+QT$+STP(MID(PAD(M2A$[8],2
7540 PRINT (1)OUT$
7550 GOTO 7140

The files M2INV and M2INVA both have an embedded IO program, but only for pre_write.  I have both IO programs added to memory via ADDR.

Language / Re: Speed up writes to serial file
« on: November 08, 2019, 03:16:05 PM »
Thanks Neal. In this case the database is external (not on this server and not accessible), and controlled by a "data team". They require us to send a tab-delimited file via ftp.

Language / Speed up writes to serial file
« on: November 08, 2019, 02:39:58 PM »

We have a program that reads our inventory master file and writes some of the data to a tab-delimited file which is later imported into an offline SQL database.  The inventory master file has 2.6 million records in it, and the output serial file is 280mb in size.  It takes the program 45 minutes to over an hour to do all of this (depending on load), and management is asking if I can speed it up.  Since this is essentially a simple read, add data to a string, and write to a serial file, I don't really see any options.

The inventory master file is an EFF file.  I am creating the output serial file using a simple SERIAL command, and using PRINT (1)OUT$ to add data to the file.  I suspect, but don't know, that writing/printing to a serial file is kind of slow.

Any suggestions?

Redhat Linux, PxPlus 14.10 with 150 user license.

Programming / 'CC' Parameter
« on: August 02, 2019, 04:29:18 PM »

According to the online manual the default setting for the program cache parameter 'CC' is on.  But the example shows 'CC'=0 (Check Cache first) as the default.  Isn't 1 normally the value for on, and 0 for off?


Pages: [1] 2