A simple tutorial
A simple tutorial
Can someone please point me to a simple tutorial that shows you how to import a file from the iSeries, create a Server Module to read one record from that file using a key (the file has a logical) and a webpage to display that data?
I thought I knew what I was doing but Executing the webpage on the iSeries just gives me an error in the Server Module and I think it's because I don't know how to properly use files from the iSeries. I might have screwed up the import or something. Also the file won't Check In but I'm not sure it's supposed to since the Physical file is already on the iSeries.
It's been a few months since I worked with LANSA and I think I've screwed something up somewhere.
I thought I knew what I was doing but Executing the webpage on the iSeries just gives me an error in the Server Module and I think it's because I don't know how to properly use files from the iSeries. I might have screwed up the import or something. Also the file won't Check In but I'm not sure it's supposed to since the Physical file is already on the iSeries.
It's been a few months since I worked with LANSA and I think I've screwed something up somewhere.
Re: A simple tutorial
Don't think an pure "iSeries" tutorial exists. If however you can post the errors we can try to help figure out what is going on.
There are a few things that can go wrong, below are a couple things to look for.
If you are importing an existing File from the iSeries via the "Load Other File" command, LANSA is just getting the File definition and creating the fields. Make sure you are checking in the Fields as well! When an "Other" File is checked in, only the OAM should be getting generated. LANSA should not be doing anything to the physical File. Its hard to find some documentation on this, but some conversations here on the forums discusses the issue. Here is a recent one: viewtopic.php?f=3&t=1630
If you are getting an error in the Server Module and the File has not been checked in correctly, its may be because the OAM cannot be found. The OAM gets generated when the File compiles. Once you get the File checked in and the OAM is built, the OAM may still not be found. In this case you need to check where the OAM is being put, its either in the File Library or the Partition Library. If its in the File Library, then you may have to add that Library to the JOBD running the web jobs.
Again, post the errors and we can try to help.
Joe
There are a few things that can go wrong, below are a couple things to look for.
If you are importing an existing File from the iSeries via the "Load Other File" command, LANSA is just getting the File definition and creating the fields. Make sure you are checking in the Fields as well! When an "Other" File is checked in, only the OAM should be getting generated. LANSA should not be doing anything to the physical File. Its hard to find some documentation on this, but some conversations here on the forums discusses the issue. Here is a recent one: viewtopic.php?f=3&t=1630
If you are getting an error in the Server Module and the File has not been checked in correctly, its may be because the OAM cannot be found. The OAM gets generated when the File compiles. Once you get the File checked in and the OAM is built, the OAM may still not be found. In this case you need to check where the OAM is being put, its either in the File Library or the Partition Library. If its in the File Library, then you may have to add that Library to the JOBD running the web jobs.
Again, post the errors and we can try to help.
Joe
Re: A simple tutorial
I think you're right. I think I need to check in the fields. I knew there was a step where I select all the fields to go with the File but I couldn't remember where it was. I'm trying to do that now but it doesn't seem to work. I thought the process was:
1 Hit the Check in button (Check in Options windows pops up)
2. Select the file
3. Click on the References button
4. Select all the fields
5. Click the green plus button to add all those fields to the Check In
But when I select all the fields and click the green plus button, nothing happens. They don't get a tick in the "Allow Check-In" column, nor are they shown shown listed with the file. So I think for some reason the fields are failing to check in when I check the file in and that's the cause of the Server Module crashing when I run it. (You'd think they could give a good error message like "Field definitions not found" or something rather than:
Fatal Error:
Error executing KREWARE_1.FINDSUP171L1: User information provided is not valid.
Reported By:
http://<server>:<port>/<pgmlib>/lansa_14_1_31_0/lansa_wrtn.js, line 6:499
1 Hit the Check in button (Check in Options windows pops up)
2. Select the file
3. Click on the References button
4. Select all the fields
5. Click the green plus button to add all those fields to the Check In
But when I select all the fields and click the green plus button, nothing happens. They don't get a tick in the "Allow Check-In" column, nor are they shown shown listed with the file. So I think for some reason the fields are failing to check in when I check the file in and that's the cause of the Server Module crashing when I run it. (You'd think they could give a good error message like "Field definitions not found" or something rather than:
Fatal Error:
Error executing KREWARE_1.FINDSUP171L1: User information provided is not valid.
Reported By:
http://<server>:<port>/<pgmlib>/lansa_14_1_31_0/lansa_wrtn.js, line 6:499
Re: A simple tutorial
You can click on files in the repository tab, expand the file, and then ctrl-click all of the fields. Right click and check in.
Art
Art
Art Tostaine
Re: A simple tutorial
That error indicates that your LANSA user id or password on the PC doesn't match the IBM i password. Or a bunch of other problems.
When you start the IDE, enter your LANSA password and click system init. Click the options tab and check the bottom three check boxes, then put in your partition name.Click OK. If it doesn't work, post the results. There also might be a job log on the i.
When you start the IDE, enter your LANSA password and click system init. Click the options tab and check the bottom three check boxes, then put in your partition name.Click OK. If it doesn't work, post the results. There also might be a job log on the i.
Art Tostaine
Re: A simple tutorial
When I try that there is no option to check in the fields.atostaine wrote: Sun Dec 31, 2017 11:48 am You can click on files in the repository tab, expand the file, and then ctrl-click all of the fields. Right click and check in.
Art
I tried the System Init (I had already done that anyway) and it completes fine with no error. Connection from the IDE to the Iseries is fine. I can check in and out the Webpage, File and Server Module. Just don't seem to be able to check in the fields in the file for some reason.
Re: A simple tutorial
OK solved one mystery. The error messages I was getting when checking in the file were a result of not having "Rebuild OAM" checked on the Check In options. No idea why that wasn't checked.
But it still doesn't solve the problem. The fields are not being checked in (I can't see them in the "1. Review access to objects defined within LANSA" option).
Anyway, not sure if that is the cause of the error message now that you have suggested it's something to do with the password.
But it still doesn't solve the problem. The fields are not being checked in (I can't see them in the "1. Review access to objects defined within LANSA" option).
Anyway, not sure if that is the cause of the error message now that you have suggested it's something to do with the password.
Re: A simple tutorial
One of my colleagues has successfully got the fields to go across. He's going to show me what he did and I'll see how it differs from what I did.
Re: A simple tutorial
My colleague was doing everything I was doing but it was working for him and not for me. I got him to delete the file so I could try again and this time it worked for me so I've no idea.
Still having the same "User Information Provided is not Valid" error but I'm chasing that up with Support
If anyone has any insight into that please post.
Still having the same "User Information Provided is not Valid" error but I'm chasing that up with Support
If anyone has any insight into that please post.
Re: A simple tutorial
I've worked it out. The "User Information is not Valid" error is somehow related to me last week adding a library to the DCXPGMLIB library list. Something about that, LANSA didn't like.
Re: A simple tutorial
I double checked and this option is available for me. But if the field isn't checked out the option isn't there.
Art
Art Tostaine
Re: A simple tutorial
The option is now always available for me every time. Based on what you have just said, I wonder if before, when I brought the file in with it's fields, somehow the fields weren't getting set to "checked out" status.
Whatever was going wrong is no longer going wrong.
Whatever was going wrong is no longer going wrong.