Creating Help Text using MS-WORD and transferring it into LANSA for the AS/400
|Product/Release:||LANSA for the AS/400|
|Abstract:||It is possible to create help text using MS-WORD and then transfer this help text into LANSA for the AS/400 on the AS/400.|
|Submitted By:||LANSA Technical Support|
- Using MS Word create help text (up to 77 characters wide) then save the help text document with type Text Only (Eg WORDHELP.TXT)
- Use shared folders to get the file across to the AS/400 (Eg WORDHELP)
- * Create a physical file (no DDS) with a record length of 77 (Eg CRTPF FILE(WORDHLP) RCDLEN(77) TEXT('Help Text from MS Word')
- Copy from the folder to a new PF(Eg CPYFRMPCD FROMFLR(WORDHELP) TOFILE(WORDHLP) ROMDOC(WORDHELP.TXT))
- * Display the file to check that everything is OK so far
- * Go into the LANSA partition that is being used
- * Create a file that is maintained by OTHER
- * Load this OTHER File
- * Make the File operational
- * Create a Process (Eg WORDHELP)
- * Create a Function (Eg WORDHLP) that looks similar to the following RDML
- * Compile the Function
- Execute the Function
* ******** Beginning of RDML commands ********** DEF_LIST NAME(#WKHLPL) FIELDS((#WORDHLP)) TYPE(*WORKING) SELECT FIELDS((#WORDHLP)) FROM_FILE(WORDHLP) ADD_ENTRY TO_LIST(#WKHLPL) ENDSELECT USE BUILTIN(PUT_HELP) WITH_ARGS(?????? ''' ''' 'DF' #WKHLPL ) TO_GET(#RETCOD) IF COND('#RETCOD = OK') MESSAGE MSGTXT('Help text successfully added to field ??????') ELSE MESSAGE MSGTXT('ERROR *** Help text addition NOT successful') ENDIF * ********* End of RDML commands **********
The ?????? represents the field name that will be used. Of course a REQUEST could be added and a variable put in here.
This example replaces all the helptext for a field but with a little extra work it could be made more flexible; some possibilities include:
- Adding help text
- Putting in $$NOAUTO,
- Editing the help text that is there and the help text from MS Word if you like.
* means that this step only has to be done once. So, once you have set up the method it is much easier to do the second and subsequent times. PS Even automate it a little!