Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Packed decimal and redefines at group

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
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    Post subject: Packed decimal and redefines at group
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    Post subject: Re: Packed decimal and redefines at group
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: 3158
Location: Tucson AZ

PostPosted: Mon Jan 29, 2007 7:20 pm    Post subject: Re: Packed decimal and redefines at group
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

Site Director


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

PostPosted: Mon Jan 29, 2007 9:28 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Tue Jan 30, 2007 8:36 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Sorting group data rajella DFSORT/ICETOOL 4 Sun Jan 22, 2017 11:32 pm
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm
No new posts Get Record count in summary record fo... Atul Banke DFSORT/ICETOOL 21 Fri Sep 23, 2016 4:17 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us