EVE SAWYER
asked on
ERROR RNF0257 :Form-Type entry for main procedure not valid or out of sequence.
Hi,
I'm a beginner in AS-400. I was just trying out this code to understand the concept behind compile time array . However, every time I compile my code I get
ERROR RNF0257 :Form-Type entry for main procedure not valid or out of sequence for the below lines
**CTDARA DARR1
JANUARY;
FEBRUARY;
MARCH;
APRIL;
MAY;
JUNE;
JULY;
AUGUST;
SEPTEMBER;
OCTOBER;
NOVEMBER;
DECEMBER;
The entire code is :
DDARR1 S 10A DIM(6) CTDATA PERRCD(1)
DN S 2P 0 INZ(1)
DMONTH S 10A
C DOW N=6
C EVAL MONTH=DARR1(N)
C MONTH DSPLY
C EVAL N = N+1
C ENDDO
C SETON LR
**CTDARA DARR1
JANUARY;
FEBRUARY;
MARCH;
APRIL;
MAY;
JUNE;
JULY;
AUGUST;
SEPTEMBER;
OCTOBER;
NOVEMBER;
DECEMBER;
I'm a beginner in AS-400. I was just trying out this code to understand the concept behind compile time array . However, every time I compile my code I get
ERROR RNF0257 :Form-Type entry for main procedure not valid or out of sequence for the below lines
**CTDARA DARR1
JANUARY;
FEBRUARY;
MARCH;
APRIL;
MAY;
JUNE;
JULY;
AUGUST;
SEPTEMBER;
OCTOBER;
NOVEMBER;
DECEMBER;
The entire code is :
DDARR1 S 10A DIM(6) CTDATA PERRCD(1)
DN S 2P 0 INZ(1)
DMONTH S 10A
C DOW N=6
C EVAL MONTH=DARR1(N)
C MONTH DSPLY
C EVAL N = N+1
C ENDDO
C SETON LR
**CTDARA DARR1
JANUARY;
FEBRUARY;
MARCH;
APRIL;
MAY;
JUNE;
JULY;
AUGUST;
SEPTEMBER;
OCTOBER;
NOVEMBER;
DECEMBER;
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Corrected code that compiles without error clarifies simple descriptive comments about what caused errors.