please note this is a task for school
I'm trying to create a CL Program and this is the breakdown of the requirements I've gathered:
a menu with options will pop up
- Enter CIF data
- Edit CIF data
- Exit
When a user selects an option a message will appear stating an action has been taken, example: "CIF Data Entry Program is now executing"
I'm very new to CL programming, and I've attempted various things, and keep coming across the error CPF0001 (Application Error) unmonitored by CIFCL99 (my cl program) at statement 000000050, I have no idea what that means, I've looked it up and got even more confused.
Here is a screen shot of my CL program, I know that SNDPGMMSG
doesn't do anything as I'm pretty sure I need to set conditions for that message to pop up. But I can't even get the DFU program to launch. I don't even know if my syntax is wrong, I'm not declaring any variables, so I wouldn't need to right? I've looked at dozens of examples and tried to make something of it.
here is the structure of the library. Inside QCLSRC is the source code for the CLLE program CIFCL99, and inside of QDDSSRC is the source code for CIFFILE and CIFFILE1
thank you for your time.
FYI: Screen shots are not only overkill, they also prevent copying source statements from text version of the description into the text-based 5250 screen, or for use of copy\paste into a followup reply, and prevent searching on the potentially relevant text to find a similar issue; a total PITA IMO.
Anyhow, the problem seems likely to be that the file specified on the Change Data (CHGDTA) is not the expected file type; the file named CIF is presumably the Device File [attribute DFU] instead of a Database File which is either of the files: CIFFILE [attribute PF-DTA] or CIFFILE1 [attribute LF-DTA; though PDM omits the *DTA, as if an LF can not have *SRC attribute, but they apparently did not know any better ;-)
As for the msg CPF0001, the origin is easily determined. When that message appears, press F1=Help [with the cursor positioned on the message text "Error found on &1 command." and then press F10=Display Messages In Job Log to see what was the preceding error messages in the joblog. For the message(s) that appear after the request [i.e. the CALL invocation] and before the "Error found...", again press F1=Help on each, and read the Problem and Cause text. [edit] correction to name the CALL statement command as the problem identified by the error on statement 50 which almost surely corresponds to line 00005.00, and would be visible in the compiler listing produced by the CRTCLPGM [or CRTBNDCL].[/edit]