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

Packed decimal and redefines at group


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

New User


Joined: 03 Dec 2006
Posts: 8
Location: Mumbai

PostPosted: Mon Jan 29, 2007 7:08 pm
Reply with quote

Hi all,

I have the following declaration

01 gorup-name.
.
.
.

05 A 9(14) comp-3
05 A-re redefines A.
10 AA 9(10) comp-3.
.
.
.
and following code
move some-group to group-name

IF A is not numeric
move zero to a.
if aa not = zero
continue
else
move aa to bb
end-if

I have checked with input file.In each case I am getting zero value for AA.Please let me know if there is any problem with the code
Back to top
View user's profile Send private message
santosh_dorge

New User


Joined: 03 Dec 2006
Posts: 8
Location: Mumbai

PostPosted: Mon Jan 29, 2007 7:11 pm
Reply with quote

santosh_dorge wrote:
Hi all,

I have the following declaration

01 gorup-name.
.
.
.

05 A 9(14) comp-3
05 A-re redefines A.
10 AA 9(10) comp-3.
.
.
.
and following code
move some-group to group-name

IF A is not numeric
move zero to a.
if aa = zero
continue
else
move aa to bb
end-if

I have checked with input file.In each case I am getting zero value for AA.Please let me know if there is any problem with the code
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon Jan 29, 2007 7:20 pm
Reply with quote

santosh_dorge wrote:
Code:
01 gorup-name.
.
05 A     9(14)   comp-3
05 A-re redefines A.
    10 AA        9(10)   comp-3.
.
and following code
move some-group to group-name

IF A is not numeric
move zero to a.
if aa not = zero
continue
else
move aa to bb
end-if
I have checked with input file.In each case I am getting zero value for AA.Please let me know if there is any problem with the code
There could be,why are you redefining to a different length?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Jan 29, 2007 9:28 pm
Reply with quote

Hello,

Please post some of your input data in hex (in Browse , turn HEX ON, then cut/past a few entries into your reply post).

Also, while it is possible to define comp-3 fields as you have, they should be defined with an odd number of digits. Your "9(14) comp-3" field will take 8 bytes not 7. Whether you allow for it or not, the system needs 1/2 byte for the sign in a pcaked decimal field.

My guess is that the code ALWAYS detects "not numeric". When you post some hex data, we will be able to see if that is the case.
Back to top
View user's profile Send private message
Santoshdorge

New User


Joined: 27 Jun 2006
Posts: 48
Location: Pune

PostPosted: Tue Jan 30, 2007 9:54 am
Reply with quote

Here is hex data

for A
00076271
0009920F

and for AA
000762
000992
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Jan 30, 2007 8:36 pm
Reply with quote

Hello,

Change A to 9(15) comp-3.

The redefines will not work as you've "cut off" the least significant digits including the sign. The value that is left is pretty much useless. It is not a usable binary number and it is not a comp-3 number.

What is the goal of the shorter redefine? The content of AA will not contain any useful value. If the A field contains dollars and cents, the redefines cuts off the single dollars and all of the cents (7.01).

Your initial post says that you get zero in AA, but your actual data is not zeros?

To sum up, i'd suggest changing the definition of A and posting why the short redefine. Then we will be able to help more.

If you change A and get around the zeros, you may get an 0c7 later, but we can work thru that as well.
Back to top
View user's profile Send private message
Santoshdorge

New User


Joined: 27 Jun 2006
Posts: 48
Location: Pune

PostPosted: Wed Jan 31, 2007 9:04 am
Reply with quote

Thanks Dick.
My problem got solved.
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 Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts PD not working for unsigned packed JO... DFSORT/ICETOOL 5
No new posts Def PD not working for unsigned packe... JCL & VSAM 3
No new posts Need Help with Packed Decimal Signs DFSORT/ICETOOL 4
No new posts Compare latest 2 rows of a table usin... DB2 1
Search our Forums:

Back to Top