IBM manual ILE RPG for AS/400 Programmers Guide

Page 186

162 ILE RPG for AS/400 Programmer's Guide

Image 186
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 ProgramFile Description Specifications ProgramSecond file Chain Output SpecificationsBonus EvalILE RPG SubprocedureHeading Lines That Contain Constant String Payroll NotEntire Source Program ReturnFqsysprt Printer 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 ManagerServices AS/400 ToolsILE R 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 ILESource Debugging Bindable APIsWhile the progra 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 ILEILE Program Using Crtbndrpg Related InformationStrategy 2 ILE Program 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 itILE Application Using Crtrpgmod UsingStrategy 3 ILE Application 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 That STATE, ZIPZIP 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 LibraryUsing the Source Entry Utility Using SEUEntry Utility 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 CheckingCommand Using the Crtbndrpg CommandWith 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 ChapterCommand Using the CrtrpgmodYou Create a Module using the Create 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 TransrptOther Endsl ReturnEndsl Prod Creating a Module forPrototype for TransInc Prototype for ProdNameFtrnsdta Disk Fqsysprt Printer ItrnsrecQTY Additional Examples Related CL CommandsRPG, mainthe procedureis ModulesBinding Modules into a Program Binding Modules into a ProgramBinder 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 LevelRemoving Observability SizeReducing an Objects 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 CrtsrvpgmSample Service Program Sample Service ProgramAPI 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 menusYou Run Menu by Entering RpginqRPGCHG, or Rpgadd respectively 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 AbridgedManaging Dynamically-Allocated Storage INZ*NULLDsply AddName 40A AllocElem@ = next@ = *NULL Namelen = %len%trimrnameNull DOW Heap Storage Problems DeallocBindable APIs RPG procedure ThisManaging Your Own Heap Call SomepgmSeeAPI theReference DynarrayCopy Dynarri CeegtstCeecrhp 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 127Calling Procedures Calling ProgramsStatic Call Stack Call stackStack Recursive Calls Recursive calls are only allowed ForThat Most r Stack Entry is Bottom 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 DocalcUsing Operational Descriptors ILE CEE APICeetsta Extprocceetsta 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 ReturnBegsr Movel CheckEndif Endsr 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, typeOrder of Evaluation Interlanguage CallsEffect To obtain Actual Returned value InterlanguageCalling Considerations DCL &RET2 TYPE*CHAR LEN2 DCL &RET1 TYPE*CHAR LEN1Call Operations Fixed-FormUsing the Fixed-Form Call Operations For Callb onlyOperation Operation extender is Used With Operations Passing Parameters Using ParmExamples of Call and Callb OperationUsing the Plist Operation Fixed-Form Call OperationsPlist Normal End Returning from a Main ProcedureProcedure Returning from a CalledReturning from a Called Program or Procedure Abnormal EndEntry Parm operation is perfor 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 GuideHow to AcrossShare Data How Example, consider the situation where two procedures Called Will 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 DebuggingStarting the ILE Source Starting the ILE Source DebuggerOPMSRC*NO 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 ILEViewing a Different DbgexLibl PGM 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 BreakpointsSetting an JobBreakpoint 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 Salary¹ To specify a variable or expression to be watched, type Payroll ABC PGMPayroll Enddbg Displaying Active WatchesRemoving Watch Conditions IPLBlankDisplay Module Source Example of Setting a Watch ConditionExample of Setting a Watch Condition Display as shown below. InsteadObject Stepping Through the Program ObjectStepping Through Over Into Subprocedures Stepping Over Call StatementsSubroutines You Can Stepping Into Call Statements Step IntoTIP From Program F22This example, you use F22 Step Into to step Into the OPM DebugexThis example, you use F22 Step Into to Subpr Which Module InputParmStep completed at line Switch Displaying Data and ExpressionsElse 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 withFor Sample Source for Debug ExamplesExamples To create the program DEBUGEX, type Program using Source 215, typeSample Source for Debug Examples First ModuleInzabcde DIM3 CtdataDS1 DS2Occur DS2 Move Plist ParmCall Rpgpgm 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 onDure will Only Handle Errors That Subprocedure ILE RPG Exception HandlingException Handling within 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 SubrouAfter the Else Move InlrElse ADD 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 DumpFormatted Dump ¹ If a Dump operation is bypassed By a Goto operation,Does not Occur 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 WriteNaming Files Types of File DescriptionsTypes of File Descriptions Files Using Files withProgram-Described Example of Some Typical Relationships betweenDefining Externally Described Files Defining Externally DescribedOPTION*EXPDDS 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 FilesContained Physical file CUSMSTP, which is Identified UniqueUnique Cust Checkmf Dstref Distribution Application Field ReferenceBasdat Edtcdey Addr ReffldnameCity Valid Keys for a Record FileDisk EdtcdejArguments Partial KeyReferring to 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 FilesConsecutive Processing Subsequent Text Describes Each Method ProcessingADD 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 NnhrsSequential-within-Limits Processing ChangeFchange Examples of Sequential-within-Limits Processing Disk FilesFlimits Disk ESWLIM1 Related Files EmpmstLimits 3PIDISK KEYLOC1 FprintRelative-Record-Number Processing ESWLIM2 Related Files EmpmstFempmst Disk Fprint Valid File Operations Valid File OperationsZ/F Recno Using Commitment Control Using Commitment ControlStarting and Ending Commitment See theBackup and Recovery manual Commitment Control LocksAbridged for Specifying UsingFiles For Concepts,Example of Using Commitment Control ReceiverJournal Control This command calls the program ReviseUpdate Mastrec Tranrec Disk Commit FtransCycle DDM FilesDDM 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 AccountUsing the Fetch-Overflow Routine in Program-Described FilesOverf Overflow Printing Setting of the Overflow Indicator Fetch Overflow Example of Specifying Fetch OverflowChanging Forms Control FileOPM Prtctl data structure Values Contained First four subfields DatForms 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 nameError StatusDescription FLD Example of Using a Special FileSpecial Pgmnameuserio Spcl Plist Parm FLD1 Movel Hello Write Excptn Outbuf SetonAre Added To the end of the RPG-created Parameter list Program User-written routineUserio Using Workstn Files Using Externally Described Workstn FilesFunction ¹ Output On page 333 shows an example of the DDS for a display-devicOverlay RefdstrefPrompt DescrpSpecifying Function Key Indicators on Display Device Files Specifying Command Keys DisplayDevice Using Subfiles Processing an Externally Described Workstn FileField SfileName Search Use of SubfilesYou press Specified Function key During Read SFL TEXTSubfile RecordUsing Program-Described Workstn Files Using Program-Described Workstn FilesSubfil Using a Program-Described WithName Input SpecificationsCalculation Specifications FormatOutput File Valid Workstn File OperationsInput File Combined FileWrite Operation Exfmt OperationRead Operation Multiple-Device FilesIs updated DevidKeyword. This field Initialized Multiple-Device Files Database Physical File Example of an Interactive ApplicationDatabase Physical File 345Display Device InquiryDDS for a Main Menu InquiryCusmain RPG Source Using Crtrpgmod Create Program By entering First option specifies that the first module in the listMain menu will appear as in on CUSMSTL1 DDS for a File MaintenanceFile Maintenance LogicalDisplay DeviceMode 70DATE EdtcdeyEdtcdez Record Format contains Constant Customer File Maintenance Cusmnt RPG SourceSubroutine Addsub Purpose Addsub Begsr Cstkey Chain CMLREC1 Not *IN50 MoveElse Move OFF 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 223143ADD Mode Delete ModeBathurst Avenue 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 Write Subctl Move OFF Move OFFADD Zero Recnum Endsr 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 LengthLog File Conversion Aid Tool RequirementsUSE Converting Your Source Wont DoConverting Your Source AidCvtrpgsrc Command Curlib FromfileLibl FrommbrNone TofileQrpglesrc TombrCvtrpt ExpcpyYES Seclvl YES InsrtplDefaults Converting a Member UsingSource 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 ConversionExample Source Conversion To convert this source, enterConverted source is shown in on 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 PF1Appendix D. Compiler Listings Compiler Listings423 Reading a Which was Compiled UsingCompiler Listing CrtbCompiler options Module or ProgramSource member Indentation MarkSection EndifEject 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 Special 443Characters 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