IBM AS/400 manual

Page 2
Image 2
Contents ÉÂÔ Page ÉÂÔ Third Edition May 1999 Contents SQL WithService Program ChapterVi ILE ExceptionWorking with Files and Devices ViiRPG FilesAppendixes ILECopy IndexAny DoesApply LawMarks Trademarks and ServiceProgramming Interface Information Trademarks Or se Marks OthersPage Xiv ILE RPG for AS/400 Programmers Guide Who Should Use This About This GuideGuide IIIHow to Send Your Comments Prerequisite and Related InformationUCS-2 What New ThisRelease? RiscINZ*EXTDFT INZ*USERElement CCSID*GRAPH Since To this GuideChanges For AS/400Xxii ILE RPG for AS/400 Programmers Guide ILE RPG Introduction Program creation strategiesILE RPG for AS/400 Programmers Guide Input Specifications RPG IV SpecificationsControl Specifications RPG IV OverviewThe.When You Let Compiler Provide Logic For Your Cycle ProgrammingFirst Subprocedure logicIndicators LastExample of an ILE RPG Operation CodesProgram Example of an ILE RPG ProgramSecond file File Description SpecificationsProgram Chain Output SpecificationsBonus EvalILE RPG SubprocedureHeading Lines That Contain Constant String Payroll NotFqsysprt Printer Entire Source ProgramReturn 10U 0 Value RateBonus PAY Not *IN99 EvalOS/400 System Commonly Used Control Language CommandsInteracting with the System System LibrarySystem Offers Full Set Tools That You May find usef Application Development ManagerILE R ServicesAS/400 Tools Overview of the RPG IV Programming15 Language AS/400 Tools RPG Programming in ILE RPG Programming in ILEProgram Creation ILE RPG, ILE C, ILE CoboCRTSRVPGM, and Crtpgm commands. They can also Specified Language You can CreateProgram Call Procedure Followed Zero Or more subproceduresProgram Management ILEWhile the progra Source DebuggingBindable APIs AS/400 now supports multithreading. ILE Accesses Are Also ThreadsafeMultithreaded Applications Does Not DirectlyRPG Programming in ILE Method Program Creation StrategiesStrategy 1 OPM-Compatible Application OPM-Compatible ApplicationExample of OPM-Compatible Program Effect of ILEStrategy 2 ILE Program ILE Program Using CrtbndrpgRelated Information XYZ ILE Program Using Crtbndrpg Example of ILE ProgramShows Run-time view Application in which an ILE CL pr Calls Although Actual Storage Not Deleted As itStrategy 3 ILE Application ILE Application Using CrtrpgmodUsing Scenario Single-Language ILE ApplicationSingle-Language Application Using Crtrpgmod and Crtpgm Mixed-Language ILE Application ScenarioAdvanced Application Scenario Strategy to Avoid Strategy to AvoidActivation Group Procedures Creating an Application Using Multiple ProceduresMultiple Procedures Module OverviewLike with Multiple Dures Prototyped CallsWhat a module might ModuleNumToChar Using prototyped calls you can call with the same syntaxFmtCust Name 100A Address Numparm 30P 0 ValueMade Expression Shows Call Example of Module withOrder to format Name Address Properly MultipleISO Move Example of Module with Multiple ProceduresDDS ElseProcedures ZIP ThatSTATE, ZIP Module, by Coding ModuleMeaning that it consists only of subprocedur Keyword on the control specificatiEntire Arrsrpt Program Fcustfile Disk Fcustrpt PrinterCallp Copy QRPGLE,CVTPROCPIcustrec EndsrISO Move Duedate Following AboutArrsrpt Return Else EndifDDS General Considerations When Coding Module with multiple procedures You Will WantCoding Considerations Coding ConsiderationsContain a program entry procedure and only a Main Procedure ConsiderationsSubprocedure Considerations Cannot Contain Bound Procedure CallsFor Further Information Main ProceduresSubprocedures ForPrototyped Call For Further InformationApplication Running anILE RPG for AS/400 Programmers Guide Source StatementsFile Creating a LibraryEntry Utility Using the Source Entry UtilityUsing SEU IPP IPCIpcx IpprPress F3 Exit To the Exit display. Type Y Yes to save SavedStatements Calculation specification Start Your Using SQL StatementsUsing SQL Statements DB2 UDBUtilitymanual for Information about How SEU handles Reference for moreRefer toADTS thefor AS/400 Source Entry Statement Syntax CheckingWith CommandUsing the Crtbndrpg Command You can use the Crtbndrpg Command interactively Batch From Shows Their Default ValuesList Debugged Using a Source View Program TypeCreating a Program for Source Debugging Creates View similar Compiler listingThis example you create Program BindingCreating a Program with Static Display Module Source¹ Wrkjob CommandBnddir ¹ Wrkoutq queue-namePayroll Register Date Disk Fqsysprt PrinterChain Emprec Not *IN99 Empname EmprateListing Using a Compiler ListingUsing a Compiler Listing Obtaining a CompilerCompiler Listing Customizing a Compiler ListingCustomizing a Page Heading XrefIndenting Structured Operations Last UpdateCustomizing the Spacing PAGE/LINEEither Create ErrorsListing This Will Add Sec Level text to the messages listed MessageFLD1 Using In-Line Diagnostic MessagesFLD2 SEUBrowsing a Compiler Listing Using SEU Correcting Run-time ErrorsUsing Additional-Diagnostic Messages Source Entry UtilityCoordinating Listing Options with Debug View Options Using a Compiler Listing for MaintenanceExpdds these are the defaults Specified, and in the column labeled as Sta MentArea DataAccessing the Returncode Data Area Accessing the Returncode Data Area Module Object CommandsCreating ChapterYou Create a Module using the Create CommandUsing the Crtrpgmod Creates a compiler listing which Creating a Nomain ModuleRequested Crtrpgmod MODULEMYLIB/TRANSSVC SRCFILEMYLIB/QRPGLESRCFiles ¹ DspjobThen Select option Display4 spooled Related Files N/A Related Source TransrptEndsl OtherEndsl Return Prod Creating a Module forPrototype for TransInc Prototype for ProdNameQTY Ftrnsdta Disk Fqsysprt PrinterItrnsrec Additional Examples Related CL CommandsRPG, mainthe procedureis ModulesBinder Binding Modules into a ProgramBinding Modules into a Program Into a UsingCommand CrtclmodGroup Modules ExportConcepts for TrptUsing a Binder Listing Using a Binder ListingChanging a Module or Program Changing a Module orUsing the Updpgm Command LevelReducing an Objects Removing ObservabilitySize Changing a Changing a Module or Program Service Program Overview Creating a Service ProgramService Program Overview Dspsrvpgm Payroll DETAIL*PROCEXP *DATAEXPCreating a Service Program Strategies for Creating Service ProgramsCreating a Service Program Using Crtsrvpgm Using CrtsrvpgmChanging a Service Program Service Program Using CrtsrvpgmAPI Sample Service ProgramSample Service Program OPTIONS*VARSIZE OpdescConst OPTIONS*VARSIZE CeedodBegsr Eval ExsrEnddo DIV MVRStrpgmexp Signaturecvthex Export Symbolcvttohex Endpgmexp Creating the Service ProgramParameters Crtsrvpgm command Input String Charactern Output Hex string Character2 * nCrtrpgmod MODULEMYLIB/CVTHEXPGM SRCFILEMYLIB/QRPGLESRC Binding to a ProgramCreate the program by typing Call CvthexpgmExcept Copy RPGGUIDE/QRPGLE,CVTHEXPRClear Callp ClearUpdating the Service Sample Binder ListingBasic Binder listing for Cvthexpgm Sample Service Program Running a Program Running a Program Using the CL Call CommandRunning a Program Using 103Passing Parameters using 106 shows DDS That is Referenced by the EMPRPT2 Source Running a Program From a ApplicationRunning a Program From a Menu-Driven Application Selecting Option Design menusRPGCHG, or Rpgadd respectively You Run Menu by EnteringRpginq Replying to Run-Time Inquiry Messages CommandRunning a Program Using User-Created Replying to Run-Time InquiryManaging Activation Ending an ILE ProgramGroups Wheresequence-noGroup Managing Activation GroupsSpecifying an Activation OFFRunning in the OPM DefaultCompatibility ActivationGroup Reclaim Resources CommandDeleting an Activation Activation Groups SuchManaging the Default Heap Using RPG Operations Referenceto AbridgedDsply Managing Dynamically-Allocated StorageINZ*NULL Elem@ = next@ AddName 40AAlloc = *NULL Namelen = %len%trimrnameNull DOW Heap Storage Problems DeallocBindable APIs RPG procedure ThisManaging Your Own Heap Call SomepgmSeeAPI theReference DynarrayCeecrhp Copy DynarriCeegtst Initalloc SubsallocADD Initalloc ResetDynainit Enddo DynainitExsr Realloc Endif Eval Dynaset ExportIfgt Realloc BegsrDynaget Export Else ADD SubsallocEnddo Endsr Dynaset IfleGet Heap Storage CrtsrvpgmProgram/Procedure Call Overview Calling Programs and ProceduresProgram/Procedure Call Overview 127Static Calling ProceduresCalling Programs Stack Call StackCall stack That Most r Stack Entry is Bottom Recursive CallsRecursive calls are only allowed For Parameter-Passing Considerations Recent CallerProgram/Procedure Call Overview RPG Prototyped calls Are also Known Using the Callp Operation¹ Subprocedures in the same module Callp31A Using a Prototyped CallCalling within an Expression 30PParameter Passing Styles Examples of Free-Form CallPassing Prototyped Parameters Passing by ReferencePassing by Value Figures belowDocalc Export PassingExtprocdocalc DocalcCeetsta Extprocceetsta Using Operational DescriptorsILE CEE API OPTIONS*OMIT When Calling Procedure You may sometimes want Leave Out ParOmitting Parameters OmitOPTIONS*OMIT*NOPASS Passing *OMITLeaving Out Parameters API QcmdexcPassing Prototyped Parameters Checking for the Number PsdsEval Address = %TRIMRCSTREET# + + Copy FmtaddrpOPTIONS*NOPASS Const Trimrprovince ReturnEndif Endsr Begsr MovelCheck Ctdata 144OPTIONS*NOPASS 5P 0 DIM2 CtdataParameters To create PRTADDR, using the source in on page 144, typPassing Less Data Than Required To create the program, PRTADDR, typeEffect Order of EvaluationInterlanguage Calls To obtain Actual Returned value InterlanguageCalling Considerations DCL &RET2 TYPE*CHAR LEN2 DCL &RET1 TYPE*CHAR LEN1Call Operations Fixed-FormOperation Operation extender is Used With Using the Fixed-Form Call OperationsFor Callb only Operations Passing Parameters Using ParmExamples of Call and Callb OperationPlist Using the Plist OperationFixed-Form Call Operations Normal End Returning from a Main ProcedureProcedure Returning from a CalledEntry Parm operation is perfor Returning from a Called Program or ProcedureAbnormal End For the AS/400 Reference Returning from a SubprocedureWithout RetuSubprocedure ends abnormally Using Bindable APIsReturning using ILE Bindable APIsCalling a Graphics Routine Examples of Using Bindable APIsCalling a Graphics Routine CeeutxMultithreading Considerations Calling Special RoutinesMultithreading Considerations TheGDDM Programming GuideShare Data How toAcross How Example, consider the situation where two procedures CalledWill Wait For MOD1 Unlock. Procedures Not To Avoid DeadlockMOD2 ConsiderationsPROC1 MOD1Debugging and Exception Handling 161ILE RPG for AS/400 Programmers Guide ILE Source Debugger Debugging ProgramsILE Source Debugger 163Equate Debug CommandsAttr EvalWatch TbreakThread FindPreparing a Program for Order Debug it usingPreparing a Program for Debugging SourceCrtbndrpg PGMMYLIB/DEBUGEX SRCFILEMYLIB/QRPGLESRC Creating a Root Source ViewOptions On the Dbgview parameter for Either Crtrpgmod MODULEMYLIB/DBGEX SRCFILEMYLIB/QRPGLESRCDbgview Listing ViewView ModuleView Program for DebuggingOPMSRC*NO Starting the ILE SourceStarting the ILE Source Debugger Start a Debug Session for the sample debug program Debugex Setting Debug OptionsStrdbg Example IntoSET OPM source debug support field,Adding/Removing Programs from a Debug Session Example of Adding a ServiceExample of Removing ILE Programs from a Debug Session Debug SessionCobol Viewing the Program SourceViewing the Program Source Lstdbg ILELibl PGM Viewing a DifferentDbgex Several Different views Changing the View of aModule CprocSpecified You Not Erate Breakpoints Specify Setting and Removing BreakpointsSetting and Removing Breakpoints OPTION*NODEBUGIODebug Command to set a job breakpoint Setting and RemovingWith the source positioned at the line where the breakpoint BreakpointsBreakpoint Setting anJob Debug Setting and Removing Unconditional Thread BreakpointsDebug Command Sets a Thread breakpo Single Current Greater Than Equal To oneJob BreakpointsConditional Breakpoint Example of Setting a Conditional Job Breakpoint Using F13Line Work with Module BreakpointsBreak 128 when BigDate=1994-09-30 CommandSetting a Conditional Job Breakpoint Using National Language Sort Sequence NlssControl Spec Tion Is not available Sort SequenceMain procedure or one of the subprocedures On the debug command lineOne procedure per module,procedurethe -namecan Either VariaSet Breakpoint For Module with This Example Statement View Is used to Set Breakpoint ForSet a breakpoint for Module With Listing, typeProcedurevariables-name and statement-number Setting and Removing Conditional Thread BreakpointsUsing the Work with Module Breakpoints Display Main Procedure ExitRemoving All Job Debug CommandsSetting and Removing Watch Conditions ConditionsProgram statemen Characteristics of WatchesDisplay You Debug One Job From AnotherWatch Setting Watch ConditionsOn the debug command line, without any parameters SalaryPayroll ¹ To specify a variable or expression to be watched, typePayroll ABC PGM Enddbg Displaying Active WatchesRemoving Watch Conditions IPLBlankDisplay Module Source Example of Setting a Watch ConditionExample of Setting a Watch Condition Display as shown below. InsteadStepping Through ObjectStepping Through the Program Object Subroutines You Can Over Into SubproceduresStepping Over Call Statements TIP Stepping Into Call StatementsStep Into From Program F22This example, you use F22 Step Into to step Into the OPM DebugexStep completed at line This example, you use F22 Step Into to Subpr Which ModuleInputParm Else SwitchDisplaying Data and Expressions On page 201 shows Use ConstBased Fields Unexpected Results when Evaluating VariablesScalar Fields RPG Definition Date, Time, Timestamp FieldsDisplaying the Contents of an Array Displaying the Contents of a TableDisplaying Data Structures Eval DS12Displaying Indicators Which is discussed BelowDisplaying Fields as Hexadecimal Values Character FormatBy Pointers DataDisplaying Variable-Length Fields Displaying Null-Capable FieldsSTRING=%SUBSTRBIGDATE 1 4 = String = 1ABCD6Fields Changing the Value of Fields = AbcdefDisplaying Attributes of a Field Or CommandEquating a Name with a Field, Expression, or Command Equating a Name withExamples ForSample Source for Debug Examples To create the program DEBUGEX, type Program using Source 215, typeSample Source for Debug Examples First ModuleInzabcde DIM3 CtdataDS1 DS2Call Rpgpgm Occur DS2 MovePlist Parm Entry Plist Parm Dump SetonElse Eval Dsply SetonSource for C Procedure cproc. cproc is called by Dbgex Exception Handling Overview Handling ExceptionsException Handling Overview 217Describes Status Work Being done by a program Indicates That Severe error has been detectedProgram Procedure P1 is Contro Boundary Call stException Message Active onException Handling within Dure will Only Handle Errors That SubprocedureILE RPG Exception Handling Operation For OPM PGM CException Handler Priority Using Exception HandlersUsing Exception Handlers Nested ExceptionsPGM2 For other Types MessagesEscape Message PRC1PGM1 Example of Unhandled Function CheckOperation as well PGM2, each Containing a procedurFor More Information Optimization See Changing Level Using RPG-Specific HandlersOptimization Considerations Built-in-functionsExtender This Section Provides Some Examples How to Use Each These RInfsr error Subroutines, on Exsr Operation Code Infds ILE RPG For AS/400 Reference providesOperation. If Either Using an Error SubroutineProgram Error Explicitly cUsing a File Error Infsr Subroutine PrdInfds PrdStatus INFSRPrdInfsr INFDSPrdInfdsDisk Ftrnbacklg O Fprint Printer StatusInfds After Keyword Using a Program Error SubroutinePosition Definition Specification Enter Operation With Factor EntryPssr Begsr ParmsProc Body of Code Goes Here Move GetinTAG DIV If this is a divide-by-zero error, add 1 to the divisorIf control reaches ENDSR, the procedure will fail Try again Err =Which is designed to ge Exceptions Order Show how to avoid looping WithinPssr SubrouElse ADD After the ElseMove Inlr Specifying a Return Point OFLILE Condition Handlers Using a Condition HandlerILE Condition Handlers HandlersLIKECondTok 132Printer Rpghdlr Action 10I OutCondTok LIKECondTokCondition Handler Shows Source For ProcedureIs registered Procedure Parameters Include Pointer Communication Area Which Contains PointerARR1 CeehdluSDS Noopt ProcptrNoopt ProcSubst Begsr CallpCeertx Cancel Handlers244 Ceeutx ILESubproc Pssrdsply Procedure to SubProc will not failPssr has a Return operation, so the call from the main Return EndsrParm Omit INZ0 StaticCallb Ceertx Parm Select WhenCancel Hdlr Dsply Msg CanHdlr RPG usingCondition Handlers Enabled Using Likely Occur WithCondition Handler that Ignores CPF4906 Endif ReturnHandle information or warning messages, otherwise percolate MsgSev = WarningILE RPG for AS/400 Programmers Guide Obtaining a Dump Using the Dump Operation CodeUsing the Dump Operation Code Obtaining an ILE RPG Formatted DumpDoes not Occur Formatted Dump¹ If a Dump operation is bypassed By a Goto operation, Dump Example of a Formatted Dump QsplAgement DumpPart 1 of 2. Data section of Formatted Dump 125 Part Data section of Formatted Dump Beginning of user variables, listed in alphabetical order, Order Which they are defined GapsWorking with Files and Devices 259ILE RPG for AS/400 Programmers Guide Associating Files with Input/Output Devices Defining FilesAssociating Files with Input/Output Devices 261Operation Code is Valid Only Compilation Time CertainOperation Device Dependent Device dependency Is that WriteTypes of File Descriptions Naming FilesTypes of File Descriptions Files Using Files withProgram-Described Example of Some Typical Relationships betweenOPTION*EXPDDS Defining Externally Described FilesDefining Externally Described Renaming Field Names Renaming Record-Format NamesIgnoring Record Formats Nbrofcharreplaced. FigureDescription Using Input SpecificationsModify an ExternalFiles You Then Fixed Name Specification Will Get ErrorIndicator Record Used Program This Example FieldUsing Output Specifications Is written Level CheckingFor Character Fields zero ALLRPG I/O Operations Defining Program-Described FilesData Management Operations and ILE RPG I/O Operations SEQ SpecialData Management Operations and ILE RPG I/O Operations DeleteOverriding and Redirecting File Input and Output File ConsiderationsOverriding and Redirecting File Input and Output 273Example of Redirecting Input OutputInput Output FMT1Data Management manual File LockingFile Locking Program Can Chang Allocate ObjectRecord Locking Record LockingSharing an Open Data See UsingPath Control For More InformationProgram Details System Open Options Allowed for Each SpoolingSpooling Can SpecifyOutput Spooling Program VersusSRTSEQ/ALTSEQ Physical Files and Logical Files AccessingDatabase Files Data Files and SourceAccess Path Using Externally Described Disk FilesRecord Format Specifications Using Externally Described Disk FilesUnique Contained Physical file CUSMSTP, which is IdentifiedUnique Cust Checkmf Dstref Distribution Application Field ReferenceBasdat Edtcdey Addr ReffldnameCity Valid Keys for a Record FileDisk EdtcdejReferring to ArgumentsPartial Key Record Blocking and Unblocking Used,Indexed File Using Program-Described Disk FilesUsing Program-Described Disk Files ValidKeyword specifies position 15 as the starting po Logical file ORDDTLL. For the two fields10AIDISK Sequential FileRecord Address File Move Order KEY ChainRelative Record Numbers Methods for Processing Disk FilesLimits Records Methods for Processing Disk FilesADD Consecutive ProcessingSubsequent Text Describes Each Method Processing Database Programming Sequential-by-Key ProcessingExamples of Sequential-by-Key Processing Database Programming manualExample, the employee master record Weekly hours workedFEMPL1 Disk YTDRPT1 Related Files EMPL1Fprint Iemprec IrcweekSeton Endif YTDRPT2 Related Files EMPL1Setoff Read EMPL1 Goto Eofend Move Enum Empno Eofend TAG SetonFor Processing Disk Files Records Are Processed as Matching records WithSUB Enhrs Ovthrs ADD Tothrs Totovt SetoffADD Ehwrk Tothrs ADD Ovthrs Totovt Seton Endif OprintEmstupd Descriptions Random-by-Key ProcessingExample of Random-by-Key Processing NnhrsFchange Sequential-within-Limits ProcessingChange Examples of Sequential-within-Limits Processing Disk FilesFlimits Disk ESWLIM1 Related Files EmpmstLimits 3PIDISK KEYLOC1 FprintFempmst Disk Fprint Relative-Record-Number ProcessingESWLIM2 Related Files Empmst Valid File Operations Valid File OperationsZ/F Recno Starting and Ending Commitment Using Commitment ControlUsing Commitment Control Abridged for See theBackup and Recovery manualCommitment Control Locks Specifying UsingFiles For Concepts,Journal Example of Using Commitment ControlReceiver Control This command calls the program ReviseUpdate Mastrec Tranrec Disk Commit FtransDDM Files CycleDDM Files Pre-V3R1 DDM ReferDistributedto the DataDDM Files Attached AccessingTypes of Device Files Chapter 315Specifying Printer Files Accessing Printer DevicesAccessing Printer Devices Handling Page OverflowOverflow On an and notline,anoverflowthe linelineis OANL2 Example of Printing Headings on EveryExample of Printing a Field on Every AccountOverf Using the Fetch-OverflowRoutine in Program-Described Files Overflow Printing Setting of the Overflow Indicator Fetch Overflow Example of Specifying Fetch OverflowOPM Prtctl data structure Changing Forms ControlFile Forms Values Contained First four subfieldsDat Print Accessing Tape DevicesAccessing Tape Devices File Name Associated Data Structure isUsing Sequential Files Accessing Display DevicesUsing Sequential Files OvrdbfFile Using Special FilesUsing Special Files Program nameDescription ErrorStatus FLD Example of Using a Special FileSpecial Pgmnameuserio Spcl Plist Parm FLD1 Movel Hello Write Excptn Outbuf SetonUserio Are Added To the end of the RPG-created Parameter listProgram User-written routine Function Using Workstn FilesUsing Externally Described Workstn Files ¹ Output On page 333 shows an example of the DDS for a display-devicOverlay RefdstrefPrompt DescrpDevice Specifying Function Key Indicators on Display Device FilesSpecifying Command Keys Display Using Subfiles Processing an Externally Described Workstn FileField SfileName Search Use of SubfilesYou press Specified Function key During Read SFL TEXTSubfile RecordSubfil Using Program-Described Workstn FilesUsing Program-Described Workstn Files Using a Program-Described WithName Input SpecificationsCalculation Specifications FormatOutput File Valid Workstn File OperationsInput File Combined FileWrite Operation Exfmt OperationRead Operation Multiple-Device FilesKeyword. This field Initialized Is updatedDevid Multiple-Device Files Database Physical File Example of an Interactive ApplicationDatabase Physical File 345Display Device InquiryDDS for a Main Menu InquiryCusmain RPG Source Main menu will appear as in on Using Crtrpgmod Create Program By enteringFirst option specifies that the first module in the list CUSMSTL1 DDS for a File MaintenanceFile Maintenance LogicalDisplay DeviceEdtcdez Mode70DATE Edtcdey Record Format contains Constant Customer File Maintenance Cusmnt RPG SourceElse Move OFF Subroutine Addsub PurposeAddsub Begsr Cstkey Chain CMLREC1 Not *IN50 Move Move Delete Mode When Move ADD Mode WhenMove Update Mode When Move Display Mode Endsl MODE1 EndsrCstinq Display ModeCustomer File Maintenance 22302130/94 Customer 00007 On page 357 a new customer is added to the Customer Mast223106 223143Bathurst Avenue ADD ModeDelete Mode Search by Zip Code ZipSearch by CodeFile SZIPMENU. IT has SzipmenuRelated Files CUSMSTL2 REFCUSMSTL2 Printqsysprt IndaraIndicates when to display Subfile When Indicator 55 is Schzip RPG Source ADD Zero Recnum Endsr Write Subctl Move OFFMove OFF Routine Fills Subfile Record Read From File indicator 71 on thZip Subfile Is written to the screen as shown in onFor Database File Used This Program Defines one reco Search and Inquiry by NameSearch and Inquiry by Name Identifies Name field Key FieldsFOOT2 Device FileSnammenu DDS for a Display SubfileThis Program Prompts the User for the Customer Records Using SubfilesSchnam RPG Source File by the Setll OPERATION. then IT DisplaysExample of an Interactive 367Application Recnum File Indicator On the Read operationFile Record Count IncJudah Gould Gould Inquiry by Name233948 30/94 Customer 00012 Name YorktownAppendixes 371ILE RPG for AS/400 Programmers Guide Appendix RPG/400 ILEFor AS/400 DifferencesRunning Debugging and ExceptionRPG III Will issue the RNQ1022 inquiry Message Will issue the RNQ1222 inquiry MessageRPG/400 Will Issue Will IssueCompiler Such Programs Will Get Compilation errors Dbcs Data in Character FieldsDifferences Between OPM RPG/400 379 Appendix B. UsingConversion Overview HurryFile Considerations File Record LengthUSE Log FileConversion Aid Tool Requirements Converting Your Source Wont DoConverting Your Source AidCvtrpgsrc Command Curlib FromfileLibl FrommbrNone TofileQrpglesrc TombrCvtrpt ExpcpyYES Seclvl YES InsrtplSource DefaultsConverting a Member Using Converting Some Members Converting All Members in a FilePerforming a Trial Conversion Cvtrpgsrc FROMFILEOLDRPG/QRPGSRC Frommbrpayroll TOFILE*NONESource Members Obtaining Conversion ReportsConverting Auto Report CVTRPT*NOExample of Source Conversion Inserting Specification TemplatesData Example of Source ConversionConverted source is shown in on Example Source ConversionTo convert this source, enter ARR2 Analyzing Your Conversion III specifications for ARR2. The Conversion AidAnalyzing Your Conversion DS1Report Using the ConversionShows Command summary for a sample Conversion Conversion Aid generates a conversion report if you specifyYour Call PROG1Using the Log File Ymmdd Qrncvtfm Lgcent Colhdgcvt CentLgdate Colhdgcvt Date Lgtime Colhdgcvt TimeUnsupported RPG III Features Resolving Conversion ProblemsCompilation Errors in Existing RPG III Code Use of the /COPYTEST1 Members in the converted RPG IV source member Context-Sensitive ProblemsRecords Using CompStructures Command Or manually Correct Code After ConversionUse of Externally CharInitializing When convertedMerging an Array with an Externally Described DS Subfield ExtrecXYZ Run-time DifferencesBehavior With Dsone Extnameextrec CharResolving Conversion Problems How to Interpret Syntax Diagrams Appendix C. The Create CommandsUsing CL Commands Reading Syntax DiagramsValues Crtbndrpg CommandCrtbndrpg Command KEYWORDREQUIRED-VALUEAppendix C. The Create Commands407 Program-name Description of the Crtbndrpg CommandPGM SrcfileText SrcmbrGenlvl SrcmbrtxtGEN OptionNoxref NogenNoext ElseifStmt EventfDbgview ListPrint ALLOutput OptimizeGraphic CvtoptDatetime VarcharUsrprf LangidReplace UserUSE IssuedChange ExcludeTgtrls FixnbrZoned PRVBnddir AlwnullInputonly Binding-directory-nameQile UsrliblActgrp NEWPrfdta Crtrpgmod CommandCrtrpgmod Command NocolAppendix C. The Create Commands421 PF4 Description of the Crtrpgmod commandUsrprf PF1423 Appendix D. Compiler ListingsCompiler Listings Reading a Which was Compiled UsingCompiler Listing CrtbCompiler options Module or ProgramSource member Indentation MarkEject SectionEndif Listings Sequence Numbers RootPart 1 of 3. Sample Source Part of the Listing Part 2 of 3. Sample Source Part of the Listing Ruler Line 1a/ *NOSRCSTMT Source HeadingLine Number Do NumberDiagnostic AdditionalOutput Buffer Positions Copy Member TableCharacter to be Altered Compile-Time DataTotal Number of Characters Altered Alternate SequenceKey Field Information Cross-Reference TableExternal References List DuedateMessage Summary Final SummaryCode Generation and Binding Errors N a L M M a R YCompiler Listings Bibliography 439Iddu ILE RPG ILE RPG for AS/400 Programmers Guide Characters Special443 See Ceeutx See AlsoILE Control-record format, subfile Create Program Dbcs Describing Dsppgmref Binder Listing 100 Exception Service Find See halt See file See last See long Plist Methods Qual OA-OG, OV SEU See DB2 Totc ILE RPG for AS/400 Programmers Guide Éâôù
Related manuals
Manual 104 pages 4.57 Kb Manual 516 pages 58.6 Kb