Manual says O specs belong before the first P spec.
http://publib.boulder.ibm.com/infocenter/iseries/v6r1m0/topic/rzasd/sc092508349.htm
put that copy book after the O specs and before your ** CDATA and you will be golden
Mark Murphy
STAR BASE Consulting, Inc.
mmurphy@xxxxxxxxxxxxxxx
-----rpg400-l-bounces@xxxxxxxxxxxx wrote: -----
To: RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
From: "Gary Kuznitz " <docfxit@xxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
Date: 10/05/2010 03:54PM
Subject: Re: Form-Type entry for main procedure not valid or out of sequence.
On 5 Oct 2010 at 15:06, Dennis (Dennis Lovelady <rpg400-l@xxxxxxxxxxxx>) commented
about RE: Form-Type entry for main procedure not valid :
I haven't kept up with the moves, and I'm not sure I'm receiving messages in
the right order anyway. I know that you need to have a space after ** to
define tables.
If you supply the source again, and indicate what's in that copy (all D
specs, or all C specs or whatever) maybe we can help more.
I'd be happy to. This is what I currently have:
H DFTACTGRP(*NO) ACTGRP(*NEW) BNDDIR('QC2LE') BNDDIR('IFSTEXT')
FQPRINT O F 132 PRINTER OFLIND(*INOF) USROPN
D/copy Gary1/QRPGLESRC,IFSIO_H
D/copy Gary1/QRPGLESRC,ERRNO_H
D/copy Gary1/QRPGLESRC,IFSTEXT_H
*
D RetrunCode S 2 DIM(9) ASCEND CTDATA
D ReturnCodeMsg S 71 DIM(9) ALT(ReturnCode)
D dir s *
D Msg S 52A
<snip of other D specs>
<snip of C specs>
0254.00 /DEFINE ERRNO_LOAD_PROCEDURE
0255.00 /COPY Gary1/QRPGLESRC,ERRNO_H
001300+ /if not defined(ERRNO_LOAD_PROCEDURE)
LINES EXCLUDED: 291
030500+ /endif
030600+
030700+ *---------------------------------------------------
030800+ * procedure definitions:
030900+ *---------------------------------------------------
031000+ /if defined(ERRNO_LOAD_PROCEDURE)
031100+ ** Retrieve the C-language "errno" (error number)
Seq <---------------------- Source Specifications -------
Number ....1....+....2....+....3....+....4....+....5....+...
031200+P errno B
031300+D errno PI 10I 0
031400+D p_errno S *
031500+D wwreturn S 10I 0 based(p_errno)
031600+C eval p_errno = @__errno
031700+c return wwreturn
031800+P E
031900+
032000+ ** end program with a (user-defined) escape message
032100+P die B
032200+D die PI 1N
032300+D msg 256A const
032400+
032500+D QMHSNDPM PR ExtPgm('QMHSNDPM')
032600+D MessageID 7A Const
032700+D QualMsgF 20A Const
032800+D MsgData 256A Const
032900+D MsgDtaLen 10I 0 Const
033000+D MsgType 10A Const
033100+D CallStkEnt 10A Const
033200+D CallStkCnt 10I 0 Const
033300+D MessageKey 4A
033400+D ErrorCode 1A
033500+
033600+D dsEC DS
033700+D dsECBytesP 1 4I 0 inz(%size(dsEC))
033800+D dsECBytesA 5 8I 0 inz(0)
033900+D dsECMsgID 9 15
034000+D dsECReserv 16 16
034100+D dsECMsgDta 17 256
034200+
034300+D MsgLen S 10I 0
034400+D TheKey S 4A
034500+
034700+c if MsgLen<1
034800+c |return *off
034900+c endif
035000+
035100+c callp QMHSNDPM('CPF9897': 'QCPFMSG *LIBL':
035200+c Msg: MsgLen: '*ESCAPE':
035300+c '*': 3: TheKey: dsEC)
035400+
035500+c return *off
035600+P E
035700+
035800+
035900+ ** End program with an escape message that corresponds to
036000+ ** the value of "errno" above.
036100+P EscErrno B
036200+D EscErrno PI 1N
036300+D errnum 10i 0 value
036400+
036500+D QMHSNDPM PR ExtPgm('QMHSNDPM')
036600+D MessageID 7A Const
036700+D QualMsgF 20A Const
036800+D MsgData 1A Const
036900+D MsgDtaLen 10I 0 Const
037000+D MsgType 10A Const
037100+D CallStkEnt 10A Const
037200+D CallStkCnt 10I 0 Const
037300+D MessageKey 4A
037400+D ErrorCode 1A
037500+
037600+D dsEC DS
037700+D dsECBytesP 1 4I 0 inz(%size(dsEC))
037800+D dsECBytesA 5 8I 0 inz(0)
037900+D dsECMsgID 9 15
038000+D dsECReserv 16 16
038100+D dsECMsgDta 17 256
038200+
038300+D TheKey S 4A
038400+D MsgID S 7A
038600+c move errnum MsgID
038700+c movel 'CPE' MsgID
038800+
038900+c callp QMHSNDPM(MsgID: 'QCPFMSG *LIBL':
039000+c ' ': 0: '*ESCAPE':
039100+c '*': 3: TheKey: dsEC)
039200+
039300+c return *off
039400+P E
039500+ /endif
039600+
039700+ /define ERRNO_H
025600 *---------------------------------------------------------
First line of O specs followes
025700 OQPRINT E OF HEADER 1 01
======>a
*RNF0258 30 a 025700 Form-Type entry is not valid for subprocedures, or is out
of sequence.
<snip of O specs>
0280.00 O E 22 PRINTERR 2
There is a space between ** and CTDATA
0281.00 ** CTDATA List of Address Verification Return Code Values
0282.00 10Invalid address
0283.00 11Invalid Zip Code
<snip of remainder of table>
Does anyone have any idea what might be out of sequence?
v4r4
Thanks,
Gary
Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
The difference between genius and stupidity is that genius has its limits.
-- Albert Einstein
-----Original Message-----
I inserted a space after ** to initiate your CTDATA specs.
I'm still getting the error. Now after the O specs.
Thanks,
Gary
On 5 Oct 2010 at 13:41, Dennis (Dennis Lovelady <rpg400-l@xxxxxxxxxxxx>)
commented
about RE: Form-Type entry for main procedure not valid :
You need a space after ** to initiate your CTDATA specs.
Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
I bought my brother some gift-wrap for Christmas. I took it to the
Gift
Wrap department and told them to wrap it, but in a different print so
he
would know when to stop unwrapping.
I'm getting an error during the compile. The error is below after
the
first line of a
compile time table.
H DFTACTGRP(*NO) ACTGRP(*NEW) BNDDIR('QC2LE') BNDDIR('IFSTEXT')
FQPRINT O F 132 PRINTER OFLIND(*INOF) USROPN
D/copy Gary1/QRPGLESRC,IFSIO_H
D/copy Gary1/QRPGLESRC,ERRNO_H
D/copy Gary1/QRPGLESRC,IFSTEXT_H
*
D RetrunCode S 2 DIM(9) ASCEND CTDATA
D ReturnCodeMsg S 71 DIM(9) ALT(ReturnCode)
D dir s *
D Msg S 52A
<snip of other D specs>
<snip of C specs>
<snip of O specs>
0280.00 O E 22 PRINTERR 2
0281.00 **CTDATA List of Address Verification Return Code Values
*RNF0257 30 a 028100 Form-Type entry for main procedure not
valid
or out of
sequence.
0282.00 10Invalid address
0283.00 11Invalid Zip Code
<snip of remainder of table>
0291.00
0292.00 /DEFINE ERRNO_LOAD_PROCEDURE
0293.00 /COPY Gary1/QRPGLESRC,ERRNO_H
Does anyone have any idea what might be out of sequence?
v4r4
Thanks,
Gary
As an Amazon Associate we earn from qualifying purchases.