RPG

By kimot, 24 December, 2022
dcl-pr QUSRJOBI extpgm;             
  *n  char(32766) options(*varsize);
  *n  int(10:0) const;              
  *n  char(8) const;                
  *n  char(26) const;               
  *n  char(16) const;               
end-pr;                             
                                    
dcl-ds Job len(86) qualified inz ;  
 Name  char(10) pos(9) ;         
 User   char(10) pos(19) ;        
 Number   char(6)  pos(29) ;        
end-ds ;                            

QUSRJOBI(Job:%size(Job):'JOBI0100':'*':'') ;
By kimot, 24 December, 2022
// Definition of a constant
DCL-C   max_size 100;
DCL-C   max_size CONST(100);
DCL-C   file_name 'example.txt';

// Variable definition 
DCL-S   file_name CHAR(10);      CHAR(bytes)  ... bytes count between 1 and 16,773,104
DCL-C   msg_len 5000;
DCL-S   message CHAR(msg_len);   (5000 bytes)

DCL-S   city VARCHAR(33);        VARCHAR(bytes).. bytes count between 1 and 16,773,104
DCL-S   cmdparm VARCHAR(10:4);   :2 or 4 byte prfx stores the length of the item

DCL-S   some_number INT(10);     INT(digits)  ...

Tags

By kimot, 24 December, 2022
STRDBG PGM(MyLibrary/MyPGM) UPDPROD(*YES) OPMSRC(*YES)
                            Display Module Source                             
                                                                              
Program:   CMPUSRPRF      Library:   ADMDEVTOD      Module:   CMPUSRPRF       
                                                                              
  (Source not available.)