Showing posts with label Rexx. Show all posts
Showing posts with label Rexx. Show all posts

Tuesday, January 13, 2009

Error and Condition Trapping (Call ON versus Signal ON)

Call ON and OFF is used to handle condition trap by procedure name.
SynTax:
call ON conditionName [ NAME trapLabel ] 
call OFF condition-Name

signal ON conditionName [ NAME trapLabel ] 
signal OFF condition-Name

Overview when Exception occurs Control is transferred to routine to address the errors. After the error routine handles the condition, execution of primary script can resume.

The difference between call and signal:
1. signal applies to all seven error conditions. call didn't apply to SYNTAX,NOVALUE,and LOSTDIGITS errors.
    note: other error conditions: HALT,ERROR,FAILURE,NOTREADY
2. signal forces abnormal changes in the flow of control, and unconditionally transfer the control to the trapLabel, after processed, [and then transferred the control to a specified Label manually].
   call provides a "normal" way to trap routines, control is automatically transferred from the error routine back to main program, and the result special variable is not setting when returned from a condition trap, any value coded on the return will be ignored.



Tuesday, January 6, 2009

Developing ISPF program with Rexx

The Main Process:
1.Panel definition, Message Definition and file tailoring skeletons are created  and saved in ISPF library before running the Dialog.
2.Program(after compiled) and command procedure created and stored in system program library.

Tuesday, December 30, 2008

expression--Logical not/not

Note:The ¬ operator character may be absent in Ascii implementations. The backslash character (\) is now preferred.
Code:
000001 /* rexx */
000002 /* symb02 - if logical not a non-0 or 1 value*/
000003
000004 n = 3
000005 if \n then
000006 say 'you are wrong'
000007
Message:
5 +++ if :n
IRX0034I Error running SMB02, line 5: Logical value not 0 or 1
***