Difference between revisions of "QCAVFYNM"

From MidrangeWiki
Jump to: navigation, search
(Created page with "= Summary = The Verify Name (QCAVFYNM, QCAVERIFYNAME) API verifies an input value to determine if it is a valid system name. = Prototype for the QCAVFYNM API = <pre> dc...")
 
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
 +
[[Category:API]]
 +
[[Category:RPG_Prototypes]]
 
= Summary =
 
= Summary =
 
The Verify Name (QCAVFYNM, QCAVERIFYNAME) API verifies an input value to determine if it is a valid system name.
 
The Verify Name (QCAVFYNM, QCAVERIFYNAME) API verifies an input value to determine if it is a valid system name.
 
= Prototype for the QCAVFYNM API =
 
= Prototype for the QCAVFYNM API =
 
<pre>
 
<pre>
       dcl-pr ibmQCAVFYNM extpgm('QCAVFYNM');
+
/copy qsysinc/qrpglesrc,QUSEC        
        pNameInfo char(10) const;
+
 
        pFormat char (8) const;
+
dcl-pr ibmQCAVFYNM extpgm('QCAVFYNM');
        pError char (10);
+
  pNameInfo char(10) const;
      end-pr;
+
  pFormat char (8) const;
 +
  pError likeds(QUSEC);
 +
end-pr;
  
      dcl-ds ibmVFYN0100 qualified;
+
dcl-ds ibmVFYN0100 qualified;
        *n int (10) inz(28);
+
  *n int (10) inz(28);
        ccsid int (10) inz(*zero);
+
  ccsid int (10) inz(*zero);
        nametype char (10) inz('*NAME');
+
  nametype char (10) inz('*NAME');
        monocase char (1) inz('0');
+
  monocase char (1) inz('0');
        *n char (1) inz(x'00');
+
  *n char (1) inz(x'00');
        nameoffset int (10) inz(28);
+
  nameoffset int (10) inz(28);
        namelength int (10);
+
  namelength int (10);
        name char (256);
+
  name char (256);
      end-ds;
+
end-ds;
 
</pre>
 
</pre>
  
 +
=Example=
 +
<pre>
 +
dcl-ds error likeds(QUSEC);
 +
 +
ibmVFYN0100.nametype = '*SNAME';
 +
ibmVFYN0100.name = name;
 +
ibmVFYN0100.namelength = %len(%trim(ibmVFYN0100.name));
 +
error.QUSBPRV = 128;
  
[[Category:RPG_Prototypes]]
+
ibmQCAVFYNM(ibmVFYN0100:'VFYN0100':error);   
[[Category:API]]
+
</pre>

Latest revision as of 20:04, 4 December 2018

Summary

The Verify Name (QCAVFYNM, QCAVERIFYNAME) API verifies an input value to determine if it is a valid system name.

Prototype for the QCAVFYNM API

/copy qsysinc/qrpglesrc,QUSEC        

dcl-pr ibmQCAVFYNM extpgm('QCAVFYNM');
  pNameInfo char(10) const;
  pFormat char (8) const;
  pError likeds(QUSEC);
end-pr;

dcl-ds ibmVFYN0100 qualified;
  *n int (10) inz(28);
  ccsid int (10) inz(*zero);
  nametype char (10) inz('*NAME');
  monocase char (1) inz('0');
  *n char (1) inz(x'00');
  nameoffset int (10) inz(28);
  namelength int (10);
  name char (256);
end-ds;

Example

dcl-ds error likeds(QUSEC);

ibmVFYN0100.nametype = '*SNAME';
ibmVFYN0100.name = name;
ibmVFYN0100.namelength = %len(%trim(ibmVFYN0100.name));
error.QUSBPRV = 128;

ibmQCAVFYNM(ibmVFYN0100:'VFYN0100':error);