Search found 28 matches

by KevinW
Thu May 09, 2019 9:20 am
Forum: Questions & Answers
Topic: Discrepancy with AsString
Replies: 2
Views: 11984

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: 1878

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: 1541

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: 1306

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: 3603

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: 2872

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: 2872

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: 2872

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: 2872

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: 2872

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: 2872

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: 2872

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: 2872

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: 1163

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: 1731

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: 1065

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: 1719

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...
by KevinW
Wed Mar 28, 2018 9:13 am
Forum: Questions & Answers
Topic: field symbol
Replies: 6
Views: 1759

Re: field symbol

The other thing that occurs to me is that this is perhaps a code generation question, so that may mean creating and using a template to generate the requisite code.

It would also be useful to know what the actual problem is that needs an answer like dynamic field processing.
by KevinW
Tue Mar 27, 2018 11:04 am
Forum: Questions & Answers
Topic: field symbol
Replies: 6
Views: 1759

Re: field symbol

/* function where you want to "dynamically" set a field to a value */ /* #FIELD contains the name of the field you want to set without leading # */ /* #VALUE contains the value you want to set it to */ /* The field you want to set the value for must be used in this function */ Exchange Fields(#FIELD...
by KevinW
Fri Mar 23, 2018 10:47 am
Forum: Questions & Answers
Topic: SELECT_SQL - Connect to server
Replies: 5
Views: 1482

Re: SELECT_SQL - Connect to server

OK, I'll ask a very dumb question. Why would 2 developers be working on the same object at the same time? For small development shops, "Hey Joe, I need to change reusable part ABC", "Hey, Charlie, can you wait till I've finished with it?", "Sure thing". For larger development shops there is task tra...