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

Defining REDEFINES cobol field in EZT


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rgupta71

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Mon Jan 31, 2011 9:30 pm
Reply with quote

Hi All,

I am having a issue while comparing the sum of below fields with hundred.

Cobol definination
PARTICIPATION-PERCENT S99V9999 ZD 211 216 6
PRINT-PERCENT REDEFINES PARTICIPATION-PERCENT
S9(4)V9 ZD 211 215 5

I need to check whether the total of the percent is 100 or not.How should I define this fields in ezt?
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 Feb 01, 2011 12:31 am
Reply with quote

Hello,

Suggest you start over and post what is actually happening and if you want to mention "Cobol definition" post the cobol definitions. The posted "fields" look like neither cobol nor Easytrieve.

What "issue" are youhaving?

Simply said, Easytrive will let you compare a numeric literal of 100 (or some working data field with a value of 100) against some other field that is the sum of the fields you want to use. . .
Back to top
View user's profile Send private message
rgupta71

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Tue Feb 01, 2011 12:40 am
Reply with quote

I copied it from file manager.

THe COBOL definition is
10 PARTICIPATION-PERCENT PIC S99V9999.
10 PRINT-PERCENT
REDEFINES PARTICIPATION-PERCENT
PIC S9(4)V9.

I have to sum this. So, I declared in ezt
WS-TOTAL W 6 N
WS-PER W 6 N -----> above mentioned field

Logic
WS-TOTAL= WS-TOTAL +WS-PER

IF WS-TOTAL NE 100000
PUT OUTFILE.

It is not working.:-(
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 Feb 01, 2011 1:05 am
Reply with quote

Hello,

Quote:
It is not working.:-(
As has been mentioned many, many times - do NOT post "it didn't work". This is a complete waste of time.

The redefinition could cause problems as the fields are not the same length.

The compare is comparing one hundred thousand. . .

The Easytrieve definitions are not the same as the cobol definitions. . .
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Tue Feb 01, 2011 2:39 pm
Reply with quote

Try the following :

Code:

WS-TOTAL W 6 N 2
WS-PER   W 6 N 2
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 -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
Search our Forums:

Back to Top