Skip to content

Instantly share code, notes, and snippets.

@victw
Created October 21, 2015 23:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save victw/ac4f03c3150ecbf6a9e2 to your computer and use it in GitHub Desktop.
Save victw/ac4f03c3150ecbf6a9e2 to your computer and use it in GitHub Desktop.
//This is an example of a linear-main with an unhandled divide by zero error
Ctl-Opt Option(*SrcStmt);
Ctl-Opt Main(ILEMSGDIV);
Dcl-PR ILEMSGDIV ExtPgm('ILEMSGDIV');
End-Pr;
Dcl-Proc ILEMSGDIV;
Dcl-S Result zoned(2:0) ;
Dcl-S Zero zoned(1:0) Inz(0);
//Divide by 0 error
Result = 10/Zero;
End-Proc;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment