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
 

 

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 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
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm


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