Page 1 of 1
CPF4101
Posted: Thu Aug 05, 2010 8:25 am
by jgreen
I am using the getting started guide and going thru the step by step for program CUSTINQR. I have a clean compile on CUSTINQR but I cannot get past a CPF4101 error when I execute as follows:
Error message CPF4101 appeared during OPEN for file CUSTMASTP
I have copied the custmastp file to my user library and set the library list in the visual designer and on the ibm i I set my sysval to include my user library in the list. I am not sure why the file is not found. What am I doing incorrectly? Thanks.
Re: CPF4101
Posted: Thu Aug 05, 2010 10:38 am
by Rob
Are you setting the library list at runtime? The library list in the designer only applies at compile time.
Your initial program that you are calling should ideally be a CL program that sets the library list and then calls your RPG program which uses a rich display file. Have a look at PUISAMPLES/QCLSRC,MENU001C for an example.
MENU001C (or your CL) then needs to be entered as an initial program in the designer under Launch --> Maintain Initial Program (used when you Launch a session) or Launch --> Maintain Anonymous Programs (Used when you Launch an Anonymous Program)
Re: CPF4101
Posted: Thu Aug 05, 2010 11:20 am
by jgreen
I created and called a C/L proram instead of the rpg program CUSTINQR and it worked properly. Does this imply that a C/L is required for all programs?
THANKS!
Re: CPF4101
Posted: Fri Aug 06, 2010 3:11 pm
by Rob
In a production environment, there would be one CL that sets the library list and then calls the first RPG program which would be the starting menu. The user would then navigate through the menus as required.
At the moment, while you are testing the product you could create a CL for each program you write, or alternatively write a simple menu program and add a menu item for each test program you write. See RPG program PUISAMPLES/MENU002R for an example.
Re: CPF4101
Posted: Mon Aug 09, 2010 10:56 am
by BlueBlood
I am having this problem too. Even though the library list is set up correctly, the real issue seems to be an authority/security issue. When these web jobs initiate via the Launch Annonymous Program function, how can the job start in subsystem QHTTPSVR as the actual user instead of user QTMHHTTP?
Re: CPF4101
Posted: Wed Aug 11, 2010 8:58 am
by David
The jobs will not run under the actual user profile when using anonymous sessions. Anonymous sessions are by definition "anonymous", and all sessions run under user profile QTMHHTP1.
This type of session is appropriate only for applications which do not require a sign on (maybe for public view-only type information) or in those cases where authentication is coded into the application itself.
To require sign in and run under a real user profile, you must use the Launch Session option. This presents a panel where you have to sign in using a valid OS/400 profile and password. Once that is done, Profound UI will launch the initial program associated with the user profile. These initial programs are maintained under Maintain Initial Programs under the launch menu in the designer. There is also a "default initial program" setting on that same dialog which will take effect if the user has no initial program record. This allows you to use either 1 generic initial program for all users, or to set up individual users differently.
You'd want to have the initial program probably be a CL which would set up the library list before calling RPG programs. Eventually, the first RPG program it calls should probably be a menu program which can call your other RPG applications.
Re: CPF4101
Posted: Fri Mar 08, 2013 6:29 am
by aden045
I created and called a C/L proram instead of the rpg program CUSTINQR and it worked properly. Does this imply that a C/L is required for all programs? ??
Re: CPF4101
Posted: Fri Mar 08, 2013 10:24 am
by David
The initial library list for a PUI session comes from your QUSRLIBL and QSYSLIBL system values. By default, Profound UI does not do anything else with the library list and leaves it up to you.
However, there is a 'control file' that can be used to have PUI set the library list for you in a couple of different ways:
http://www.profoundlogic.com/docs/displ ... List+Setup