REGISTER or login:
These are two pretty big subjects.
Look for one at a time.
Do you know SQL???
So you might start with something like this
but when you say you know SQL .. it brings me off topic to this:
Dere’s no guy livin’ dat knows Brooklyn t’roo an’ t’roo, because it’d take a guy a lifetime just to find his way aroun’ duh goddam town.
1. Your data structure isn't spaced correctly but much simplier to use this command to create the structure and bring the field structure in
0001.00 DMYDS E DS extname(FILE1)
But that wouldn't create the error you reported. The open C1 has apparently failed. And that means a problem in the Declare
I would put a dump after the open and then check the dump for SQLCode and SQLState and everything else in that block of labels..your problem will be more apparent if you do that.