Search found 31 matches

by KevinW
Wed Apr 22, 2020 10:32 am
Forum: Questions & Answers
Topic: SELECT_SQL with iASP
Replies: 6
Views: 1184

Re: SELECT_SQL with iASP

The documentation on SELECT_SQL states this: "Do NOT use this command to connect from Visual LANSA to a database on the IBM i. If you use the SELECT_SQL command to connect from Visual LANSA to an IBM i Database, it will access the Database on the PC and not on the IBM i. For this type of connection,...
by KevinW
Wed Apr 22, 2020 10:02 am
Forum: Questions & Answers
Topic: SELECT_SQL with iASP
Replies: 6
Views: 1184

Re: SELECT_SQL with iASP

Where is the code (function, component etc) that is executing the SELECT_SQL actually running? If not IBM i then I am not sure how it would work.
by KevinW
Wed Apr 22, 2020 8:58 am
Forum: Questions & Answers
Topic: SELECT_SQL with iASP
Replies: 6
Views: 1184

Re: SELECT_SQL with iASP

... and you are executing it directly in Windows as against directly on IBM i because?
by KevinW
Thu May 09, 2019 9:20 am
Forum: Questions & Answers
Topic: Discrepancy with AsString
Replies: 2
Views: 12200

Re: Discrepancy with AsString

Hi,

Please report this to your local LANSA support, with LANSA version and EPC info and complete samples that show the issue for faster results.
by KevinW
Fri Feb 08, 2019 9:24 am
Forum: Questions & Answers
Topic: Detecting Record Lock
Replies: 5
Views: 2315

Re: Detecting Record Lock

Special system variable *DBMS_RECORD_LOCKED is available for your use to distinguish between other I/O errors and a record locked condition. So taking MarkD's sample code and adding this: * Attempt the update Update Fields(#xEmployeeAge) In_File(xEmployee) With_Key(23) Io_Error(*NEXT) Val_Error(*NEX...
by KevinW
Thu Jan 31, 2019 4:45 pm
Forum: Questions & Answers
Topic: Calling RPG program via DEF_MTH_EX / DEF_MAP_EX
Replies: 2
Views: 1773

Re: Calling RPG program via DEF_MTH_EX / DEF_MAP_EX

When you say that you have looked at logs, have you looked at the job log for whichever job you are executing this in?

Also, have you tried making the DEF_MAP_EX for FOUND be FOR(*BOTH)?

If neither of these suggestions help, you may want to report the issue to local LANSA Support.
by KevinW
Fri Jan 04, 2019 9:27 am
Forum: Questions & Answers
Topic: Are repeated Val_Errors a problem?
Replies: 2
Views: 1512

Re: Are repeated Val_Errors a problem?

I am assuming that the reason that your update fails is because of multiple instances of your code executing at once. In the following code a successful Fetch Lock(*YES) serializes access to the "resource" so that only one instance at a time can: 1) Obtain the current value of #SIFAK for a particula...
by KevinW
Thu Nov 29, 2018 2:14 pm
Forum: Questions & Answers
Topic: Import Tables From IBM i
Replies: 9
Views: 4231

Re: Import Tables From IBM i

Are you absolutely certain that the fields are the same in absolutely every way as when they were originally created via "Import Tables From IBM i"? Is it possible that the 3rd party (or you) has made a change that is not shown in LANSA? Do you have the previous version of the Other files to compare?
by KevinW
Wed Oct 31, 2018 10:21 am
Forum: Questions & Answers
Topic: Calling user defined BIF in C from RDMLX Lansa Function
Replies: 20
Views: 4068

Re: Calling user defined BIF in C from RDMLX Lansa Function

Miroslav wrote: 1) All (ARG, RET parameters) are arguments, resp. from the point of return it is RET. 2) List1 returned will be automatically retrieved to Lansa function. List2 should be updated etc. using U_BIF_SET_RET_LIST_POINTER List2 contains X_VCHAR parameter, so it does mean, I need to go thr...
by KevinW
Tue Oct 30, 2018 10:48 am
Forum: Questions & Answers
Topic: Calling user defined BIF in C from RDMLX Lansa Function
Replies: 20
Views: 4068

Re: Calling user defined BIF in C from RDMLX Lansa Function

Hi Miroslav, So List1 is an argument, and you want to change it in some way (add entries, update entries, delete entries) and have those changes returned to the calling RDMLX. I have this feeling that you change it in your C code by using the appropriate macros and do nothing else. I cannot find the...
by KevinW
Fri Oct 26, 2018 9:59 am
Forum: Questions & Answers
Topic: Calling user defined BIF in C from RDMLX Lansa Function
Replies: 20
Views: 4068

Re: Calling user defined BIF in C from RDMLX Lansa Function

Hi Miroslav, To answer your immediate question, declare a C struct as a type that reflects the layout of the RPG multi occurrence data structure. Then declare an array of that data type that reflects the maximum occurrences of the RPG multi occurrence data structure. Fill that array, then use the ar...
by KevinW
Thu Oct 25, 2018 9:20 am
Forum: Questions & Answers
Topic: Calling user defined BIF in C from RDMLX Lansa Function
Replies: 20
Views: 4068

Re: Calling user defined BIF in C from RDMLX Lansa Function

Hi Miroslav, How do you want to deal with nickName in your C? U_BIF_GET_ARG_AS_VCHAR(0, vchNickName) will get the nickname as a null terminated string, so you will have to have previously defined vchNickName as something like: X_VCHAR vchNickName[10 + 1]; If you need it as a 10 character buffer then...
by KevinW
Wed Oct 24, 2018 9:45 am
Forum: Questions & Answers
Topic: Calling user defined BIF in C from RDMLX Lansa Function
Replies: 20
Views: 4068

Re: Calling user defined BIF in C from RDMLX Lansa Function

Hi Miroslav, I can't code your user defined BIF in C for you, but I can point out a few things from what you have written: Miroslav wrote: I have arguments character nickName list1 list2 and returns : return code return message So here you say you have 3 arguments and 2 returns. Miroslav wrote of th...
by KevinW
Tue Oct 23, 2018 9:21 am
Forum: Questions & Answers
Topic: Calling user defined BIF in C from RDMLX Lansa Function
Replies: 20
Views: 4068

Re: Calling user defined BIF in C from RDMLX Lansa Function

Here is the example that probably applies to your situation from the manual. 1. The RDML from the example: define field(#number1) type(*dec) length(7) define field(#number2) type(*dec) length(7) define field(#mean) type(*dec) length(7) request fields(#number1 #number2) use ud_average with_arg(#numbe...
by KevinW
Fri Oct 19, 2018 9:46 am
Forum: Questions & Answers
Topic: Calling user defined BIF in C from RDMLX Lansa Function
Replies: 20
Views: 4068

Re: Calling user defined BIF in C from RDMLX Lansa Function

mbulka wrote: But, I am not able to get vector Do you have some example, how to read vector in C ? What LANSA construct are you meaning when you refer to "vector"? Aren't there examples of getting at fields, RDML lists and RDMLX lists in the documentation previously cited? You may need to supply you...
by KevinW
Thu Oct 18, 2018 10:20 am
Forum: Questions & Answers
Topic: Calling user defined BIF in C from RDMLX Lansa Function
Replies: 20
Views: 4068

Re: Calling user defined BIF in C from RDMLX Lansa Function

Have you looked at the LANSA Application Design Guide manual? There is at least one C example there in the chapter entitled "Create Your Own Built-In Functions". There would appear to be 3 examples in C there.
by KevinW
Tue Aug 14, 2018 10:40 am
Forum: Questions & Answers
Topic: Loading an other file containing a '.' in the name
Replies: 3
Views: 1416

Re: Loading an other file containing a '.' in the name

Try using the Permanent File Override facility. There may even be an example of overriding a file with a '.' in the name.

As you have found, using POINT (which you would have to do for every use of the file in your code) is pretty pointless. :)
by KevinW
Fri Aug 10, 2018 9:42 am
Forum: Questions & Answers
Topic: Record to be updated has been changed error
Replies: 5
Views: 2155

Re: Record to be updated has been changed error

Hi Joe, This message is IOM0017. This happening is considered a validation error. This is documented under the UPDATE command in the Technical Reference Guide. This is called "crossed update checking" Is this a LANSA file or an IBM i Other file? The reason I ask is that the output of the message is ...
by KevinW
Thu Aug 09, 2018 9:17 am
Forum: Questions & Answers
Topic: Using Temp Tables
Replies: 3
Views: 1327

Re: Using Temp Tables

Hi Joe, How many rows are you looking at, and how many bytes per row"? The first thing that occurs to me is a working list. It can be sorted. Next is the SPACE BIFs. Larger than they can handle may need a temporary file as you say. If IBM i specific and not web, you could have an empty version in th...
by KevinW
Tue May 08, 2018 11:25 am
Forum: Questions & Answers
Topic: IBM i Export / Import Save Files
Replies: 9
Views: 2230

Re: IBM i Export / Import Save Files

Hi Joe, Was the save file you specified for the import one that contained an export? Messages about not finding datarea DC@EXTIM and file DC@X02CC would argue that the save file you tried to import from is either empty or was not used as the output of an export. If this explanation is incorrect, I w...