× 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.



Hello Burkhard,

On Wed, 11 Dec 2002 B.Quindt@ZAPF-BAYREUTH.DE wrote:
>
> thank you for your help, I took the API - Parameter from QSYSINC/QRPGLESRC
> QIMGAPII
>
> I want to Convert a TIFF Streamfile in IFS  to a AFP Streamfile in IFS
>

Okay, so the problem isn't the format of the data structures, but rather
that they're not initialized with proper values.
>
> Here is the Source-Code
>
> CRT-Options -   CRTMOD then CRTPGM with BNDSRVPGM(QSYS/QIMGCIMG)
>

You can't post attachments to the mailing list.   Since you copied me
directly, I received your source code, but the other people on the mailing
list did not.

The error that this program generates is MCH0601.   The text for this
is "Space offset (number) or teraspace offset (number) is outside limit
for object (job name)".

The reason you're getting this error is because you didn't initialize
the 'bytes provided' value in the QUSEC (error code) data structure.
When you don't explicitly intiialize a data structure, the entire
structure gets set to blanks.

Therefore, because the hex value for a blank is x'40', the 'bytes
provided' was set to x'40404040', so the system thought that your
QUSEC structure was 1077952576 bytes long.   When it tried to write
an error message past the 15th byte of the structure (since in reality
it's only 15 bytes long) it signalled the space offset error.

Simply setting QUSBPRV to the number 15 before calling the API
will allow you to get a more useful error message.

Also, you might consider setting QUSBPRV to 0, which will cause the
error to be signalled to your program stack rather than returning it
in a variable in your program.

Another suggestion I'd like to make, just to make the code easier to
read, is that you should use *ALLx'00' instead of variables like
'Q0016' and 'Q0032'.

For example, instead of this:
     C                   MOVE      Q0032         QIMAH
You'd code this:
     C                   eval      QIMAH = *ALLx'00'

There are some other issues with you code, such as a 'paper size
conflict', but once you've fixed the QUSBPRV variable, the system will
tell you about the problems, so you can fix them yourself.

Good Luck!




As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.