Q
Problem solve Get help with specific problems with your technologies, process and projects.

Using an INFDS for a report

Instead of using an overflow indicator for a report, I am using an INFDS for page count, line number, and overflow line set up as follows:

 
D PR01DS          DS                  
D  PR01PG               152    153B 0 
D  PR01OF               188    189B 0 
D  PR01LN               367    368B 0 
This does appear to work most of the time, but recently had a failure with a test on PR01LN with "The target for a numeric operation is too small to hold the result". The contents of the dump for PR01DS were:

 
PR01DS                DS                                            
  PR01LN              BIN(4,0)             6448.            '4040'X 
  PR01OF              BIN(4,0)             0060.            '003C'X 
  PR01PG              BIN(4,0)             0066.            '0042'X 

My questions are:

1. When does PR01LN get initialized?
2. Should I need to initialize it?
3. In the Redbook for ILE RPG these fields are defined as unsigned Integers so would it cause a problem when I define them as Binary?


The field PRO1LN gets initialized at the open of the print file which is usually at the start of the program. You do not need to initialize it. My thoughts for the problem are that the number of lines written is surpassing the 9999 count. This would give you the error that field is too small to hold the result. Increase the size of PRO1LN to at least a 6,0B field.

==================================
MORE INFORMATION ON THIS TOPIC
==================================

The Best Web Links: Tips, tutorials and more.

Ask your systems management questions--or help out your peers by answering them--in our live discussion forums.

Read this Search400.com Featured Topic: Managing your iSeries.

Ask the Experts yourself: Our systems management gurus are waiting to answer your technical questions.


This was last published in April 2004

Dig Deeper on Performance

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close