×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




I'll take your word for it, but the code in question was not free-form.

I have not seen need/advantage for using those directives while in free
form. (For SQL, I drop the slash and end with semicolon, which is cleaner
still, IMO.)

Exec SQL Drop Table work_temp ;
Exec SQL Fetch myCursor into :recStruct ;

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
You can't have everything. Where would you put it?


In /Free form calcs a /Include, /Copy, and /Exec Sql (Free form sql)
can be in any position from 7 to (what ever length will allow the full
compiler directive to be entered). I don't know if this holds true for
any other compiler directives but I use it all the time. Source looks
much cleaner when the compiler directives are indented with the code.

Duane Christen


--


Duane Christen
Senior Software Engineer
(319) 790-7162
Duane.Christen@xxxxxxxxxx

Visit PAETEC.COM


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-
bounces@xxxxxxxxxxxx] On Behalf Of Dennis Lovelady
Sent: Tuesday, October 05, 2010 3:49 PM
To: 'RPG programming on the IBM i / System i'
Subject: RE: Form-Type entry for main procedure not valid or out of
sequence.

Well, without analyzing details I can say that if you have represented
alignment of your source, that is a big part of the problem. The slash
(/) from any compiler directive should be in column 7.

After my commute, I can have a clearer look if you haven't resolved yet.

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
I bought some powdered water, but I don't know what to add to it.
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-
bounces@xxxxxxxxxxxx] On Behalf Of Gary Kuznitz
Sent: Tuesday, October 05, 2010 3:55 PM
To: RPG programming on the IBM i / System i
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

--
This is the RPG programming on the IBM i / System i (RPG400-L)
mailing
list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/rpg400-l.


--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.

--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



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