Search found 51 matches

by HMJust
Fri Jan 04, 2019 10:00 pm
Forum: Questions & Answers
Topic: Are repeated Val_Errors a problem?
Replies: 2
Views: 1307

Re: Are repeated Val_Errors a problem?

It appears to have solved my problem. Thank you!

It also looks like my specific problem was solved just by the Lock(*Yes), but I have kept the checks in - as I like to know why something fails, should it again someday.
by HMJust
Thu Jan 03, 2019 9:27 pm
Forum: Questions & Answers
Topic: Are repeated Val_Errors a problem?
Replies: 2
Views: 1307

Are repeated Val_Errors a problem?

Running on iSeries in an RDML function I have FI2: Fetch Fields(#SIFAK) From_File(FIRCSP) With_Key(#SLAND) Change Field(#SIFAK) To('#SIFAK + 1') Update Fields(#SIFAK) In_File(FIRLSP) Io_Error(FI2) Val_Error(FI2) I end up calling this function from the VLF and sometimes it fails. Through some debuggi...
by HMJust
Mon Nov 20, 2017 9:04 pm
Forum: Questions & Answers
Topic: Email validation/masking in VL Web
Replies: 3
Views: 1643

Re: Email validation/masking in VL Web

Question: What will the criteria for email validation be with the "isEmail" function?

I am asking because I spent some time with the specification for email addresses and as I recall, taken literally the RFC2822 allows for many things that we are not interested in normally - but which are valid.
by HMJust
Thu Oct 12, 2017 6:19 pm
Forum: Questions & Answers
Topic: String literal cheat sheet
Replies: 1
Views: 688

Re: String literal cheat sheet

I agree with you, and thank you for reminding me how to get these characters as strings. I forgot that... About strings and integers, my "favorite" feature is the string intrinsics AsInteger and AsNumber which I wrote about here: https://lansa123.wordpress.com/2017/03/23/asinteger-and-asnumber/ (for...
by HMJust
Wed Oct 11, 2017 11:02 pm
Forum: Questions & Answers
Topic: DATE formatting
Replies: 1
Views: 854

Re: DATE formatting

If you are just looking for data to string, this has worked for me:

Code: Select all

Define Field(#HMJDATE) Type(*DATE)
#HMJDATE := *YYMMDD
#WCHAR8 := #HMJDATE.AsString.Substring( 9 2 ) + '-' + #HMJDATE.AsString.Substring( 6 2 ) + '-' + #HMJDATE.AsString.Substring( 3 2 )
by HMJust
Fri Oct 06, 2017 3:38 pm
Forum: Questions & Answers
Topic: How do I change the instance name in the command handler header?
Replies: 3
Views: 1013

Re: How do I change the instance name in the command handler header?

I mean in the older VLF-WEB, sorry.

Also, it turned out that I needed to do this on the client so I guess I am stuck with my JS solution.
by HMJust
Thu Oct 05, 2017 3:55 pm
Forum: Questions & Answers
Topic: How do I change the instance name in the command handler header?
Replies: 3
Views: 1013

How do I change the instance name in the command handler header?

In VLF for web, using Lansa v14.1, I would like to change the instance name in the command handler header:

Image

How do I do that?
by HMJust
Fri Sep 08, 2017 6:24 pm
Forum: Questions & Answers
Topic: What would be the proper way to return a two-dimensional list from a method?
Replies: 1
Views: 872

What would be the proper way to return a two-dimensional list from a method?

What would be the proper way to return a two-dimensional list?

Like, I have a list of value-groups (different types). A list of lists of string, decimal, decimal, string, decimal

I wish to define this, add to it and return it from a method.
by HMJust
Thu Sep 07, 2017 5:41 pm
Forum: Questions & Answers
Topic: lansaweb.dll returning status 500 but logging status 200
Replies: 4
Views: 1792

Re: lansaweb.dll returning status 500 but logging status 200

Thank you. I did actually look there but apparently I got confused by the dates. The file had data from 2015 onwards but I have now created a clean version. I'd add that lansaweb.dll still logs the error as status 200, which seems odd. Can anyone help with this error description from X_ERR.LOG? Rele...
by HMJust
Wed Sep 06, 2017 6:50 pm
Forum: Questions & Answers
Topic: lansaweb.dll returning status 500 but logging status 200
Replies: 4
Views: 1792

lansaweb.dll returning status 500 but logging status 200

We are experiencing some errors in an existing solution, and I have been looking through the IIS log to spot the errors. Unfortunately the errors are not logged there. If I provoke an error, this is returned to the browser (I am including the complete headers but has removed most of the HTML as I ca...
by HMJust
Thu Aug 24, 2017 4:51 pm
Forum: Questions & Answers
Topic: Compiling LANSA Components outside the VL IDE
Replies: 9
Views: 2941

Re: Compiling LANSA Components outside the VL IDE

CI/CD sounds very promising. I have a question, since I am struggling a bit with the terminology. This is partly because I am working on a system that by now is quite old and we switch between a v.12 and a v.14 environment. So when the doc says "Only the very latest Web technology is supported. WAMs...
by HMJust
Tue Jun 13, 2017 9:32 pm
Forum: Questions & Answers
Topic: Alternative to sort_list
Replies: 2
Views: 1090

Re: Alternative to sort_list

No, I don't think so. That thread was AFAIK about controlling the displayed sorting. We are happy with the sorting as it is displayed but we are having trouble navigating that sort.
by HMJust
Tue Jun 13, 2017 8:58 pm
Forum: Questions & Answers
Topic: Alternative to sort_list
Replies: 2
Views: 1090

Alternative to sort_list

In a Windows application I have a treeview with items. The treeview is sorted on two levels, each on an alphanumeric field. When the user has selected an item, I want to be able to select the next item (the one below or the one above). As in: Treeview and items: A B C C.1 C.2 C.3 D D.1 D.2 E if the ...
by HMJust
Wed Mar 29, 2017 7:59 pm
Forum: Questions & Answers
Topic: JSM Status and Error Handling
Replies: 2
Views: 1018

Re: JSM Status and Error Handling

It really depends on the kind of error you are experiencing, as I could imagine there would be errors you could use to take an alternative path through execution. Like, "if this fails, then I will make this call instead". However, I think most cases the proper way would be to close the JSM and end t...
by HMJust
Wed Mar 29, 2017 7:56 pm
Forum: Questions & Answers
Topic: Opening and Closing JSM
Replies: 2
Views: 1324

Re: Opening and Closing JSM

I have successfully passed the handle around in case of SOAP agents. That worked.

In the case of doing an HTTP request I was however unable to reuse the handle and had to close and re-open the JSM each time :-(

So I guess you have to try and see.
by HMJust
Wed Mar 22, 2017 10:51 pm
Forum: Questions & Answers
Topic: Server module, reading the request object
Replies: 0
Views: 1406

Server module, reading the request object

In an example I just posted as a different topic, I have a server module with a response object. My response should really vary due to some content in the HTTP request, so I would like to be able to read and/or query the request. I can't seem to figure out how to do that, so my question is, how do I...
by HMJust
Wed Mar 22, 2017 10:43 pm
Forum: Questions & Answers
Topic: Server module, changing contenttype
Replies: 0
Views: 1240

Server module, changing contenttype

I have a bit of an issue. I need to return some JSON but because of the cross domain restrictions, I need to send the Access-Control-Allow-Origin header. I have ended up using a server module, like this: Begin_Com Role(*EXTENDS #PRIM_SRVM) Srvroutine Name(LINKS) Response(#RESPONSE) * #RESPONSE.Conte...
by HMJust
Fri Mar 17, 2017 6:46 pm
Forum: Questions & Answers
Topic: Sending and receiving JSON over HTTP
Replies: 3
Views: 1553

Re: Sending and receiving JSON over HTTP

I was directed to the JSON samples in the Integrator documentation, as I was told I needed to use those. It means that I have to use Integrator to create an HTTP connection, setting custom headers, and Integrator to bind JSON out and in. I can get my sample in a repostable format if you are interest...
by HMJust
Tue Mar 14, 2017 11:40 pm
Forum: Questions & Answers
Topic: Sending and receiving JSON over HTTP
Replies: 3
Views: 1553

Sending and receiving JSON over HTTP

I hope to get some help with sending and receiving JSON over HTTP. I am again struggling with the examples and documentation, so I need help to understand how I am supposed to do this. The task I have is to send some JSON to a RESTful webservice and in the process receive some JSON back. I know I ca...
by HMJust
Sat Feb 25, 2017 12:38 am
Forum: Questions & Answers
Topic: LANSA Integrator & 3rd Party SOAP Services
Replies: 8
Views: 1737

Re: LANSA Integrator & 3rd Party SOAP Services

Are you sure that's right? I think you are setting the same fragment (REQUEST) twice.

Code: Select all

Change Field(#JSMXCMD) To('SET FRAGMENT(REQUEST) SERVICE_EXCHANGE(*FIELD)')
The second one should probably be

Code: Select all

Change Field(#JSMXCMD) To('SET FRAGMENT(INPUT) SERVICE_EXCHANGE(*FIELD)')