Difference between revisions of "Test for Omitted Argument (CEETSTA)"

From MidrangeWiki
Jump to: navigation, search
(Created page with "Category:API Category:RPG_Prototypes == Summary == The following is an RPG/LE fully free-form prototype for the IBM CEETSTA API to test a parameter for a valid addres...")
 
(Summary)
 
(3 intermediate revisions by 2 users not shown)
Line 4: Line 4:
  
 
The following is an RPG/LE fully free-form prototype for the IBM CEETSTA API to test a parameter for a valid address.
 
The following is an RPG/LE fully free-form prototype for the IBM CEETSTA API to test a parameter for a valid address.
 +
 +
For more information on this API, visit [https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_72/apis/CEETSTA.htm Test for Omitted Argument (CEETSTA) API] (right-click to open link in a new tab).
 +
 +
By [[User:DaveLClarkI|Dave Clark]]
  
 
== Prototype for the CEETSTA API ==
 
== Prototype for the CEETSTA API ==
Line 9: Line 13:
 
//******************************************************************************
 
//******************************************************************************
 
// IBM API to Test a Parameter for a Valid Address
 
// IBM API to Test a Parameter for a Valid Address
 +
//
 +
// EXAMPLE:
 +
// for RTSFA_CCnt = 3 by 1 to (%elem(RTSFA_Codes) - 1);     
 +
//  ParmNumb = RTSFA_CCnt + 3;    // match to a parm number
 +
//  callp CEETSTA(ValidParm: ParmNumb: iFeedback); // test it
 +
//  if %parms >= ParmNumb          // if parm passed       
 +
//  and ValidParm > *zero;        // and not omitted       
 +
//    ...do something...
 +
//  endif;                                                 
 +
// endfor;                                                   
 +
//
 +
// DOCUMENTATION:
 
// https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_72/apis/CEETSTA.htm
 
// https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_72/apis/CEETSTA.htm
 
//******************************************************************************
 
//******************************************************************************

Latest revision as of 16:47, 17 December 2018

Summary

The following is an RPG/LE fully free-form prototype for the IBM CEETSTA API to test a parameter for a valid address.

For more information on this API, visit Test for Omitted Argument (CEETSTA) API (right-click to open link in a new tab).

By Dave Clark

Prototype for the CEETSTA API

//******************************************************************************
// IBM API to Test a Parameter for a Valid Address
//
// EXAMPLE:
// for RTSFA_CCnt = 3 by 1 to (%elem(RTSFA_Codes) - 1);       
//   ParmNumb = RTSFA_CCnt + 3;     // match to a parm number 
//   callp CEETSTA(ValidParm: ParmNumb: iFeedback); // test it
//   if %parms >= ParmNumb          // if parm passed         
//   and ValidParm > *zero;         // and not omitted        
//     ...do something...
//   endif;                                                   
// endfor;                                                    
//
// DOCUMENTATION:
// https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_72/apis/CEETSTA.htm
//******************************************************************************
dcl-pr CEETSTA;
  ValParmAdr            int(10);
  ParmPosNbr            int(10)   const;
  Feedback              char(12)  options(*nopass);
end-pr;