CPF4101

Use this board for starting discussions, asking questions, and giving advice on RPG programming for the IBM i platform (and predecessors.)
jgreen
New User
Posts: 4
Joined: Thu Aug 05, 2010 8:16 am
First Name: John
Last Name: Green
Company Name: Auction Software
Phone: 931-680-7427
Address 1: 221 Highland Circle
City: Shelbyville
State / Province: Tennessee
Zip / Postal Code: 37160
Country: United States
Contact:

CPF4101

Post 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.
User avatar
Rob
Profound Logic Staff Member
Posts: 135
Joined: Fri Jan 04, 2008 12:12 pm
First Name: Rob
Last Name: Ferguson
Company Name: Profound Logic Software
Contact:

Re: CPF4101

Post 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)
jgreen
New User
Posts: 4
Joined: Thu Aug 05, 2010 8:16 am
First Name: John
Last Name: Green
Company Name: Auction Software
Phone: 931-680-7427
Address 1: 221 Highland Circle
City: Shelbyville
State / Province: Tennessee
Zip / Postal Code: 37160
Country: United States
Contact:

Re: CPF4101

Post 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!
User avatar
Rob
Profound Logic Staff Member
Posts: 135
Joined: Fri Jan 04, 2008 12:12 pm
First Name: Rob
Last Name: Ferguson
Company Name: Profound Logic Software
Contact:

Re: CPF4101

Post 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.
BlueBlood
New User
Posts: 1
Joined: Fri Aug 06, 2010 2:42 pm
First Name: Jeff
Last Name: Schager
Company Name: Peterson Manufacturing
Phone: 816-765-2000
City: Grandview
State / Province: Missouri
Zip / Postal Code: 64030
Country: United States
Contact:

Re: CPF4101

Post 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?
User avatar
David
Profound Logic Staff Member
Posts: 690
Joined: Fri Jan 04, 2008 12:11 pm
First Name: David
Last Name: Russo
Company Name: Profound Logic Software
Contact:

Re: CPF4101

Post 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.
aden045
New User
Posts: 1
Joined: Fri Mar 08, 2013 6:28 am
First Name: Aden
Last Name: Miller
Company Name: Pasban
City: Faisalabad
State / Province: Outside Canada/USA
Zip / Postal Code: 38000
Country: Pakistan
Contact:

Re: CPF4101

Post 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? ??
GuL
User avatar
David
Profound Logic Staff Member
Posts: 690
Joined: Fri Jan 04, 2008 12:11 pm
First Name: David
Last Name: Russo
Company Name: Profound Logic Software
Contact:

Re: CPF4101

Post 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
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests