IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Need info : EXEC CICS WEB PARSE URL


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
arunn

New User


Joined: 03 Sep 2010
Posts: 15
Location: Bengaluru

PostPosted: Fri Oct 15, 2010 7:32 pm
Reply with quote

Hi,

The EXEC CICS WEB PARSE URL command is used to break down a URL string into its component parts and i am able to do it successfully to a certain extent.
But the port number that i specify in it is not being recognised and is giving me back a
EIBRESP code:16 which means that it is an invalid request and
EIBRESP2 code : 138 which means that the The port number is greater than 65535. But the Port number i have given is 80 , which is the default port for a HTTP URL.

I tried various combinations of debugging this, but it just would not give me the proper result.

However, the real problem does not lie with the web parse , but when using the web open to connect to the URL using the port number details in it , i am getting back the same EIBRESP codes as above and hence connection is not established.

The parameters used in Web parse are:

EXEC CICS WEB PARSE
URL(WS-URL-REQUEST)
SCHEMENAME(WS-SCHEME)
HOST(WS-HOST)
PORTNUMBER(WS-PORT)
PATH(WS-PATH)
QUERYSTRING(WS-QUERYSTRING)
END-EXEC.

For any given URL, when i put in displays for the variable names above, i am getting back expected values for all of them expect the Port number which is displayed as blank , with the Respcode errors as mentioned above.

Can anybody please provide me with more info in this regard.
Any leads would be very usefull.

Thanks,
Arun.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Oct 15, 2010 7:51 pm
Reply with quote

What is the PICTURE for WS-PORT?
Back to top
View user's profile Send private message
arunn

New User


Joined: 03 Sep 2010
Posts: 15
Location: Bengaluru

PostPosted: Fri Oct 15, 2010 9:44 pm
Reply with quote

I used alphanumeric PIC X(2) , numeric 9(2) AND 9(4) - as usually the ports are 4 bytes long , S9(4) and S9(8) comp-3 , even used the picture clause as binary even though it is the same a Comp field , but still the results were the same.


Thanks,
Arun
Back to top
View user's profile Send private message
arunn

New User


Joined: 03 Sep 2010
Posts: 15
Location: Bengaluru

PostPosted: Fri Oct 15, 2010 9:46 pm
Reply with quote

All the other fields were declared as alphanumeric.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Oct 15, 2010 10:28 pm
Reply with quote

From the CICS Application Programming Reference manual section 1.285 on the WEB PARSE URL command:
Quote:
PORTNUMBER(data-area)
returns (as a fullword binary data area) the port number that is specified in, or appropriate for, the URL.
Try PIC S9(08) COMP-5 which is a fullword binary data item.
Back to top
View user's profile Send private message
arunn

New User


Joined: 03 Sep 2010
Posts: 15
Location: Bengaluru

PostPosted: Mon Oct 18, 2010 5:30 pm
Reply with quote

Thanks very much Robert, my responses are correct now.
My understanding of a fullword binary data area was incorrect when i coded this.
I have a query here though, what is the difference between a S9(08) comp-3 and S9(08) comp-5. I thought both of these were full word binary data.I did check a few other posts about this, but the more i go into the more i got confused.
I hope not to goof up in a similar way again icon_smile.gif .
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Oct 18, 2010 5:39 pm
Reply with quote

S9(08) COMP-3 takes 5 bytes not 4 and stores each decimal digit in a half-byte (aka nybble), or 2 decimal digits in a byte, with the last half-byte used for the sign (F for unsigned, C for positive and D for negative). So +12345678 stored as a COMP-3 value would be x'012345678C'. A COMP-5 variable is a COMP variable that can store the entire binary value (depending upon the TRUNC option setting, a COMP variable may only store the number of digits int he PICTURE clause). The COMP-5 value +12345678 would be stored as X'00BC614E' -- quite different from X'012345678C'.

Glad to hear you've got it working, though.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Calling an Open C library function in... CICS 1
No new posts How to 'Ping' a CICS region in JCL CICS 2
No new posts JCL EXEC PARM data in C Java & MQSeries 2
Search our Forums:

Back to Top