|
Hi to all:
I'm trying to do a program to print a PDF file from the IFS in an AFP
printer. I'm using the QIMGCVTI API, and looking at the web you told me and
watching the sample program you sent me I wrote my own code.
But now, when I run it, I get the following message:
"Length specified in parameter 1 not valid. Length 6605268 in parameter 1
not valid. Valid values for this parameter must be between 99 and 101".
I'm debugging the program and I can't find any field with that length. Any
idea about it?
I send the source code attached.
Thanks in advance.
Juan Carlos.
//
// PRTIMG - Imprimir archivo PDF desde IFS
//
// +-----------------------+
// | Parámetros de entrada |
// +-----------------------+
d @Main pr extpgm('PRTIFSPDFR')
d @PInpFile 1024a
d @PInpOutQ 10a
d @PInpOutQLib 10a
d @Main pi
d @IfsFil 1024a
d @OutQueue 10a
d @Library 10a
// +---------------------+
// | Parámetros QIMGVCTI |
// +---------------------+
//
// Estructura de datos de control
//
d @CtlDs ds
d @P1Lng 4b 0 inz(100)
d @P1Fmt 8a inz('IMGC0100')
d @P1Opr 4b 0 inz(0)
d @P1MultPag 32a inz(*allX'00')
d @P1SpcFeedB 4b 0 inz(130)
d @P1StrFeedB 8a inz('IMGF0100')
d @P1Reverse 4b 0 inz(0)
d @P1ColorRed 4b 0 inz(0)
d @P1Resize 4b 0 inz(1)
d @P1Stretch 4b 0 inz(0)
d @P1HorJus 4b 0 inz(0)
d @P1VerJus 4b 0 inz(0)
d @P1KeepColor 4b 0 inz(0)
d @P1KeepQual 4b 0 inz(0)
d @P1CancErr 4b 0 inz(0)
d @P1SecLvl 4b 0 inz(30)
//
// Estructura de datos de entrada
//
d @InpImgDs ds
d @P2Lng 4b 0
d @P2Fmt 8a inz('IMGI0100')
d @P2Reserved 20a inz(*allX'00')
d @P2DataFmt 4b 0 inz(25)
d @P2PhotoInt 4b 0 inz(0)
d @P2ResUnit 4b 0 inz(0)
d @P2HorRes 4b 0 inz(0)
d @P2VerRes 4b 0 inz(0)
d @P2InObTp 4b 0 inz(0)
d @P2OffInNm 4b 0 inz(68)
d @P2LenInNm 4b 0
d @P2Reserve2 4s 0 inz(0)
d @P2InpObjNam 1024a
//
// Entrada desde almacenamiento principal
//
d @MainStgInp s 4a inz(*allX'00')
//
// Estructura de datos de salida
//
d @OutImgDs ds
d @P3Lng 4b 0 inz(200)
d @P3Fmt 8a inz('IMGO0200')
d @P3DstImgCfg 10a inz('*DEV')
d @P3Reserved 10a inz(*allX'00')
d @P3DatStmFmt 4b 0 inz(20)
d @P3PhotoInt 4b 0 inz(0)
d @P3ResUnit 4b 0 inz(0)
d @P3HorRes 4b 0 inz(0)
d @P3VerRes 4b 0 inz(0)
d @P3SizUnit 4b 0 inz(0)
d @P3HorSiz 15p 5 inz(0)
d @P3VerSiz 15p 5 inz(0)
d @P3CmpTyp 4b 0 inz(0)
d @P3CmpQty 4b 0 inz(0)
d @P3BitSam 4b 0 inz(0)
d @P3PapSiz 4b 0 inz(26)
d @P3PapSizUn 4b 0 inz(0)
d @P3HorPapSiz 15p 5 inz(0)
d @P3VerPapSiz 15p 5 inz(0)
d @P3PapOrt 4b 0 inz(0)
d @P3LeftBdr 4b 0 inz(-1)
d @P3RightBdr 4b 0 inz(-1)
d @P3TopBdr 4b 0 inz(-1)
d @P3BotBdr 4b 0 inz(-1)
d @P3OutDev 10a inz('*JOB')
d @P3OutQ 10a
d @P3OutQLib 10a
d @P3Prtf 10a inz('QSYSPRT')
d @P3PrtfLib 10a inz('QSYS')
d @P3UsrDta 10a inz('PRTPDF')
d @P3Copies 4p 0 inz(0)
d @P3Save 4p 0 inz(0)
d @P3RqFeedB 4p 0 inz(0)
//
d @MainStgOut ds
d @P4Lng 4b 0 inz(132)
d @P4Fmt 8a inz('IMGO0300')
d @P4ico 10a inz(*blank)
d @P4icol 10a inz(*blank)
d @P4Dsf 4b 0 inz(0)
d @P4pi 4b 0 inz(0)
d @P4ru 4b 0 inz(0)
d @P4hres 4b 0 inz(0)
d @P4vres 4b 0 inz(0)
d @P4su 4B 0 inz(0)
d @P4hsiz 15P 5 inz(0)
d @P4vsiz 15P 5 inz(0)
d @P4ct 4B 0 inz(0)
d @P4cq 4B 0 inz(0)
d @P4bs 4B 0 inz(0)
d @P4ps 4B 0 inz(26)
d @P4upsu 4B 0 inz(0)
d @P4hups 15P 5 inz(0)
d @P4vups 15P 5 inz(0)
d @P4po 4B 0 inz(0)
d @P4lb 4B 0 inz(0)
d @P4rb 4B 0 inz(0)
d @P4tb 4B 0 inz(0)
d @P4bb 4B 0 inz(0)
d @P4sp 4B 0 inz(2048)
//
d @FeedBackDs ds
d @P5Multip 32a inz(*blank)
d @P5Splf 10a inz(*blank)
d @P5Job 10a inz(*blank)
d @P5User 10a inz(*blank)
d @P5JNbr 6a inz(*blank)
d @P5SplfN 4b 0 inz(0)
d @P5JobId 16a inz(*blank)
d @P5SplfId 16a inz(*blank)
d @P5OutLng 4b 0 inz(0)
d @P5JSystem 8a inz(*blank)
d @P5SplfDat 7a inz(*blank)
d @P5Reserved 1a inz(*blank)
d @P5SplfTim 6a inz(*blank)
d @ErrCode ds
d @P6ByPrv 9B 0 Inz(272)
d @P6ByAva 9B 0 Inz(0)
d @P6MsgID 7 Inz(*blank)
d @P6Reser 1 Inz(*blank)
d @P6MsgDta 256 Inz(*blank)
//
// +------------------+
// | Llamada QIMGVCTI |
// +------------------+
d @PrtFile pr extpgm('QIMGCVTI')
d @POutCtl like(@CtlDs)
d @POutInImg like(@InpImgDs)
d @POutMStgI like(@MainStgInp)
d @POutOuImg like(@OutImgDs)
d @POutMStgO like(@MainStgOut)
d @POutFeedB like(@FeedBackDs)
d @POutErrC 272 options(*nopass)
//
/free
@P2InpObjNam=%trim(@IfsFil);
@P2LenInNm=%len(%trim(@IfsFil));
@P2Lng=68+%len(%trim(@IfsFil));
@P3OutQ=@OutQueue;
@P3OutQLib=@Library;
callp @PrtFile (@CtlDs:
@InpImgDs:
@MainStgInp:
@OutImgDs:
@MainStgOut:
@FeedBackDs:
@ErrCode);
*inlr=*on;
return;
/end-free
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.