ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » PIC S9(4) COMP Fields

Post new topic  Reply to topic Goto page 1, 2, 3  Next
 PIC S9(4) COMP Fields « View previous topic :: View next topic » 
Author Message
LearnMQSI
PostPosted: Tue Feb 21, 2006 7:32 am    Post subject: PIC S9(4) COMP Fields Reply with quote

Centurion

Joined: 20 Aug 2002
Posts: 137

Hi There,

I did search a lot for this type of issue but did not really get any solution so far.

I have imported a Cobol Copybook which has PIC S9(4) COMP fields in it.

I'm having issues with these fields. I have set CWF for these fields in my message set as follows:

Physical Type - Integer
Length Count - 2
Length Units - Bytes
Signed - Yes
Sign Orientation- N/A
Byte Alignment - 1 Byte
String Justification - N/A
Padding Character -
Skip Count - 0
Encoding Null - NULLLogicalValue
Encoding Null Value - 0

Data is goufing around in my logical tree.

Would somebody put some shed on this and let me know what I'm doing wrong please!!!

Thank you,
_________________
IBM Certified System Administrator - WebSphere MQ 5.3
Back to top
View user's profile Send private message
EddieA
PostPosted: Tue Feb 21, 2006 11:00 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Quote:
Data is goufing around in my logical tree.

Huh. Please explain exactly what the problem is.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
LearnMQSI
PostPosted: Tue Feb 21, 2006 7:44 pm    Post subject: Reply with quote

Centurion

Joined: 20 Aug 2002
Posts: 137

The data in this particular field is non-readable i.e. showing some garbage values.

I think I have to change my physical type or any other CWF properties in order to get the correct data.

I appreciate any idea or help on this!!!
_________________
IBM Certified System Administrator - WebSphere MQ 5.3
Back to top
View user's profile Send private message
EddieA
PostPosted: Tue Feb 21, 2006 10:41 pm    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Quote:
The data in this particular field is non-readable

Non-readable where. This is a binary/integer field. It won't be readable by something that only displays characters.

We need a little more information about what you've set up, what you've observed, and what you think is wrong, and why.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Feb 22, 2006 1:59 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
I have set CWF for these fields in my message set as follows:
Why did you need to set any CWF properties. Didn't you like what the COBOL importer did? It usually gets things pretty spot-on.

I'm a bit puzzled as to why you would select Physical Type 'integer' ( which is a twos-complement integer ) when the COBOL definition is PIC S9(4) ( four ASCII digits ). Please explain what you want to do and why.
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Feb 22, 2006 5:25 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Sorry - Physical Type 'Integer' is correct. I missed the 'COMP'
Back to top
View user's profile Send private message
shanson
PostPosted: Wed Feb 22, 2006 5:49 am    Post subject: Reply with quote

Partisan

Joined: 17 Oct 2003
Posts: 344
Location: IBM Hursley

If I look at the help topic for this stuff ("Importing from COBOL: supported features") and look at the entries in the table that correspond to PIC S9(4) COMP, it should be modelled as
- logical type xsd:short
- CWF physical type 'Integer'
- CWF length count 2
- CWF signed
(please ignore where it implies that CWF signed is not set, that is wrong, I checked by using COBOL importer)
The only thing I can think of is that you have not got the alignment correct. Make sure that CWF alignment and leading/trailing skip count properties on the element and the preceding element are correct.
Back to top
View user's profile Send private message
LearnMQSI
PostPosted: Thu Mar 02, 2006 9:23 pm    Post subject: Reply with quote

Centurion

Joined: 20 Aug 2002
Posts: 137

Hi There,

I'm back with the same issue after struggled for a week. Whats happening is:

1. I have imported a Cobol Copybook with fields COMP AND COMP-3
2. I have set these fields as follows:
Physical Type - Integer
Length Count:
For PIC S9(9) COMP. = 4
PIC S9(4) COMP. = 2
Length Units - Bytes
Signed - Yes
Sign Orientation - N/A
Byte Alignment - 1 Byte
String Justification - N/A
Padding Character - Empty (N/A)
Skip Count - 0
Ecoding Null - NULLLogicValue
Encoding Null Value - 0

I'm trying to do a MRM to XML. For a Integer 4 length field, I have input a value of 123456789 which should be accepted but it is not accepting it and saying input data is too long.

I will be highly appreciated if somebody can shed some light on it. In fact, if I can get some examples would be wonderful.

NOTE: I have some COMP-3 fields as follows:

What would be my physical type for the following fields:

1. PIC S999V9999 COMP-3
2. PIC S9(3)V9(2) USAGE COMP-3.

MOST IMPORTANT QUESTION:
Request XML receiving from Web App into WMQI2.1 CSD6
Converting XML-to-MRM and pushing to MainFrame

MainFrame Cobol Application receive this request, process and Reply to WMQI2.1, WMQI2.1 receive it, convert it MRM-to-XML and push to Web Application.

Question - Should I set Encoding and/or CCSID when I receive messages from either ends and set it properly based on its destination platform in my message flow?

If so, how do I do that? Can I use MQInput Node CCSID and Encoding properties in Advance tab or in my computer node? and how?

I will be highly thankful to any idea on this issue.

Thanks again.


Fixed length message, its complaining for above setting integer fields. For instance, for a field of integer 4, I input value as 123456789. It should accept this input value since its a integer not a Extended Decimal.
_________________
IBM Certified System Administrator - WebSphere MQ 5.3
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Mar 03, 2006 1:40 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Two things:
- I hope you did not put the string value '123456789' in your input message. This field has a physical type of Integer, so the value should be 0x075BCD15 or 111010110111100110100010101.
- This number is too large for a field defined as PIC S9(4) COMP. See shansons's post, which clearly states that the length of this field is 2 bytes.

Quote:
What would be my physical type for the following fields:

1. PIC S999V9999 COMP-3
2. PIC S9(3)V9(2) USAGE COMP-3.

Either read the manuals, or construct a COBOL copybook containing those definitions and import it.
Back to top
View user's profile Send private message
LearnMQSI
PostPosted: Sat Mar 04, 2006 6:45 pm    Post subject: Reply with quote

Centurion

Joined: 20 Aug 2002
Posts: 137

Hi Kimbert,

You are right, but the input value is coming from an xml file so I the value I guess actually coming in as string value '123456789'.

I have another question, for PIC S999V9999 COMP-3 fielt, I have physical type as Integer 4 but WHAT would be its default value if I want to have a default value for this field in my MRM?

I will try to put the value you have suggested in my xml NOT an string value as '123456789'

Again, thank you so much for all your help!!!
_________________
IBM Certified System Administrator - WebSphere MQ 5.3
Back to top
View user's profile Send private message
LearnMQSI
PostPosted: Sat Mar 04, 2006 7:27 pm    Post subject: Reply with quote

Centurion

Joined: 20 Aug 2002
Posts: 137

In fact, I have defined the following and want to see if I did the right way:

For a PIC S999V999 COMP-3 field,
I have set it as follows:
Physical type as FLOAT
Default Value as 0.0

For a PIC s9(3) V9(2) USAGE COMP-3 field,
I have set it as follows:
Physical type as FLOAT
Default Value as 0.0

Is this right? If NOT, what would be???

Thank you again!!!!!!!!!!!!
_________________
IBM Certified System Administrator - WebSphere MQ 5.3
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Mar 05, 2006 4:10 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Think as well about the max values for your fields and their representation:

PIC S9(4) COMP max value = 9999 => 0x270F and clearly only 2 bytes
neg values are calculated as 0x010000 - x so -9999 =>0xD8F1
max and min on 2 bytes signed are -32768 to + 32767 or 0x8000 to 0x7FFF which needs PIC S9(4) COMP restricting further the values as a PIC s9(5) could exceed those max and would need 3 byte representation....

PIC S9(3)v9(2) COMP-3 max value = 999.99 => 0x99999X where X in (C,D,F) 3 bytes (as a rule int((number of digits +1) /2) )
C= pos, D=neg, F=unsigned

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
shanson
PostPosted: Mon Mar 06, 2006 1:27 am    Post subject: Reply with quote

Partisan

Joined: 17 Oct 2003
Posts: 344
Location: IBM Hursley

Please refer to my earlier post, where I quoted a WMB help topic that describes exactly what the COBOL importer creates from PIC definitions.
PIC S9(n) COMP-3 is a packed decimal, not a float (that's COMP-1 and COMP-2).
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Mar 06, 2006 1:32 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

I'm confused about what you're trying to do. In a previous post you said
Quote:
I'm trying to do a MRM to XML

so I thought your input message was a COBOL record, and your output was an XML message. But then you said
Quote:
You are right, but the input value is coming from an xml file

If you want help, please explain
- Exactly what your input message looks like
- Exactly what your output message looks like
Without this information, I can't help you any further.
Back to top
View user's profile Send private message
LearnMQSI
PostPosted: Thu Mar 09, 2006 2:46 pm    Post subject: Reply with quote

Centurion

Joined: 20 Aug 2002
Posts: 137

I'm so sorry for confusing.

Actually, initially I thought I will be doing MRM to XML but my requirements have been changed so now I need to do both MRMtoXML and XMLtoMRM.

Now, my both MRMtoXML and XMLtoMRM working a sort of but I have another issue with my WHILE LOOP in MRMtoXML message flow.

I have to do the following:

LocationSection: (Repeat 100 times)
Map Fields (29 Fields)
Coverage Section: (Repeat 350 times)
Map Fields(20 Fields)
Last Field Repeat 10 times

So, For One Location, Coverage would repeat 350 times, last field in Coverage would repeat 10 times. So I have nested WHILE loop till 3 level

I have my WHILE loop as follows:

DECLARE I INTEGER;
DECLARE J INTEGER;
DECLARE K INTEGER;
DECLARE LOC INTEGER;
DECLARE CVG INTEGER;
DECLARE LASTFLD INTEGER;

SET I = 1;
SET LOC = 100
WHILE I <= LOC DO
MAP ALL FIELDS
SET J = 1;
SET CVG = 350;
WHILE J <= CVG DO
MAP ALL FIELDS BUT THE LAST ONE;
SET K = 1;
LASTFLD = 10;
WHILE K <= LASTFLD DO
MAP LAST FIELD
END WHILE;
SET J = J + 1;
END WHILE;
SET I = I + 1;
END WHILE;

What happening is:
My first WHILE is going good, Second one going good, and even tihrd one going good for the first time around.

When first time LASTFLD repeating 10 times, it is going back to CVG WHILE and this time around CVG repeating all 350 times but not the LAST FIELD repeating at all.

In fact its not even mapping the last field.

Once CVG finish 350 times, it has to go back to LOC second time around and must CVG again for 350 times but not happening. Its just repeating LOC for next 99 times and finishing my loop.

I'm not sure, if I explain it more clearly if this is not clear enough!!!

Am I missing anything here in loop, I would be highly appreciated if somebody can shed some light on this where I'm doing wrong.

Thank you,
_________________
IBM Certified System Administrator - WebSphere MQ 5.3
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2, 3  Next Page 1 of 3

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » PIC S9(4) COMP Fields
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.