Slide 61 of 80
Notes:
- I rarely use HPAUTOCONT. I prefer to be explicit when I am anticipating that the next command may fail. Also, there is slight extra overhead with HPAUTOCONT. Lastly, its original value should be saved and re-instated before the script ends.
- HPCMDTRACE is often useful, despite being overly verbose . There is a simple example that toggles the HPCMDTRACE value in the “Examples” section of this presentation.
- My CI prompt contains HPCWD, e.g.. :setvar hpprompt “!!hpcwd: “
- I use HPCPUMSECS to measure script performance as follows: - save its value at script entry - save its value near the script end - calculate the time in the script as: end_value - start_value.
- Express 1 of 6.0 added 5 new variables related to the date and time. - HPDATETIME - is a string that contains “YYYYMMDDHHMMSSMMM”. The value of this variable is that the date and time are retrieved autonomously, thus you are guaranteed that the time portion of the variable is not early the next day. Note: currently the microseconds field has only tenths of a second resolution due to restrictions on the CLOCK intrinsic call. - HPDOY - an integer variable containing - HPHHMMSSMMM - current time in hour, minutes, seconds, micro-seconds. - HPLEAPYEAR - a boolean variable that is true when the current year is a leap year. - HPYYYYMMDD - a string variable that contains the year, month and date as an autonomous value.
- HPFILE reduces the need to hard-code the filename of your script, e.g.: if user-selected-help then echo ![hpfile] -- Syntax: … …
- HPLASTJOB can be modified which is useful when referencing the HPLASTPSID variable. E.g.. :setvar hplastjob “#J12” :print !hplastspid.out..hpspool