templates and restful apis
Posted: Tue Jun 07, 2022 3:39 am
do you remember templates right?
I found myself using templates for server routines, mthroutines, or just small group of lines that I frequently use, for example:
every time I want to review the output of a json routine, I need to add those lines. Instead of copy paste from other programs, I just created a new template (File, New, Template), and every time I need that set of lines, I just click the icon for template in the editor, select the respective template, and bring that code into my program.
some templates make questions and create something more customized, but even the simpler ones with fixed code for example with the typical structure of a restful consumption, reduce my time to coding... just saying.
I found myself using templates for server routines, mthroutines, or just small group of lines that I frequently use, for example:
Code: Select all
Define_Com Class(#XPRIM_OSUtil) Name(#OSUtil)
If (*OSAPI = "IBMI")
#OSUtil.SetEnvironmentVariable Name('LANSA_XLIB_CONFIG') Value('/tmp/lansaxlib.configas400.json')
#OSUtil.SetEnvironmentVariable Name('LANSA_XLIB_TRACEPATH') Value('/LANSA_G14PGMLIB/tmp/log.txt')
Else
#OSUtil.SetEnvironmentVariable Name('LANSA_XLIB_CONFIG') Value('c:\temp\lansaxlib.config.json')
#OSUtil.SetEnvironmentVariable Name('LANSA_XLIB_TRACEPATH') Value('c:\temp\log1.txt')
Endifsome templates make questions and create something more customized, but even the simpler ones with fixed code for example with the typical structure of a restful consumption, reduce my time to coding... just saying.