A primary or secondary file is only allowed in a cycle module.
30
Cause . . . . . : The RPG Program Cycle is not in effect when a MAIN or NOMAIN keyword is specified on the Control specification, and so primary and secondary files are not allowed. The file is ignored.
Recovery . . . : Change the file type to a full-procedural file, or remove the MAIN or NOMAIN keyword from the Control specification. Compile again.