Free software training Videos

Free software training Videos
https://www.youtube.com/user/VLRTraining

List Of Best WebSites

Showing posts with label rpgle. Show all posts
Showing posts with label rpgle. Show all posts

Saturday, 5 January 2013

rpg 4 Operation Codes in as400

rpg 4 Operation Codes in as400
To perform any action in RPG or RPG - ILE you need to provide an OpCode. The OpCode also written as Op-Code is actually a short form of Operation Code.
http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508430.htm 
http://www.letsas400.com/ile_rpg_iv/rpgle_opcodes

  1.  DSPLY - Display Function
  2.   DUMP - Program Dump
  3.   ELSE - Else
  4.   ELSEIF - Else If
  5.   ENDyy - End a Structured Group
  6.   ENDSR - End of Subroutine
  7.   EVAL - Evaluate expression
  8.   EVALR - Evaluate expression, right adjust
  9.   EXCEPT - Calculation Time Output
  10.   EXFMT - Write/Then Read Format
  11.   EXSR - Invoke Subroutine
  12.   EXTRCT - Extract Date/Time/Timestamp
  13.   FEOD - Force End of Data
  14.   FOR - For
  15.   FORCE - Force a Certain File to Be Read Next Cycle
  16.   GOTO - Go To
  17.   IF - Else If
  18.   IFxx - If
  19.   IN - Random Retrieval from a File
  20.   ITER - Iterate
  21.   KFLD - Define Parts of a Key
  22.   KLIST - Define a Composite Key
  23.   LEAVE - Leave a Do/For Group
  24.   LEAVESR - Leave a Subroutine
  25.   LOOKUP - Look Up a Table or Array Element
  26.   MHHZO - Move High to High Zone
  27.   MHLZO - Move High to Low Zone
  28.   MLHZO - Move Low to High Zone
  29.   MLLZO - Move Low to Low Zone
  30.   MONITOR - Begin a Monitor Group
  31.   MOVE - Move
  32.   MOVEA - Move Array
  33.   MOVEL - Move Left
  34.   MULT - Multiply
  35.   MVR - Move Remainder
  36.   NEXT - Next
  37.   OCCUR - Set/Get Occurrence of a Data Structure
  38.   ON-ERROR - On Error
  39.   OPEN - Return File Open Condition
  40.   ORxx - Or
  41.   OTHER - Otherwise Select
  42.   OUT - Write a Data Area
  43.   PARM - Identify Parameters
  44.   PLIST - Identify a Parameter List
  45.   POST - Post
  46.   READ - Read a Record
  47.   READC - Read Next Changed Record
  48.   READE - Read Equal Key
  49.   READP - Read Prior Record
  50.   READPE - Read Prior Equal
  51.   REALLOC - Reallocate Storage
  52.   REL - Release
  53.   RESET - Reset
  54.   RETURN - Return to Caller
  55.   ROLBK - Roll Back
  56.   SCAN - Scan for Characters
  57.   SELECT - Begin a Select Group
  58.   SETGT - Set Greater Than
  59.   SETLL - Set Lower Limit
  60.   SETOFF - Set Indicator Off
  61.   SETON - Set Indicator On
  62.   SHTDN - Shut Down
  63.   SORTA - Sort an Array
  64.   SQRT - Square Root of Expression
  65.   SUB - Subtract
  66.   SUBDUR - Subtract Duration
  67.   SUBST - Get Substring
  68.   TAG - Tag
  69.   TEST - Test Date/Time/Timestamp
  70.   TESTB - Test Bit
  71.   TESTN - Test Numeric
  72.   TESTZ - Test Zone
  73.   TIME - Convert to Time
  74.   UNLOCK - Unlock a Data Area or Release a Record
  75.   UPDATE - Modify Existing Record
  76.   WHEN - When True Then Select
  77.   WHENxx - When True Then Select
  78.   WRITE - Create New Records
  79.   XFOOT - Sum Array Expression Elements
  80.   XLATE - Translate
  81.   Z-ADD - Zero and Add
  82.   Z-SUB - Zero and Subtract

  • ACQ (Acquire)
  • ADD (Add)
  • ADDDUR (Add Duration)
  • ALLOC (Allocate Storage)
  • ANDxx (And)
  • BEGSR (Beginning of Subroutine)
  • BITOFF (Set Bits Off)
  • BITON (Set Bits On)
  • CABxx (Compare and Branch)
  • CALL (Call a Program)
  • CALLB (Call a Bound Procedure)
  • CALLP (Call a Prototyped Procedure or Program)
  • CASxx (Conditionally Invoke Subroutine)
  • CAT (Concatenate Two Strings)
  • CHAIN (Random Retrieval from a File)
  • CHECK (Check Characters)
  • CHECKR (Check Reverse)
  • CLEAR (Clear)
  • Clearing Variables
  • Clearing Record Formats
  • CLEAR Examples
  • CLOSE (Close Files)
  • COMMIT (Commit)
  • COMP (Compare)
  • DEALLOC (Free Storage)
  • DEFINE (Field Definition)
  • *LIKE DEFINE
  • *DTAARA DEFINE
  • DELETE (Delete Record)
  • DIV (Divide)
  • DO (Do)
  • DOU (Do Until)
  • DOUxx (Do Until)
  • DOW (Do While)
  • DOWxx (Do While)
  • DSPLY (Display Function)
  • DUMP (Program Dump)
  • ELSE (Else)
  • ELSEIF (Else If)
  • ENDyy (End a Structured Group)
  • ENDSR (End of Subroutine)
  • EVAL (Evaluate expression)
  • EVALR (Evaluate expression, right adjust)
  • EXCEPT (Calculation Time Output)
  • EXFMT (Write/Then Read Format)
  • EXSR (Invoke Subroutine)
  • EXTRCT (Extract Date/Time/Timestamp)
  • FEOD (Force End of Data)
  • FOR (For)
  • FORCE (Force a Certain File to Be Read Next Cycle)
  • GOTO (Go To)
  • IF (If)
  • IFxx (If)
  • IN (Retrieve a Data Area)
  • ITER (Iterate)
  • KFLD (Define Parts of a Key)
  • KLIST (Define a Composite Key)
  • LEAVE (Leave a Do/For Group)
  • LEAVESR (Leave a Subroutine)
  • LOOKUP (Look Up a Table or Array Element)
  • MHHZO (Move High to High Zone)
  • MHLZO (Move High to Low Zone)
  • MLHZO (Move Low to High Zone)
  • MLLZO (Move Low to Low Zone)
  • MONITOR (Begin a Monitor Group)
  • MOVE (Move)
  • MOVEA (Move Array)
  • Character, graphic, and UCS-2 MOVEA Operations
  • Numeric MOVEA Operations
  • General MOVEA Operations
  • MOVEL (Move Left)
  • MULT (Multiply)
  • MVR (Move Remainder)
  • NEXT (Next)
  • OCCUR (Set/Get Occurrence of a Data Structure)
  • ON-ERROR (On Error)
  • OPEN (Open File for Processing)
  • ORxx (Or)
  • OTHER (Otherwise Select)
  • OUT (Write a Data Area)
  • PARM (Identify Parameters)
  • PLIST (Identify a Parameter List)
  • POST (Post)
  • READ (Read a Record)
  • READC (Read Next Changed Record)
  • READE (Read Equal Key)
  • READP (Read Prior Record)
  • READPE (Read Prior Equal)
  • REALLOC (Reallocate Storage with New Length)
  • REL (Release)
  • RESET (Reset)
  • Resetting Variables
  • Resetting Record Formats
  • Additional Considerations
  • RESET Examples
  • RETURN (Return to Caller)
  • ROLBK (Roll Back)
  • SCAN (Scan String)
  • SELECT (Begin a Select Group)
  • SETGT (Set Greater Than)
  • SETLL (Set Lower Limit)
  • SETOFF (Set Indicator Off)
  • SETON (Set Indicator On)
  • SHTDN (Shut Down)
  • SORTA (Sort an Array)
  • SQRT (Square Root)
  • SUB (Subtract)
  • SUBDUR (Subtract Duration)
  • Subtract a duration
  • Calculate a duration
  • Possible error situations
  • SUBDUR Examples
  • SUBST (Substring)
  • TAG (Tag)
  • TEST (Test Date/Time/Timestamp)
  • TESTB (Test Bit)
  • TESTN (Test Numeric)
  • TESTZ (Test Zone)
  • TIME (Retrieve Time and Date)
  • UNLOCK (Unlock a Data Area or Release a Record)
  • Unlocking data areas
  • Releasing record locks
  • UPDATE (Modify Existing Record)
  • WHEN (When True Then Select)
  • WHENxx (When True Then Select)
  • WRITE (Create New Records)
  • XFOOT (Summing the Elements of an Array)
  • XLATE (Translate)
  • Z-ADD (Zero and Add)
  • Z-SUB (Zero and Subtract)

    Declaration Types in rpg 4 program

     Blank                                                            
         Leave the field blank if this specification does not define a
         data structure, a constant, a standalone field, an array, or a
         table.                                                       
                                                                      
     DS                                                               
         Type DS if this specification defines a data structure.      
                                                                      
     C                                                                
         Type C if this specification defines a constant.             
                                                                      
     PI                                                               
         Type PI if this specification defines a procedure interface. 
                                                                      
     PR                                                               
         Type PR if this specification defines a prototype for a call.
     S                                                                
         Type S if this specification defines a standalone field, an  
         array, or a table.                                           

    Thursday, 29 November 2012

    data types in rpg

    Blank                                                            
        Leave the field blank for a character field, or a packed decimal
        standalone field, or a zoned decimal field data structure    
        subfield.  For zoned or packed data types, the decimal positions
        field must be nonblank.                                      

    A
        Type A if this is a character field.                         

    B
        Type B if this is a fixed binary field.                      

    D
        Type D if this is a date field.                              

    F          

         Type F if this is a floating-point field. 
                                                   
     G                                             
         Type G if this is a graphic character field.
                                                   
     I                                             
         Type I if this is a signed integer field. 
                                                   
     N                                             
         Type N if this is an indicator field.     
                                                   
     P                                             
         Type P if this is a packed decimal field. 
                                                   
     S                                             
         Type S if this is a zoned field.          
                                                   
     T

         Type T if this is a time field.           
                                                  
     U                                            
         Type U if this is a unsigned integer field.
                                                  
     Z                                            
         Type Z if this is a timestamp field.     
                                                  
     *                                            
         Type * if this is a pointer field.       
                                                  
                                 

    RPG IV Specifications

    There are seven types of RPG IV specifications. Each specification type is optional.
    Main source section:
    1. Control specifications provide the compiler with information about generating and running programs, such as the program name, date format, and use of alternate collating sequence or file translation.
    2. File description specifications describe all the files that your program uses.
    3. Definition specifications describe the data used by the program.
    4. Input specifications describe the input records and fields used by the program.
    5. Calculation specifications describe the calculations done on the data and the order of the calculations. Calculation specifications also control certain input and output operations.
    6. Output specifications describe the output records and fields used by the program.
    Subprocedure section:
    1. Procedure specifications mark the beginning and end of the subprocedure, indicate the subprocedure name, and whether it is exported.
    2. Definition specifications describe the local data used by the subprocedure.
    3. Calculation specifications describe the calculations done on both the global and local data and the order of the calculations.
    Referance
    RPG 4 ONLINE TRAINING

    rpgle training

    history of rpg

    1. RPG is a high-level programming language (HLL) for business applications.
    2. RPG_REPORT PROGRAM GENERATOT
    3. Developed by IBM in 1959 as the Report Program Generator 
    4. The current version, RPG IV (a.k.a. ILE RPG)
    5. RPG II was introduced with the System/3 series of computers.
      RPG III was created for the System/38 and its successor the AS/400.
      DE/RPG or Data Entry RPG was exclusively available on the IBM 5280 series
      RPG/400 was effectively RPG III running on AS/400.
      RPG IV (a.k.a. RPGLE and ILE RPG[2]) was released in 1994  
    REFERANCE
    RPGLE online TRainong