Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Initializing Comp-3 variable

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
Deepthy Jose P

New User


Joined: 07 Mar 2007
Posts: 40
Location: India

PostPosted: Wed Jul 02, 2008 6:27 am    Post subject: Initializing Comp-3 variable
Reply with quote

I am facing a problem when i try to initialize a PS variable with Zero

I have these two fields defined in my output file.

O-XXXX-RATE +654 6 P 7
O-XXXX-FEE +660 8 P 2
When i try to initialize

O-XXXX-RATE = 0
O-XXXX-FEE = 0

I am getting invalid value in the field in the output file.
How can i initialize the numerics field?
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: Wed Jul 02, 2008 6:36 am    Post subject:
Reply with quote

Hello,

Quote:
I am getting invalid value in the field in the output file.
What value is in the output file?

As an experiment, please try
MOVE 0 to O-XXXX-RATE
and post back with what happens.
Back to top
View user's profile Send private message
Deepthy Jose P

New User


Joined: 07 Mar 2007
Posts: 40
Location: India

PostPosted: Wed Jul 02, 2008 6:42 am    Post subject:
Reply with quote

I tried MOVE 0 to O-XXXX-RATE too but
i am getting the same X'4040404040F0' in the output field
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Wed Jul 02, 2008 6:57 am    Post subject:
Reply with quote

Is your output defined as a file or a report?
Back to top
View user's profile Send private message
Deepthy Jose P

New User


Joined: 07 Mar 2007
Posts: 40
Location: India

PostPosted: Wed Jul 02, 2008 7:02 am    Post subject:
Reply with quote

My output is defined as a File.
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: Wed Jul 02, 2008 8:07 am    Post subject:
Reply with quote

Hello,

Please define a new file that has a 10-byte character field and an 8 p 2 field. Initialize the character field to 10 "A"s and the packed-decimal field to zeros and write a record.

Post what is in that record.

It may be possible that the larger record is getting the zeros overlaid with spaces by some other part of the code.

If the simple 2-field test fails, we can work on that - if it works, then it will take a bit of digging into the bigger file/code.
Back to top
View user's profile Send private message
lcmontanez

New User


Joined: 19 Jun 2007
Posts: 50
Location: Chicago

PostPosted: Wed Jul 02, 2008 7:20 pm    Post subject:
Reply with quote

do you have a redefined field that is alpha and overlaying the position/field. Are both fields invalid or just one?

Please post your complete file definition.
Back to top
View user's profile Send private message
Deepthy Jose P

New User


Joined: 07 Mar 2007
Posts: 40
Location: India

PostPosted: Wed Jul 02, 2008 8:22 pm    Post subject:
Reply with quote

Hi


Yes i found the mistake it was a problem with the code. I was using an old version of the copybook and the Packed decimal field was overlaid with Spaces.

Thanks for the helping hand....
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: Thu Jul 03, 2008 12:27 am    Post subject: Reply to: Initializing Comp-3 variable
Reply with quote

You're welcome - thanks for posting that it is now working icon_smile.gif

d
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 Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Move from Comp3 variable to Edited Va... sreekusr COBOL Programming 8 Thu Aug 10, 2017 4:20 pm
No new posts Can I traverse a STEM variable? chong.zhou CLIST & REXX 5 Wed May 31, 2017 3:54 pm
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us