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 find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm
No new posts Need Help with : IFTHEN(WHEN=GROUP) Sumanta_89 DFSORT/ICETOOL 1 Wed Apr 19, 2017 5:23 pm
No new posts Group elements using ICETOOL Learncoholic DFSORT/ICETOOL 2 Fri Apr 14, 2017 11:01 am


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