Page 1 of 1

Opening an existing project on a new laptop

Posted: Mon Sep 04, 2017 11:51 am
by Kingston
I have recently changed my laptop and I am trying to work on an existing LANSA project but when I open the webpage, it's full of red errors because it can't find any of the fields, files, reusable parts etc that were created for it.

I have tried refreshing the Master Objects list but that doesn't fix the problem. All the objects show grey in my local repository. I have to identify every object in the error messages and then Check them out Read Only. Even then it only fixes some of the error messages; checking out a field gets rid of the "Field Type Unknown is not supported by the Web" and "Component <fieldname> is remotely located. It needs to be checked out..." error messages but leaves behind the "<fieldname> is an abstract class and cannot be used..." and "Component <fieldname" is restricted and cannot be used..." error messages.

I was just wondering if there was something wrong somewhere. I would have thought that refreshing the Master Objects would bring everything from the Master Repository down to my Local Repository and that would be enough for a webpage opened in my IDE to find all the objects it needed.

When I do a Check Out Read Only, am I bringing it down from the Master to the Local but not locking it? Is Refresh different from Check Out Read Only.

Re: Opening an existing project on a new laptop

Posted: Mon Sep 04, 2017 1:21 pm
by MarkDale
There are many options in this area. So I'll try and keep to the basics.

The refresh repository only lets your PC know what objects are available centrally (on the IBMi)

So you do need to check everything out (read_only) that your project is going to refer to. Probably you would check everything out read_only, so that you have a common baseline with any other developers that use that repository. You probably want your versions of fields, files, multilingual texts to be the same as their's. Anything you want to modify, you check out (not read_only).

You can also set up the IBMi so that the changes that one developer makes and checks in get propagated to all the other PCs in a group.

There is also a useful Quick Export tool, in the IDE. You can drag and drop your project's components into the quickexport window, and then select them in the Quickexport window and there is a button to add all the objects that they reference. You can export to a zip, move it to your new laptop, unzip it, and import into the IDE.

Note: Your remaining errors might be caused by your component defining fields that are already defined in the data dictionary.

Re: Opening an existing project on a new laptop

Posted: Mon Sep 04, 2017 2:37 pm
by Kingston
Thanks.

The Quick Export option sounds vaguely familiar. I may have been told about this before. I'll give it a go.

Re: Opening an existing project on a new laptop

Posted: Tue Sep 05, 2017 5:09 pm
by Kingston
Export and Import worked pretty well. There were a few fields missed for some reason.

I had to build the Export list repeatedly, selecting everything and asking for the Cross References over and over again until every object that linked to every other object was finally loaded. (ie when I did it the first time, it only grabbed those objects referenced by my Webpage, it didn't grab the objects referenced by the objects referenced by the Webpage)

When you're working as part of a team, I think there is a way to have new objects they have created come trickling down into your repository automatically. Is that correct? How do I switch that on?

Re: Opening an existing project on a new laptop

Posted: Wed Sep 06, 2017 9:04 am
by MarkDale
There's a section in the guide about the concepts that you should read through

http://docs.lansa.com/14/en/lansa011/co ... 4_0080.htm

At a practical level,

You need task tracking active.

You maintain repository groups and work groups by signing on to a 5250 terminal as a lansa partition security officer (or similar) and from from a command line

<<your lansa pgm lib>>/lansa request(pcmaint) partition(PPP)

F16 --> Repository groups
F18 --> Work groups

(These may have already been set up)
You need a repository group for each PC that is going to share changes, where the PC is the gateway PC for the repository group.

You normally create one work group containing all the PCs that are going to share changes.

When its all set up, if your PC is connected to the host monitor, it will check every 10 minutes or so and download any changes that other developers in the work group have checked in.

Re: Opening an existing project on a new laptop

Posted: Wed Sep 06, 2017 9:45 am
by Kingston
Thanks, that was perfect. My new laptop was not added to a repository group or to the Workgroup. I've set them up now.

I'll read that link.