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
 

 

Defining REDEFINES cobol field in EZT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
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    Post subject: Defining REDEFINES cobol field in EZT
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

Site Director


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

PostPosted: Tue Feb 01, 2011 12:31 am    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Tue Feb 01, 2011 1:05 am    Post subject:
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: 2429
Location: Netherlands, Amstelveen

PostPosted: Tue Feb 01, 2011 2:39 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm


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