Positioning the File Pointer and calling programs Fall 2011.

Slides:



Advertisements
Similar presentations
If Statements, Try Catch and Validation. The main statement used in C# for making decisions depending on different conditions is called the If statement.
Advertisements

Info 3.3. Chapter 3.3 Recursive Data Structures Part 2 : Binary Trees.
Review What is a virtual function? What can be achieved with virtual functions? How to define a pure virtual function? What is an abstract class? Can a.
INTERFACES IN JAVA 1.Java Does not support Multiple Inheritance directly. Multiple inheritance can be achieved in java by the use of interfaces. 2.We need.
Practice Insight Customer On-Boarding Presented by: Shaun McAnulty.
Data Structures: A Pseudocode Approach with C 1 Chapter 5 Contd... Objectives Explain the design, use, and operation of a linear list Implement a linear.
23/05/20151 Data Structures Random Access Files. 223/05/2015 Learning Objectives Explain Random Access Searches. Explain the purpose and operation of.
Copyright © 2004 Pearson Education, Inc.. Chapter 14 Indexing Structures for Files.
FALL 2004CENG 351 Data Management and File Structures1 External Sorting Reference: Chapter 8.
B + Trees Dale-Marie Wilson, Ph.D.. B + Trees Search Tree Used to guide search for a record, given the value of one of its fields Two types of Nodes Internal.
B+ - Tree & B - Tree By Phi Thong Ho.
CS21, Tia Newhall Binary Search Trees (BST) 1.Hierarchical data structure with a single pointer to root node 2.Each node has at most two child nodes (a.
Binary Search Trees CSE, POSTECH. Search Trees Search trees are ideal for implementing dictionaries – Similar or better performance than skip lists and.
Linoma’s RPG Toolbox TM © Copyright
Algorithms A Central Heating system Start Is temp <19
Lecture 8: Basic concepts of subroutines. Functions In perl functions take the following format: – sub subname – { my $var1 = $_[0]; statements Return.
Marcel VanLandeghem Ext 2488
1 Project 5: Median. 2 The median of a collection of numbers is the member for which there are an equal number less than or equal and greater than or.
Index Structures for Files Indexes speed up the retrieval of records under certain search conditions Indexes called secondary access paths do not affect.
©Silberschatz, Korth and Sudarshan12.1Database System Concepts B + -Tree Index Files Indexing mechanisms used to speed up access to desired data.  E.g.,
Computer Science 111 Fundamentals of Programming I Search Algorithms.
CMPSC 16 Problem Solving with Computers I Spring 2014 Instructor: Lucas Bang Lecture 15: Linked data structures.
The Fun That Is File Structures Pages By: Christine Zeitschel.
IBM AS/400 RPG IV Developer Thousands of IT Professionals before you have already passed their certification exams using the IBM
Lecture 10 Trees –Definiton of trees –Uses of trees –Operations on a tree.
WARM UP Scientific Notation GOAL Read and write numbers in scientific notation. KEY WORDS Scientific Notation.
1 Chapter 17 Disk Storage, Basic File Structures, and Hashing Chapter 18 Index Structures for Files.
DATA STRUCTURE & ALGORITHMS (BCS 1223) CHAPTER 8 : SEARCHING.
SEARCHING. Vocabulary List A collection of heterogeneous data (values can be different types) Dynamic in size Array A collection of homogenous data (values.
Presentation © Copyright 2002, Bryan Meyers Top-Down, Structured Program Design Chapter 5.
CS261 – Recitation 5 Fall Outline Assignment 3: Memory and Timing Tests Binary Search Algorithm Binary Search Tree Add/Remove examples 1.
Set path vs current schema. Set Current Schema ‘The CURRENT SCHEMA special register specifies a VARCHAR(128) value that identifies the schema name used.
Exam Format  90 Total Points  60 Points Writing Programs  25 Points Tracing Code/Algorithms and determining results  5 Points Short Answer  Similar.
Chapter 7 Pointers: Java does not have pointers. Used for dynamic memory allocation.
Storage Structures. Memory Hierarchies Primary Storage –Registers –Cache memory –RAM Secondary Storage –Magnetic disks –Magnetic tape –CDROM (read-only.
ASNApalooza 2007 © Copyright 2007 by ASNA. All rights reserved. by Tim Jannsen ASNA © Copyright 2007 by ASNA. All rights reserved. Open Query File Dynamically.
Code DescriptionColourSelling PriceNo. Sold C105MattPrimrose£ C106MattLilac£ C120SilkPrimrose£ C121SilkLilac£ C123SilkPlum£9.00.
CAPTER 6 SEARCHING ALGORITHM. WHAT IS SEARCHING Process of finding an item in an array Two ways to find an item By position / By value.
V6R1 – RPG enhancements THREAD(*CONCURRENT) Ability to define a main procedure which does not use the RPG cycle Files defined in subprocedures Qualified.
Data Structures and Algorithms Searching Algorithms M. B. Fayek CUFE 2006.
Visual C++ Programming: Concepts and Projects Chapter 8A: Binary Search (Concepts)
Course Code #IDCGRF001-A 5.1: Searching and sorting concepts Programming Techniques.
CS130 Visual Basic Project 4 Lecture Fall New topics in project 4 Database, file (table), records, fields. Application that contains menus, submenus,
IBM i5 iSeries RPG ILE Programmer Visit: Pass4sureofficial.com.
RPG free basics Session 1. RPG free Session 12 “C” Spec structure change Fixed Format Structure Factor 1OPCODEFactor 2Result Num1AddNum2Num3 EvalNum3=Num1+Num2.
ANUA 2011, Ft. Lauderdale INTRO Employee Deductions and Benefits ANUA 2011, Ft. Lauderdale Education Solutions Development Inc.
16- 1 Chapter 16.  To familiarize you with  COPY statement for copying parts of a program stored in a library  CALL statement for executing called.
IBM AS/400 RPG IV Developer Visit: Pass4sureofficial.com.
© 2009 IBM Corporation IWS z/OS SPEs Auditing enhancements.
Exam practice. Exam 1  Describe how a Boolean expression can control the operation of a loop  Describe the difference between a while loop and for loop.
Section 2.6: Searching and Sorting
© 2016, Mike Murach & Associates, Inc.
C Basics.

Memberwise Assignment / Initialization
Hashing algorithm. Hashing algorithm key Buket size 1 Buket size 2 Buket size 3 Remainer Load factor size size
Working with the IFS from RPG.
CS 2308 Exam I Review.
Structs And Arrays.
CS 2308 Exam I Review.
Agenda Test next Week! SI or no SI? File Update Techniques – Review.
Counting & Comparing Money 2 $ $ $ $.
Counting & Comparing Money $ $ $ $.
CS 2308 Exam I Review.
References, const and classes
Hmjngj jxhngh.
Every number has its place!
Procedures.
Example Challenge Question
IBC233 Lecture 3 Updated Fall 2011
Presentation transcript:

Positioning the File Pointer and calling programs Fall 2011

SETLL – Positioning the File Pointer Sequential Access File Positions the file pointer at the first record where the key field is greater than on equal to what’s looked for Must be followed by a READ Use %FOUND to determine if the record found is greater than or equal to the key field Use %EQUAL to determine if the record found is exactly the same as the key field that you are looking for

SETLL Example /Free setll *loval custmast; read custmast; /end-free

SETLL – Example /Free setll custin custmast; if %equal(custmast); exsr validcust; else; exsr invalidcust; endif; /end-free Custno Note Note_dtls 1 1 Customer arrived 1 2 Customer left 3 1 Customer away If Custin = 1, then the file pointer for the first record will be returned

SETGT Sequential Access File Positions the file pointer at the first record where the key field is greater than what’s looked for Must be followed by a READ Use %FOUND to determine if the record found is greater than the key field

Setgt Example /Free setll custin custmast; if %equal(custmast); exsr validcust; else; exsr invalidcust; endif; /end-free Custno Note Note_dtls 1 1 Customer arrived 1 2 Customer left 3 1 Customer away If Custin = 1, then the file pointer for the last record will be returned

Calling Programs Code in pgmA Dfullreport PR EXTPGM(‘REPORT’) /free callp fullreport(); Code in pgmB pgmApgmB No parameters Passed

Calling Programs Code in pgmACode in pgmB DDtlreport PR EXTPGM(‘REPORT’)Ddtlreport PR D parm1 10A /freeDdtlreport PI callp Dtlreport(field1);D parm1 10A Code in pgmB pgmApgmB parameters Passed