STRPCCMD with Multiple name=value Pairs in a URL Query String
Last Post 04 Apr 2013 07:22 AM by Mel Beckman. 8 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
DaveLClarkI
Basic Member
Basic Member
Posts:289

--
29 Mar 2013 03:24 PM

Anybody know the trick to formatting a URL with multiple name-value pairs in the query string and still have it work through STRPCCMD from RPG?

I've searched a bit on both the Internet and in this forum and haven't found a complete answer, yet.  I can get it to work with just one name-value pair and I found an example of using two name-value pairs.  But, when I try to use the same technique as is used for the two name-value pairs, it doesn't work.  Basically, a URL query string has the following format when using name-value pairs:

?name1=value1&name2=value2&name3=value3&name4=value4

When I try to use that format, the query string gets truncated in the browser after the first name-value pair.  Then, I found an example that said to use x'B050' in place of the ampersand.  When I tried that, the query string gets truncated in the browser after the second name-value pair.

What's the secret?  Thanks.

DaveLClarkI
Basic Member
Basic Member
Posts:289

--
29 Mar 2013 03:40 PM
OK, nevermind.  I found a coding error in my RPG program.  The x'B050' is working for every name-value pair, now.  Thanks.
Ringer
Veteran Member
Veteran Member
Posts:1761
Avatar

--
30 Mar 2013 06:03 AM
Just know that STRPCCMD has a max of 123 characters in the URL. If you pass too many name/value pairs, you may exceed that.

Chris Ringer
DaveLClarkI
Basic Member
Basic Member
Posts:289

--
31 Mar 2013 12:38 PM
Thanks.  I've seen that restriction stated, before; but, only from unofficial sources.  From a green-screen, if I prompt the STRPCCMD command, I'm presented with an input field of 132 characters in length.  Granted, that is not significantly more; but, I wonder where people are getting the 123-character length?
Jack Callahan
Basic Member
Basic Member
Posts:303

--
31 Mar 2013 08:12 PM

here's a link from IBM support documenting the 123 character limit for STRPCCMD:

http://www-01.ibm.com/support/docvi...d700525c13

 

Editted: try again, forum software mangled the link

DaveLClarkI
Basic Member
Basic Member
Posts:289

--
31 Mar 2013 08:14 PM
Our apologies...

The page you requested cannot be displayed
Scott Klement
Editorial Staff Member
Editorial Staff Member
Posts:16387
Avatar

--
01 Apr 2013 12:15 PM
Try it again....  Jack fixed the link.
DaveLClarkI
Basic Member
Basic Member
Posts:289

--
01 Apr 2013 01:02 PM
Thank you.
Mel Beckman
New Member
New Member
Posts:14

--
04 Apr 2013 07:22 AM
Jack,

Since we just changed forum software, can you tell me how the link was mangled? I'd like to make sure the problem is fixed. Thanks!

-mel beckman
You are not authorized to post a reply.

Acceptable Use Policy