CICS Application Programming. Exercises MONITOR IT-utbildning, Cobolskolan Sverige, B1-1

Relevanta dokument
Support Manual HoistLocatel Electronic Locks

Beijer Electronics AB 2000, MA00336A,

Quick Start Guide Snabbguide

Schenker Privpak AB Telefon VAT Nr. SE Schenker ABs ansvarsbestämmelser, identiska med Box 905 Faxnr Säte: Borås

2.1 Installation of driver using Internet Installation of driver from disk... 3

Lösenordsportalen Hosted by UNIT4 For instructions in English, see further down in this document

electiaprotect GSM SEQURITY SYSTEM Vesta EZ Home Application SMART SECURITY SYSTEMS! SVENSKA ios Android

Installation av F13 Bråvalla

COBOL med DL/I, CICS och JCL. Övningar MONITOR IT-utbildning, Cobolskolan Sverige, B1-1

Vässa kraven och förbättra samarbetet med hjälp av Behaviour Driven Development Anna Fallqvist Eriksson

Webbregistrering pa kurs och termin

Boiler with heatpump / Värmepumpsberedare

Webbreg öppen: 26/ /

2.45GHz CF Card Reader User Manual. Version /09/15

Föreläsning 4 IS1300 Inbyggda system

Datasäkerhet och integritet

Isolda Purchase - EDI

Application Note SW

Chapter 1 : Who do you think you are?

Schenker Privpak AB Telefon VAT Nr. SE Schenker ABs ansvarsbestämmelser, identiska med Box 905 Faxnr Säte: Borås

1. Unpack content of zip-file to temporary folder and double click Setup

Information technology Open Document Format for Office Applications (OpenDocument) v1.0 (ISO/IEC 26300:2006, IDT) SWEDISH STANDARDS INSTITUTE

Styrteknik: Binära tal, talsystem och koder D3:1

1. Varje bevissteg ska motiveras formellt (informella bevis ger 0 poang)

Alias 1.0 Rollbaserad inloggning

Questionnaire for visa applicants Appendix A


Dokumentnamn Order and safety regulations for Hässleholms Kretsloppscenter. Godkänd/ansvarig Gunilla Holmberg. Kretsloppscenter

EXTERNAL ASSESSMENT SAMPLE TASKS SWEDISH BREAKTHROUGH LSPSWEB/0Y09

Problem som kan uppkomma vid registrering av ansökan

Michael Q. Jones & Matt B. Pedersen University of Nevada Las Vegas

Tentamen PC-teknik 5 p

Recitation 4. 2-D arrays. Exceptions

denna del en poäng. 1. (Dugga 1.1) och v = (a) Beräkna u (2u 2u v) om u = . (1p) och som är parallell

Writing with context. Att skriva med sammanhang

Preschool Kindergarten

Workplan Food. Spring term 2016 Year 7. Name:

Annonsformat desktop. Startsida / områdesstartsidor. Artikel/nyhets-sidor. 1. Toppbanner, format 1050x180 pxl. Format 1060x180 px + 250x240 pxl.

Module 6: Integrals and applications

FÖRBERED UNDERLAG FÖR BEDÖMNING SÅ HÄR

Isometries of the plane


INSTALLATION INSTRUCTIONS

Provlektion Just Stuff B Textbook Just Stuff B Workbook

Materialplanering och styrning på grundnivå. 7,5 högskolepoäng

VAD SKULLE DU HA VALT PDF

Adress 15. August 2014

Komma igång med Adobe Presenter ver.7

12.6 Heat equation, Wave equation

Sparbankerna PDF. ==>Download: Sparbankerna PDF ebook By 0

Thesis Production Time plan, preparation and Word templates

How to format the different elements of a page in the CMS :

Discovering!!!!! Swedish ÅÄÖ. EPISODE 6 Norrlänningar and numbers Misi.se

Registrerade / Registered 14/05/2009. No Ordförande / The President. Wubbo de Boer REGISTRERINGSBEVIS CERTIFICATE OF REGISTRATION

Ändringar i språkfiler i e-line 3.42A

InstalationGuide. English. MODEL:150NHighGain/30NMiniUSBAdapter

WhatsApp finns för dessa plattformar:

Varmt välkommen som gästföreläsare till Juridiska fakulteten vid Lunds universitet

HANTERING AV UPS CX

PROFINET MELLAN EL6631 OCH EK9300

Calculate check digits according to the modulus-11 method

LARS. Ett e-bokningssystem för skoldatorer.

Every visitor coming to the this website can subscribe for the newsletter by entering respective address and desired city.

PRESS FÄLLKONSTRUKTION FOLDING INSTRUCTIONS

Alternativet är iwindows registret som ni hittar under regedit och Windows XP 32 bit.

Integritetspolicy på svenska Integrity policy in English... 5

Chapter 2: Random Variables

Get Instant Access to ebook Ta Skada PDF at Our Huge Library TA SKADA PDF. ==> Download: TA SKADA PDF

Schenker Privpak AB Telefon VAT Nr. SE Schenker ABs ansvarsbestämmelser, identiska med Box 905 Faxnr Säte: Borås

Hur fattar samhället beslut när forskarna är oeniga?

1. Log on to the system using the user ide and password ide. 2. Copy the file /etc/ca-certificates.conf to the home directory of the user.

JAG AR INTE GALEN PDF

1. Compute the following matrix: (2 p) 2. Compute the determinant of the following matrix: (2 p)


Support for Artist Residencies

PORTSECURITY IN SÖLVESBORG

MBIT BREDBAND VI ÄGS AV INVÅNARNA I KARLSHAMN REGISTRERA DIG IDAG. Din lokala elleverantör. Starka på hemmaplan. Din guide till Karlshamnsporten

SVENSK STANDARD SS-EN ISO 19108:2005/AC:2015

Laglista och Lagefterlevnad

Får endast utföras av behörig personal. May only be carried out by authorized electrician


REGISTRERA DIG IDAG Din guide till Ronnebyporten

Grafisk teknik IMCDP IMCDP IMCDP. IMCDP(filter) Sasan Gooran (HT 2006) Assumptions:

Get Instant Access to ebook Ta Betalt PDF at Our Huge Library TA BETALT PDF. ==> Download: TA BETALT PDF

DVG C01 TENTAMEN I PROGRAMSPRÅK PROGRAMMING LANGUAGES EXAMINATION :15-13: 15

UTLYSNING AV UTBYTESPLATSER VT12 inom universitetsövergripande avtal

Product configurations Produire configuration Produkt konfigurationen Producto configuraciones Produkt konfigurationerna

LUNDS TEKNISKA HÖGSKOLA Institutionen för Elektro- och Informationsteknik

Swedish National Data Service

Manual/Förenklad handhavande User Manual. LPW-Serien.

Enterprise App Store. Sammi Khayer. Igor Stevstedt. Konsultchef mobila lösningar. Teknisk Lead mobila lösningar

Quick-guide to Min ansökan

säkerhetsutrustning / SAFETY EQUIPMENT

Module 1: Functions, Limits, Continuity

Protokoll Föreningsutskottet

SkillGuide. Bruksanvisning. Svenska

PRESS FÄLLKONSTRUKTION FOLDING INSTRUCTIONS

Översättning av galleriet. Hjälp till den som vill...

This exam consists of four problems. The maximum sum of points is 20. The marks 3, 4 and 5 require a minimum

Att fastställa krav. Annakarin Nyberg

Transkript:

2017 MONITOR IT-utbildning, Cobolskolan Sverige, www.cobolskolan.se B1-1

Contents Exercise 1 A simple program... 3 Part 1 Send... 3 Exercise 2 A conversation... 4 Part 1 Conversation... 4 Exercise 3 Menu program... 5 Part 1 Send Map... 5 Exercise 4 Employees... 7 Show Employee-info... 7 Exercise 5 Tiers... 9 Presentation and Data Access... 9 Exerise 6 Changes... 11 Change Employee-record... 11 More functions... 11 Övning 7 Temporary Storage... 12 Uppgift 1 Kontrollera... 12 Övning 8 Bläddring... 13 Uppgift 1 Bläddring... 13 Övning 9 Asynkron bearbetning... 15 Uppgift 1 Starta asynkron bearbetning... 15 2017 MONITOR IT-utbildning, Cobolskolan Sverige, www.cobolskolan.se B1-2

Exercise 1 A simple program In this exercise you will write a simple program, just to familiarize yourself with CICS-commands. Part 1 Send The program will have the name EDx1PGM and the transaction code EDx1. Replace x with the number you have been given by your instructor. The program should only write a message to the terminal like the message you see in the box, and then terminate. This is Exercise 1 Best Rgds xxxx The first message is placed on row 10 and the second message on row 15. Compile your program. Activate EDF, execute your program and check the result. When you find the program working, run again without EDF. End of exercise. 2017 MONITOR IT-utbildning, Cobolskolan Sverige, www.cobolskolan.se B1-3

Exercise 2 A conversation In this exercise, you will write a pseudo-conversational program. Part 1 Conversation In this exercise you will wright a pseuodo-conversational program. The program will have the name EDx2PGM and the transaction code EDx2. Replace the x with the number you have been given by your instructor. When the program starts, it should write information similar to the information in the box below, and set itself in a pseudo-conversational state. This is a pseudoconversational program, entered n times Press Enter to continue, press CLEAR to terminate Messages should be placed on rows 15 and 16. You should add a counter to the program, that should be increased by one every time the program is entered. If an invalid key is pressed, the Invalid key message should appear on row 18, otherwise not. This is a pseudoconversational program, entered n times Press Enter to continue, press CLEAR to terminate *** Invalid key pressed *** When the CLEAR-key is pressed, the program should terminate, but before this, the screen should be cleared and the keyboard should be unlocked. Compile the program. Activate CEDF, execute the program and check the result. When the result seems OK, run again without CEDF. End of exercise. 2017 MONITOR IT-utbildning, Cobolskolan Sverige, www.cobolskolan.se B1-4

Exercise 3 Menu program In this exercise you will write a Menu-program. Part 1 Send Map The program will have the name EDx3PGM and the transaction code EDx3. Replace the x with the number you have been given by your instructor. The program should send and receive the map with the name EDMAP1 which looks like this: CICS Application Programming MONITOR IT-utbildning Time: _ Employees _ Paging _ Exit F3 CLEAR=Exit ENTER=Continue The COBOL-copy / structure for the map can be found in thecopylib (check with your instructor). Take a look at it using Browse, and you will find names given to variables. The program should be a pseudo-conversational program and the task is either to send or receive the map. Check the users selection by checking the cursor location. If the program encounters an error, send a message to the user. There is a location in the map reserved for message. When the user chooses Employees control should be given to a program with the name EDx3PGM. If this program is not available, send a message to the terminal. When the user chooses Paging control should be given to a program with the name EDx4PGM. If this program is not available, send a message to the terminal. When the user chooses to Exit, the program should clear the screen and return normally to CICS. 2017 MONITOR IT-utbildning, Cobolskolan Sverige, www.cobolskolan.se B1-5

Compile the program. Activate CEDF, execute the program end check the result. End of exercise. 2017 MONITOR IT-utbildning, Cobolskolan Sverige, www.cobolskolan.se B1-6

Exercise 4 Employees In this exercise you will write a program that read employee-records and presents them in a map. Show Employee-info The program will have the name EDx4PGM and the transaction code EDx4. Replace the x with the number you have been given by your instructor. The program gets control from the menu-program and should either send or receive the map EDMAP2 with or without any data. The name of the employee-file is EDEMPx. The physical dataset name is not necessary to know, but can be found by entering CEMT I FILE(EDEMPx). The mapset and the map has the name EDMAP2 and looks as follows: MONITOR IT-utbildning Employee no : Social Sec no : First name : Last name : Department : F3 CLEAR=Exit F1=Clear ENTER=Continue F5=Change F6=Add F7=Delete F10=Status The COBOL-copy / structure for the map can be found in thecopylib. To check what the map looks like, enter CECI SEND MAP(EDMAP2) ERASE. When the user presses the Enter-key, the program should read the file EDEMPx using the Employee no as the key-value when reading the file. This version of the program should implement support for F1=Clear, F3 CLEAR=Exit and Enter=Continue. Other selections should be considered invalid. Exceptions should be reported in the map field reserved for message. The file EDEMPx has the following structure: 2017 MONITOR IT-utbildning, Cobolskolan Sverige, www.cobolskolan.se B1-7

Employee number Social sec number Given name Family name Department Filler Total length 5 char 10 char 20 char 20 char 5 char 20 char 80 char EDx4PGM Receive Map() Read File() Send Map() Return Transid() EDEMPx EDMAP2 Compile the program. Activate CEDF, execute the program end check the result. End of exercise. 2017 MONITOR IT-utbildning, Cobolskolan Sverige, www.cobolskolan.se B1-8

Exercise 5 Tiers In this exercise you will modify the program from the previous exercise and also write a new program that handles all data access. Presentation and Data Access Use program EDx4PGM as a template for the new program that will handle the presentation. The new program name should be EDx5PGM,called the Presentation-program. The program will now only contain logic to present data on the screen. All functions for any kind of data access will be handled by a new program named EDxDB1,called the DB-program. The first version of the DBprogram will use CICS File Control, but later versions can/may use DB2/SQL. The DB-program should be called by the Presentation program using LINK, and communication between the two should use COMMAREA. It is up to you to design a protocol to be used between the two programs. There must be a way to request service from the DB-program, and also check the outcome of the request as well as receive some data. Discuss your solution with the instructor before you start programming. EDx5PGM 01 WS-Commarea. EDxDB1 DFHCOMMAREA Link Send Return Transid() Read Return EDMAP2 EDEMPx Compile the program. Activate CEDF, execute the program end check the result. Write a new Database-Program named EDxDB2 and use the EDxDB1 as a template. Replace the CICS Read command with DB2/SQL. Compile the program. Activate CEDF, execute the program end check the result. 2017 MONITOR IT-utbildning, Cobolskolan Sverige, www.cobolskolan.se B1-9

End of exercise. 2017 MONITOR IT-utbildning, Cobolskolan Sverige, www.cobolskolan.se B1-10

Exerise 6 Changes In this exercise you will complete the Presentation- and DB-programs to handle all request-types.. Change Employee-record You can use the Presentation-program from Exercise 5 as a template. New name will be EDx6PGM. Update the existing Database-program, but keep a copy using another name. Update the programs to handle update requests.( F5=Change) Compile the program. Activate CEDF, execute the program end check the result.. More functions Update the programs to handle the rest of the request-types, if you have time available. Check with your instructor. Compile the program. Activate CEDF, execute the program end check the result. End of exercise. 2017 MONITOR IT-utbildning, Cobolskolan Sverige, www.cobolskolan.se B1-11

Övning 7 Temporary Storage I denna övning så skall du komplettera ditt program så att det kan kontrollera att ingen förändring är gjord av någon annan innan du skriver tillbaka eller raderar en post. Uppgift 1 Kontrollera Komplettera programmet UTCxDB1 så att det använder Temporary Storage för lagring av visad post. Könamnet skall vara en sträng som består av terminalens identitet samt namnet på transaktionskoden. Innan du ändrar eller raderar poster i UTBPERSx så skall du hämta det sparade innehållet från Temporary Storage och kontrollera så att innehållet i denna post stämmer överens med posten i filen innan du gör ändring. Skulle de inte överensstämma så innebär ju det att posten har blivit ändrad av någon annan under tiden som du gjorde dina ändringar på skärmen. Avvikelser skall meddelas på skärmen. Vid test skall du även testa denna situation. Det kan du göra genom att ha ytterligare ett CICS-fönster öppnat och göra en ändring parallellt. UTCxPGM 01 WS-Commarea. UTCxDB1 DFHCOMMAREA Link Send Map() Return Transid() Read Writeq TS Return UTBMAP2 UTBPERSx Temporary Storage Kompilera programmet. Aktivera CEDF, exekvera programmet och kontrollera resultatet. Uppgiften är avslutad. Övningen är avslutad. 2017 MONITOR IT-utbildning, Cobolskolan Sverige, www.cobolskolan.se B1-12

Övning 8 Bläddring I denna övning så skall du skriva ett program som kan visa flera sidor med information från filen UTBPERS. Uppgift 1 Bläddring Programmet UTDxPGM, transaktionskod UTDx, skall hämta poster från filen UTBPERSx och visa på skärmen och skall startas när användaren väljer Bläddring fråm mappen UTBMAP1. Det finns en map och ett mapset med namnet UTBMAP3. MONITOR IT-utbildning Sida: xx Anstnr Persnr Förnamn Efternamn Avdelning 00001 6508130168 Bo Ek IT F3 CLEAR=Avbryt ENTER=Fortsätt F7=Föregående F8=Nästa Kontrollera med CECI hur mappen ser ut fysiskt. Applikationsstrukturen för mappen finn på lärare.kurs.copylib. under namnet UTBMAPXX. Den innehåller en tabell med plats för nio(9) rader av information. Programmet skall läsa samtliga poster från filen UTBPERSx med File Control Browning och presentera dessa i mappen. Det kommer att behövas flera sidor (mappar). När en sida är fylld skall den skrivas till Temporary Storage med könamn UTDxPGM. Fortsätt sedan att läsa i filen och fyll på i mappen till du kommer till slutet av filen. Den sista, ej kompletta sidan, skall även den skrivas till TS. Visa sedan första sidan, som du måste hämta igen från TS. Avsluta sedan med möjlighet att fortsätta bläddring. Kontrollera för giltiga funktionsval, och ignorera felaktiga val. Vid F3 CLEAR=Avbryt så skall kontrollen återgå till Meny-programmet UTBxPGM. 2017 MONITOR IT-utbildning, Cobolskolan Sverige, www.cobolskolan.se B1-13

UTCxPGM 01 UTBPERS. UTBPERSx 01 UTBMAXX. Readnext File() Writeq TS Readq TS Send Map() Temporary Storage UTBMAP3 Kompilera programmet. Exekvera programmet och kontrollera resultatet. Uppgiften är avslutad. 2017 MONITOR IT-utbildning, Cobolskolan Sverige, www.cobolskolan.se B1-14

Övning 9 Asynkron bearbetning I denna övning så skall du bekanta dig med kommandon som t.ex. Start, Post och Cancel. Uppgift 1 Starta asynkron bearbetning Programmet UTCxPGM, som tidigare gjort LINK till programmet UTCxDB1 för att hantera operationer mot filen UTBPERSx, skall nu exekveras asynkront. Du skall i stället för Link starta programmet med kommandot Start. Det startade programmet behöver ju samma information som tidigare, och denna information skall överföras med Startkommandot. Retur-information till programmet UTCxPGM, kan nu inte heller finnas i Commarea. Denna skall placeras på TS. Bestäm själv könamn redan i programmet UTCxPGM. UTCxPGM skall efter det att programmet UTCxDB1 blivit startat med transkoden UTSx vänta under max 20 sekunder eller tills att UTCxDB1 indikerat att det har utfört uppdraget, läsa information från TS, och sedan visa på skärmen som tidigare. UTCxPGM 01 WS-Commarea. UTCxDB1 WS-Area Start Delay Readq TS Send Return Transid() Retrieve Read Writeq TS Cancel Reqid() UTBPERS UTBMAP2 Temporary Storage 2017 MONITOR IT-utbildning, Cobolskolan Sverige, www.cobolskolan.se B1-15

Kompilera programmet. Aktivera CEDF på skärmen där Presentationsprogrammet skall exekveras. Aktivera CEDX för transaktionen UTSx på en annan skärm. Exekvera programmen och kontrollera resultatet. Uppgiften är avslutad. Övningen är avslutad. 2017 MONITOR IT-utbildning, Cobolskolan Sverige, www.cobolskolan.se B1-16