1 / 36

BCIS 4620 Assignment #3 SQLCOBOL Project

BCIS 4620 Assignment #3 SQLCOBOL Project. Running COBOL with Embedded SQL Code. Assignment Overview. Project folder created All files included; FILE.INFILE, SQLCA.CPY Edit COBOL program. SQLCOBOL.CBL Maintain SQL Environment CREATE all TABLEs and VIEWs DEPT, DEPARTMENT, EMP, VPHONE

jalen
Télécharger la présentation

BCIS 4620 Assignment #3 SQLCOBOL Project

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. BCIS 4620Assignment #3SQLCOBOL Project Running COBOL withEmbedded SQL Code

  2. Assignment Overview • Project folder created • All files included; FILE.INFILE, SQLCA.CPY • Edit COBOL program. SQLCOBOL.CBL • Maintain SQL Environment • CREATE all TABLEs and VIEWs • DEPT, DEPARTMENT, EMP, VPHONE • Primary, foreign key constraints • Rebuild/Run

  3. We will use the SQLCOBOL.CBL program provided by Instructor Open a New PROJECT folder • I suggest you create the physical subdirectory first. • Put it on the Drive you plan to do most of your programming. • This may be your Flash Drive

  4. SQLCOBOL.CBL, FILE.INFILE

  5. Select the Main COBOL Program

  6. That Was Easy!

  7. Check “Yes”

  8. SQLCA.CPY?

  9. SQLCA.CPY – COBOL Copylibrary Program (COPYLIB)

  10. All Files Present in Workspace

  11. Start to Edit COBOL program

  12. Search/Find in Text

  13. Find “BECKER” [line 03080]

  14. Replace ALL… [8 fixes]

  15. Adjust the Sequence Identifier in Columns 73-80 [8 fixes]

  16. Save; Close “Find/Replace”

  17. Find “DEPARTMENT”

  18. Find “VPHONE” the VIEW

  19. Missing “DEPARTMENT”

  20. DEPARTMENT = Backup Copy of DEPT

  21. Query to Reset LOCATION/SQLID

  22. Save Query in Location = ITDS4620

  23. SET LOCATION/SQLID

  24. Run “Batch”

  25. READY? • Project folder created • All files included; FILE.INFILE, SQLCA.CPY • Edit COBOL program. SQLCOBOL.CBL • Maintain SQL Environment • CREATE all TABLEs and VIEWs • DEPT, DEPARTMENT, EMP, VPHONE • Primary, foreign key constraints

  26. “Rebuild” Project [F7]

  27. BCIS 4620Assignment #3SQLCOBOL Project(CONTINUED) Running COBOL withEmbedded SQL Code

  28. Animate “Run” [F5]

  29. Correct “Application Output” window [Produced by DISPLAY statement] Program results are “WRITEned” into: FILE.OUTFILE And placed in same directory as the FILE.INFILE

  30. Did You Get an SQLCODE: -1100/-1352/etc. ?? SQL errors may be caused by many things. See lists of SQLCODEs in the “HOT LINKS” section of my Course website. TIP: Make sure “SQL0xxxx” COBOL Sequence numbers are all in Columns 73-80.

  31. FILE.OUTFILE will be created in same Project Folder

  32. EMP & DEPT both unchanged? Why?

  33. Export EMP to MYEMP.SQL“RUN” when ready! NOTE: EXPORT box settings: FORMAT: SQL Check boxes: Comment, Insert, Create, Index

  34. When Promted; Say “Yes” SAVE AS: MYEMP.EXP file

  35. MYEMP.EXP viewed in Notepad

  36. IMPORT utility may be used to LOAD external data files into the DB2 database Several Formats are supported ASCII, dBase, etc.

More Related