× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I think we need to see a little of your coding to help, Jason. How are you defining your Data Structures? Are they defined internally, within the program - or externally defined?

The following basic example works just fine for me:

DDS:
     A          R AAFORMAT                  SPACEB(1)
     A                                    43'Test of Printer File with D/Str Fo-
     A                                      rmats'
     A                                      SPACEB(1)
     A            CHARFLD       20O       21SPACEB(3)
     A            NUMFLD         9  2     57

RPG IV:
**Free
Dcl-F AAPrtf Printer;

Dcl-DS PrtfDS Extname('AAPRTF':'AAFORMAT':*Output);
End-Ds;

CharFld = 'First Record';
NumFld = 12345.7;

Write AAFormat PrtfDS;
*InLR = *On;
Return;

Getting sight of your code might help us to isolate your problem.
Brian.

On 20/03/2019 18:38, Jason Olson wrote:
So the last few days I've been working on creating a printed report.
Normally I just create spreadsheets and email those, but in this case, they
wanted a printed report emailed as a PDF.

So I created a report like normal, but as I create programs with MAIN
procedures, I needed to create data structures for each record format in
the print file. All of the fields in the print file are reference fields
except a field that will hold a total. That is defined as a 9 byte zoned
field with 2 decimal places. What is strange is when I go to set this field
to a value in my program. If I set it to a value like 0 everything works
normally. However, if I try to move a value into it like from another
field, I get a data decimal error. The only way I was able to get things to
work normally is if I set the field in the data structure to 0 before using
it. I haven't ran into this before, so I figured I would ask the group if
someone had seen this.



Thanks,

Jason E. Olson
IBM i Engineer/Developer
josys36@xxxxxxxxx
480.223.2952


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.