Inside Module 7 Programming with Suprtool2 Page

Slides:



Advertisements
Similar presentations
1 PowerHouse and Suprtool Page n Why use Suprtool?2 n Combining Suprtool and QUIZ 4 n Linking multiple files8 n Creating complex subfiles14 n Importing.
Advertisements

1 Working with Suprlink Page n Accessing Suprlink4 n A sample scenario6 n Self-describing files15 n Linking files19 n Adding information32 n Suprlink requirements41.
1 Inside Module 8 Working with Speed Demon Page n What is Speed Demon?2 n Speed Demon versus Suprtool3 n Speed Demon intrinsics6 n SPDEDBSCAN7 n SPDEDBINIT8.
The Web Warrior Guide to Web Design Technologies
1 Suprtool2 Programming with Suprtool2 Page n Calling Suprtool from a program2 n Invoking Suprtool for an end-user3 n Examples of user interfaces for Suprtool.
Chapter 13 Auditing Information Technology
Chapter 2 Software Tools and Assembly Language Syntax.
4-1 Coding Complete COBOL Programs: The PROCEDURE DIVISION Chapter 4.
Chapter To familiarize you with  Why COBOL is a popular business-oriented language.  Programming practices and techniques  History of COBOL.
1 Inside Module 9 Latest Features in Suprtool n Variable Substitution n $Counter n $Clean and $FindClean n $Total and $Subtotal n $SPLIT n $EDIT n $NUMBER.
Inside Module 7 Exporting Data to the World Page n Exporting data to other applications2 n STExport converts the data4 n Running STExport5 n Dates and.
Chapter Three The UNIX Editors. 2 Lesson A The vi Editor.
MICROSOFT WORD 2007 INTERMEDIATE/ADVANCED. CREATE A NEW STYLE BASED ON A SELECTED TEXT HOME tab > STYLES group dialog launcher > at the bottom of the.
Productivity Programs Common Features and Commands.
The DATA DIVISION Chapter 3. COBOL Data Organization Field - group of characters forming a meaningful unit or basic fact –Characters in a name or digits.
3-1 Chapter 3. To familiarize you with  Ways in which data is organized in COBOL  Rules for forming data-names  Defining input and output files in.
13-1 COBOL for the 21 st Century Nancy Stern Hofstra University Robert A. Stern Nassau Community College James P. Ley University of Wisconsin-Stout (Emeritus)
Sequential Files Chapter 13. Master Files Set of files used to store companies data in areas like payroll, inventory Set of files used to store companies.
11- 1 Chapter 11.  Avoiding Logic Errors by Validating Input  What to Do If Input Errors Occur  Global Considerations in COBOL  When Data Should Be.
Any Questions!. Test Coming Up! Agenda Printing with Externally Described Printer Files Arrays.
Chapter Three The UNIX Editors.
13-1 Sequential File Processing Chapter Chapter Contents Overview of Sequential File Processing Sequential File Updating - Creating a New Master.
External Executable Tools The Master's Touch David L. Blankenship.
Lesson 3-Touring Utilities and System Features. Overview Employing fundamental utilities. Linux terminal sessions. Managing input and output. Using special.
13- 1 Chapter 13.  Overview of Sequential File Processing  Sequential File Updating - Creating a New Master File  Validity Checking in Update Procedures.
1 Intro stored procedures Declaring parameters Using in a sproc Intro to transactions Concurrency control & recovery States of transactions Desirable.
11- 1 Chapter 11.  Avoiding Logic Errors by Validating Input  What to Do If Input Errors Occur  Global Considerations in COBOL  When Data Should Be.
Chapter 4 PROCEDURE DIVISION. Paragraphs PROCEDURE DIVISION divided into paragraphs Each is independent module or routine Made up of series of instructions.
Topic 2: Hardware and Software
Lesson 5-Exploring Utilities
Introduction to the new robust security system from SCC.
Microsoft Word Illustrated
Topics Designing a Program Input, Processing, and Output
User-Written Functions
Chapter 8: Programming the Microprocessor
Process API COMP 755.
SQL and SQL*Plus Interaction
Easily retrieve data from the Baan database
Arrays: Checkboxes and Textareas
How to Define Separate Order Counters for Separate Sub-Libraries
Microsoft Word 2010.
Assembly Language Programming Part 3
Section 64 – Manipulating Data Using Methods – Java Swing
Chapter 6 Filters.
Inside Module 10 Editing TurboIMAGE Datasets Page
Guide To UNIX Using Linux Third Edition
JavaScript: Functions
Vi Editor.
Programming in COBOL.
OPERATE A WORD PROCESSING APPLICATION (BASIC)
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
Designing and Debugging Batch and Interactive COBOL Programs
Assistant lecturer Nisreen A. Jabr
Any Questions?.
Chapter 3 The DATA DIVISION.
Suprtool Suprtool High Speed Database Extract for HP 3K/9K
NextGen Trustee General Ledger Accounting
An Introduction to Structured Program Design in COBOL
Chapter 14 Sorting and Merging.
Iteration: Beyond the Basic PERFORM
Inside Module 3 Working with Eloquence Page
Inside Module 1 Introduction to Suprtool Page What is Suprtool? 3
Inside Module 9 Latest Features in Suprtool
CHAPTER 17 The Report Writer Module
Linux Shell Script Programming
Topics Designing a Program Input, Processing, and Output
Topics Designing a Program Input, Processing, and Output
Bent Thomsen Institut for Datalogi Aalborg Universitet
Arrays & Loops.
Programming in COBOL.
Presentation transcript:

Inside Module 7 Programming with Suprtool2 Page Calling Suprtool from a program 2 Invoking Suprtool for an end-user 3 Examples of user interfaces for Suprtool functions 4 Prompting users for selection criteria 8 Installing the Suprtool2 routine 9 Three ways COBOL can use Suprtool 11

Calling Suprtool from a program There are two ways to execute Suprtool commands for a program: 1. Run Suprtool first, then run the program 2. Have the program call Suprtool2 Suprtool2 A routine that you can call from application programs to define and execute Suprtool tasks

Invoking Suprtool for an end-user Any 3GL program can invoke Suprtool tasks, including COBOL, QUICK, FORTRAN, TRANSACT, and SPL Call the Suprtool2 interface routine procedure suprtool2 (suprcontrol); array suprcontrol; Each call to Suprtool2 passes one line of commands that can include MPE or Suprlink commands Suprtool functions are invisible to the end-user

Suprtool2 control Parm 01 supr-control. 05 supr-version pic s9(4) comp value 4. 05 supr-status pic s9(4) comp. 88 supr-ok value zeros. 88 supr-bad-msgfile value 1. 88 supr-aborted value 2. 88 supr-create-error value 3. 88 supr-bad-total-type value 4. 05 supr-command-line pic x(256) value spaces. 05 supr-flags. 10 supr-priority pic x(2) value spaces. 88 supr-priority-cs value "CS". 88 supr-priority-ds value "DS". 88 supr-priority-es value "ES". {continued} COBOL programmers can copy this control record from Cobol.Qlibsrc.Robelle directly into a COBOL program with the following Qedit command: /add 50.1=cobol.qlibsrc.robelle For other programming languages, you can extract the source code from the user manual (Suprcall.Doc.Robelle).

Suprtool2 control Parm continued 10 supr-maxdata pic s9(9) comp value 0. 10 supr-print-state pic x(2) value "ER". 88 supr-print-on-error value "ER". 88 supr-print-always value "AL". 88 supr-print-never value "NE". 10 supr-total-type pic x(2) value "CO". 88 supr-total-cobol value "CO". 88 supr-total-ascii value "AS". 10 supr-other-flags pic x(18) value spaces. 05 supr-totals pic s9(17) sign is trailing separate character occurs 15 times. 05 supr-out-count pic s9(9) comp. 05 supr-workspace pic x(20) value spaces.

Calls to Suprtool2 from a COBOL program $include cobol.qlibsrc.robelle 00-main section. perform 02-get-if-specs. move "base invory.data,5,dev" to supr-command-line. perform 01-call-suprtool. move "get invrec" to supr-command-line. perform 01-call-suprtool. move if-command to supr-command-line. perform 01-call-suprtool. move "purge selitem" to supr-command-line. perform 01-call-suprtool. {continued} This example uses Suprtool to build an extract file that can be processed by a COBOL program. The Suprtool User Manual contains additional examples in other languages, such as TRANSACT, FORTRAN, QUICK and SPL.

Calls to Suprtool2 from a COBOL program continued move "output selitem" to supr-command-line. perform 01-call-suprtool. move "extract item,descript" to supr-command-line. perform 01-call-suprtool. move "sort item" to supr-command-line. perform 01-call-suprtool. move "exit" to supr-command-line. perform 01-call-suprtool. Actual call to Suprtool 01-call-surtoool. call "Suprtool2" using supr-control. if not supr-ok then display "Suprtool interface error number: ", supr-status. Exit The last call must be a line with the Exit command; it must be spelled out fully, left-justified, and it must appear by itself in the supr-command-line buffer. This signals Suprtool2 to execute the preceding command lines.

Prompting users for selection criteria from a COBOL program Use a buffer to format the IF command 01 if-command. 05 filler pic x(9) value "IF ITEM=‘". 05 sel-prefix pic x(4). 05 filler pic x(2) value "‘ ". Code to insert selection criteria into the IF buffer 02-get-if-specs. display "Enter 4-character item prefix to select:". accept input-buf. move input-buf to sel-prefix. Code in main program perform 02-get-if-specs. move if-command to supr-command-line. perform 01-call-suprtool. get-if-specs This paragraph customizes a prepared If command by inserting the selection criteria provided. supr-command-line The final If command is moved to supr-command- line in the main module. Moving Suprtool If you have moved Suprtool to a different account, you can still access it through Suprtool2 by adding a :Setjcw and a :File command to your logon UDC. :setjcw suprtool2filecommand = 2 :file suprtool = suprtool.pub.devutil Netbase or OMNIDEX access If you want to access Netbase or OMNIDEX hooks and run Suprtool with Lib = P instead of Lib = S, you need to set one more JCW. :setjcw suprtool2lib = 1 1 for Lib = P 2 for Lib = G

Installing Suprtool2 on MPE V MPE V uses the CM version of Suprtool2 :run cmprog;lib = p :segmenter {load into your SL file} -sl sl.pub -purgesl segment,suprtool -usl st2usl.pub.robelle -addsl suprtool -exit On MPE V, load the code into your SL file and run your applications with Lib = P. The USL filename is St2usl.Pub.Robelle, and the segment name is Suprtool. If you get an illegal file access error on the -USL command, make a copy of the USL file in your group. :purge tempusl :fcopy from = st2usl.pub.robelle;to=tempusl;new :segmenter -sl sl.pub -usl tempusl

Installing Suprtool2 on MPE/iX MPE/iX uses the NM version of Suprtool2 Run your programs with :run nmprog;xl = "st2xl.pub.robelle" Or copy the module to your own XL file :linkedit -xl xl.pub -copy xl;from = st2xl.pub.robelle;& replace -exit

Three ways COBOL programs can use Suprtool Batch report programs Run Suprtool and create an output file Read and format output file On-line programs Call Suprtool2 routine Pass commands to a Suprtool child process Read Suprtool output file Call Speed Demon routine instead of DBGET to read every record Example One Robelle customer uses the Suprtool2 routine to expedite the delivery time of new equipment. They enter the selection criteria for searching orders. A COBOL program calls Suprtool2 to find the selected order numbers and loads the matching records into another dataset with the report name.

Summary Call Suprtool2 routine Execute Suprtool program as a child process Read results from a file created by Suprtool