|
> Have a look at www.insure.ie and www.firstcalldirect.ie for MDC client sites > in 100% LANSA code. Um. Interesting website. I entered the data, got to the last page, and it told me I had made an error. It told me to press the back button to get back to the page in error and fix it. When I hit the back button, all my previous entries were cleared lost and I had to re-enter everything. This is what you consider to be a web application? > Joe, here is a link to the LANSA site where you can look at some code, in > the public domain, for examples, > > http://www.lansa.com/tips/index.htm > > Also if you want an overview of LANSA for the Web (which is MDC's forte) > look at > > http://www.lansa.com/products/webtechinfo.htm Okay, I looked at the example code. It seems that LANSA for the Web has you create "Web Components". Here's one: <RDML CHECKVALUE="YES"> Inp<INPUT TYPE="RADIO" NAME="S_173IOC4" VALUE="I"> Out<INPUT TYPE="RADIO" NAME="S_173IOC4" VALUE=""> </RDML> Wow. That's pretty impressive. Hardcoded non-breaking spaces. Hardcoded variable name. Well, let's find a "conditional" web component. Ah, here's one. <RDML ONCONDITION="S_173IOC2"> <INPUT TYPE="TEXT" NAME="__S_173COL2 -<RDML MERGE="&ROWNUM" FORMAT="4"> A" VALUE = "<RDML MERGE="S_173COL2">" SIZE=9 MAXLENGTH=9> </RDML> <RDML NOTCONDITION="S_173IOC2"> <FONT COLOR="darkred" SIZE=2><RDML MERGE="S_173COL2"></FONT> </RDML> What the heck is condition "S_I73IOC2"? I suppose it's something I set up in the LANSA source code. Oh look! Hardcoded colors and font sizes! In fact, I guess I set up all the individual pieces of HTML in "Web components", and anything I want to change, I hardcode in my source. Yeah, that's pretty high level. But then again, I assume the source is easy, a high level of abstraction above everything else. After all, this is a 4GL. I've attached the code required to maintain a data area. I'm pretty confused as to how this is a 4GL. It sure looks like a combination of DDS and CL code to me. With hardcoded checking of the CPU type, to boot, so that I conditionally execute code based on the machine I'm running on. Anyway, I'm done. Anybody interested in programming in LANSA should definitely take a look at the code Mike pointed me to. It's definitely enlightening. ********** COMMENT(=======================================================); ********** COMMENT(Process ........: SET_013); ********** COMMENT(Function .......: SET013B); ********** COMMENT(Created on .....: 03/03/00 at 13:00:02); ********** COMMENT(Description ....: Maintain DC@A07); ********** COMMENT(Full Description: The purpose of this function is to); ********** COMMENT(maintain system definition data area DC@A07); ********** COMMENT(); ********** COMMENT(); ********** COMMENT(Disclaimer: The following material is supplied as an); ********** COMMENT(example only. No warranty is expressed or implied.); ********** COMMENT(); ********** COMMENT(=======================================================); ********** COMMENT(Function control options); FUNCTION OPTIONS(*DIRECT); ********** COMMENT(); ********** COMMENT(Group and field definitions); ********** COMMENT(); ********** COMMENT(); DEFINE FIELD(#S_013PFER) TYPE(*CHAR) LENGTH(010) DESC('User defined program/file error handler'); DEFINE FIELD(#S_013PRMT) TYPE(*CHAR) LENGTH(010) DESC('User defined prompt key message handler'); DEFINE FIELD(#S_013IMP) TYPE(*CHAR) LENGTH(010) DESC('Import user exit program'); DEFINE FIELD(#S_013ENV) TYPE(*CHAR) LENGTH(010) DESC('LANSA environment setup user exit pgm'); DEFINE FIELD(#S_013SBM) TYPE(*CHAR) LENGTH(010) DESC('SUBMIT user exit program'); DEFINE FIELD(#S_013TGTR) TYPE(*CHAR) LENGTH(008) DESC('Target Release *N/*CURRENT/*PRV/VxRyMz'); DEFINE FIELD(#S_013THR) TYPE(*CHAR) LENGTH(001) DESC('Retain task tracking history'); DEFINE FIELD(#S_013TTP1) TYPE(*CHAR) LENGTH(002) DESC('Prefix for system wide tasks (optional)'); DEFINE FIELD(#S_013TTP2) TYPE(*CHAR) LENGTH(002) DESC('Prefix for user tasks (optional)'); DEFINE FIELD(#S_013TTP3) TYPE(*CHAR) LENGTH(002) DESC('Prefix for task per task (optional)'); DEFINE FIELD(#S_013TTU1) TYPE(*CHAR) LENGTH(001) DESC('Unlock after check in (system) Y/N'); DEFINE FIELD(#S_013TTU2) TYPE(*CHAR) LENGTH(001) DESC('Unlock after check in (user) Y/N'); DEFINE FIELD(#S_013TTU3) TYPE(*CHAR) LENGTH(001) DESC('Unlock after check in (task) Y/N'); ********** COMMENT(=======================================================); ********** COMMENT(Program Mainline : DC@A07); ********** COMMENT(=======================================================); ********** COMMENT(); FUNCTION OPTIONS(*DIRECT); ********** COMMENT(); DEF_COND NAME(*AS400) COND('*CPUTYPE = AS400'); IF COND(*AS400); ********** COMMENT(backup the original DC@A07 in save file S_013SAV2); ********** COMMENT(the partition data library); MESSAGE MSGTXT('Backup of DC@A07 in save file S_013SAV2 in your partition data library'); EXEC_OS400 COMMAND('CALL SETCRTSAVF PARM(#S_LBPRTDT S_013SAV2 ''Backup of DC@A07'')') IF_ERROR(*NEXT); EXEC_OS400 COMMAND('SAVOBJ OBJ(DC@A07) LIB(#S_LBSYSPG) DEV(*SAVF) SAVF(#S_LBPRTDT/S_013SAV2) CLEAR(*ALL) SAVACT(*SYNCLIB)'); ELSE; MESSAGE MSGTXT('Not available on PC'); RETURN; ENDIF; ********** COMMENT(); BEGIN_LOOP; USE BUILTIN(GET_CHAR_AREA) WITH_ARGS('DC@A07' '*LIBL' 'N' 1 10) TO_GET(#S_013PFER); USE BUILTIN(GET_CHAR_AREA) WITH_ARGS('DC@A07' '*LIBL' 'N' 011 10) TO_GET(#S_013PRMT); USE BUILTIN(GET_CHAR_AREA) WITH_ARGS('DC@A07' '*LIBL' 'N' 601 10) TO_GET(#S_013IMP); USE BUILTIN(GET_CHAR_AREA) WITH_ARGS('DC@A07' '*LIBL' 'N' 611 10) TO_GET(#S_013ENV); USE BUILTIN(GET_CHAR_AREA) WITH_ARGS('DC@A07' '*LIBL' 'N' 621 10) TO_GET(#S_013SBM); USE BUILTIN(GET_CHAR_AREA) WITH_ARGS('DC@A07' '*LIBL' 'N' 631 08) TO_GET(#S_013TGTR); USE BUILTIN(GET_CHAR_AREA) WITH_ARGS('DC@A07' '*LIBL' 'N' 639 01) TO_GET(#S_013THR); USE BUILTIN(GET_CHAR_AREA) WITH_ARGS('DC@A07' '*LIBL' 'N' 640 02) TO_GET(#S_013TTP1); USE BUILTIN(GET_CHAR_AREA) WITH_ARGS('DC@A07' '*LIBL' 'N' 642 02) TO_GET(#S_013TTP2); USE BUILTIN(GET_CHAR_AREA) WITH_ARGS('DC@A07' '*LIBL' 'N' 644 02) TO_GET(#S_013TTP3); USE BUILTIN(GET_CHAR_AREA) WITH_ARGS('DC@A07' '*LIBL' 'N' 646 01) TO_GET(#S_013TTU1); USE BUILTIN(GET_CHAR_AREA) WITH_ARGS('DC@A07' '*LIBL' 'N' 647 01) TO_GET(#S_013TTU2); USE BUILTIN(GET_CHAR_AREA) WITH_ARGS('DC@A07' '*LIBL' 'N' 648 01) TO_GET(#S_013TTU3); MESSAGE MSGTXT('WARNING this program DOES NOT do any validation before update]]]]'); D01: DISPLAY FIELDS((#S_013PFER *IN)(#S_013PRMT *IN)(#S_013IMP *IN)(#S_013ENV *IN)(#S_013SBM *IN)(#S_013TGTR *IN)(#S_013THR *IN)(#S_013TTP1 *IN)(#S_013TTP2 *IN)(#S_013TTP3 *IN)(#S_013TTU1 *IN)(#S_013TTU2 *IN)(#S_013TTU3 *IN)) IDENTIFY(*DESC) PROMPT_KEY(*NO); USE BUILTIN(PUT_CHAR_AREA) WITH_ARGS(#S_013PFER 'DC@A07' '*LIBL' 'Y' 001 10); USE BUILTIN(PUT_CHAR_AREA) WITH_ARGS(#S_013PRMT 'DC@A07' '*LIBL' 'Y' 011 10); USE BUILTIN(PUT_CHAR_AREA) WITH_ARGS(#S_013IMP 'DC@A07' '*LIBL' 'Y' 601 10); USE BUILTIN(PUT_CHAR_AREA) WITH_ARGS(#S_013ENV 'DC@A07' '*LIBL' 'Y' 611 10); USE BUILTIN(PUT_CHAR_AREA) WITH_ARGS(#S_013SBM 'DC@A07' '*LIBL' 'Y' 621 10); USE BUILTIN(PUT_CHAR_AREA) WITH_ARGS(#S_013TGTR 'DC@A07' '*LIBL' 'Y' 631 08); USE BUILTIN(PUT_CHAR_AREA) WITH_ARGS(#S_013THR 'DC@A07' '*LIBL' 'Y' 639 01); USE BUILTIN(PUT_CHAR_AREA) WITH_ARGS(#S_013TTP1 'DC@A07' '*LIBL' 'Y' 640 02); USE BUILTIN(PUT_CHAR_AREA) WITH_ARGS(#S_013TTP2 'DC@A07' '*LIBL' 'Y' 642 02); USE BUILTIN(PUT_CHAR_AREA) WITH_ARGS(#S_013TTP3 'DC@A07' '*LIBL' 'Y' 644 02); USE BUILTIN(PUT_CHAR_AREA) WITH_ARGS(#S_013TTU1 'DC@A07' '*LIBL' 'Y' 646 01); USE BUILTIN(PUT_CHAR_AREA) WITH_ARGS(#S_013TTU2 'DC@A07' '*LIBL' 'Y' 647 01); USE BUILTIN(PUT_CHAR_AREA) WITH_ARGS(#S_013TTU3 'DC@A07' '*LIBL' 'Y' 648 01); MESSAGE MSGTXT('DC@A07 was successfully updated');
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.