CICS case study

About CICS and BMS - In this Mainframe Forum - You can post your queries on CICS

Moderators: DikDude, Natarajan, Moderator Group

Post Reply
priyadatt
Member
Posts: 4
Joined: Fri Oct 01, 2010 12:57 pm

CICS case study

Post by priyadatt » Wed Nov 10, 2010 2:15 am

Hi,

can somebody provide me the CICS COBOl Program Code for Online Billing Enquiry System.I need some sample so that I can get some guidance.I dont have hands on on CICS
Main screen:

Online Bill Enquiry System

Enter the Mobile Number : ___________________

Enter the Option: __
1. To view the entire bill with call records
2. To view the total amount
3. To view the amount on Date basis
4. To view the total incoming minutes
5. To view the total outgoing minutes






Message : ____________________________________________________________

F3 - Exit


first option screen:

Entire Bill Summary

Mobile Number : ___________________

Call Records :

S.No Call date Sec Phone Num Call Duration Call Status Cost

__ _______ ______________ _________ __________ _________
__ _______ ______________ _________ __________ _________
__ _______ ______________ _________ __________ _________
__ _______ ______________ _________ __________ _________
__ _______ ______________ _________ __________ _________
__ _______ ______________ _________ __________ _________
__ _______ ______________ _________ __________ _________

Message : ____________________________________________________________

F3 - Exit


Second Option Screen:

Total Cost Summary

Mobile Number : ___________________

Total Amount : ____________
No. of Calls : ___________










Message : ____________________________________________________________

F3 - Exit


Third Option Screen:

Cost Summary by Date

Mobile Number : ___________________

Call records by Date:

S.No Date Total # of calls Cost
__ _______ ___________ ________
__ _______ ___________ ________
__ _______ ___________ ________
__ _______ ___________ ________
__ _______ ___________ ________
__ _______ ___________ ________
__ _______ ___________ ________
__ _______ ___________ ________

Message : ____________________________________________________________

F3 - Exit


Fourth Option screen:

Incoming Calls Cost

Mobile Number : ___________________

Total Incoming Amount : ____________
No. of Incoming Calls : ___________










Message : ____________________________________________________________

F3 - Exit



Fifth Option screen:

Outgoing Calls Cost

Mobile Number : ___________________

Total Outgoing Amount : ____________
No. of Outgoing Calls : ___________










Message : ____________________________________________________________

F3 - Exit

User avatar
Natarajan
Moderator
Posts: 537
Joined: Fri Oct 10, 2008 12:57 pm
Location: chennai
Contact:

CICS bms casestudy

Post by Natarajan » Wed Nov 10, 2010 4:41 pm

Hi Priya,

Welcome to mainframegurul forums.
you are asking about CICS program.. are you completed BMS maps using BMS macros?


If you want to learn , how to code BMS maps.. please refer ibm manuals from below link.

http://www.mainframegurukul.com/ibm/manuals.php

If you have any questions on BMS.. You can post them here.
Natarajan
Chennai

priyadatt
Member
Posts: 4
Joined: Fri Oct 01, 2010 12:57 pm

Post by priyadatt » Thu Nov 11, 2010 12:32 am

I have completed the BMS maps..... now i m facing problem to write the program code. How many VSAM files will be used? What will be the structure? And if u can provide me the pseudo code of menu handling, main screen, option 1, option 2, option 3, option 4 and option 5. Below is the case study for which I want all this for which I have already given the screens above.

Pre-requistes
1. A VSAM file or DB2 table entry should be created with the Call records (mobile calls).
Note: Set up call records in such a way that there are minimum 20 call records made on different date for each mobile number

Screen Decription:
1. "Online Bill Enquiry System' will be first screen to be displayed
2. User enters the Mobile Number
3. User Enters the Option and press Enter
4. If Mobile Number is not present in DB2 or in VSAM file, proper error message should be displayed in "Message" section.
5. If an "Invalid Option" has been entered, error message should be displayed.


Option Description Remarks
1 Entire Bill with Call records This screen displays all the calls made or received by the mobile number
2 Total Amount This screen displays the total amount and total calls made or received by the mobile number
3 Amount on date basis This screen displays the calls made or received on a particular date by the mobile number
4 Incoming call cost This screen displays only the Cost and count of the incoming calls
5 Outgoing call cost This screen displays only the Cost and count of the Outgoing calls

Screen Description:
1. Call Date should be formatted as 'dd/mm/yyyy'
2. Call Date, Secondary Phone number,call duration and call status will be taken from DB2 or VSAM for this Mobile phone number
3. Cost needs to be calculated based on following logic for every Mobile number
If the call status in VSAM or DB2 is 'IN', each minute cost Rs 0.50. If call status is 'OT', each minute cost Rs 1.50.
If the minutes accumulation crosses 500 (including IN and OT calls sorted by date), then there after IN calls cost Rs 1.00 and 'OT' costs Rs 2.00 per minute
Screen Description:
1. Total Amount should be formatted as Rs xxxx.yy
2. Total Number of calls (including IN and OT)
3. Cost needs to be calculated based on following logic for every Mobile number
If the call status in VSAM or DB2 is 'IN', each minute cost Rs 0.50. If call status is 'OT', each minute cost Rs 1.50.
If the minutes accumulation crosses 500 (including IN and OT calls sorted by date), then after IN calls cost Rs 1.00 and 'OT' costs Rs 2.00 per minute
4. Any Unexpected Error should be displayed in Message
Screen Description:
1. Date should be in format dd/mm/yyyy
2. Total Number of calls (including IN and OT) made on that particular date by Mobile number.
3. Cost needs to be calculated based on following logic for every Mobile number
If the call status in VSAM or DB2 is 'IN', each minute cost Rs 0.50. If call status is 'OT', each minute cost Rs 1.50.
If the minutes accumulation crosses 500 (including IN and OT calls sorted by date), then after IN calls cost Rs 1.00 and 'OT' costs Rs 2.00 per minute
4. Any error message should be displayed in the "Message Section"
to be contd on next post......

priyadatt
Member
Posts: 4
Joined: Fri Oct 01, 2010 12:57 pm

Post by priyadatt » Thu Nov 11, 2010 12:34 am

Screen Description:
1. Total Amount should be formatted as Rs xxxx.yy
2. No. of Incoming calls is the count of 'IN' calls for the Mobile number
3. Cost needs to be calculated based on following logic for every Mobile number
If the call status in VSAM or DB2 is 'IN', each minute cost Rs 0.50. If call status is 'OT', each minute cost Rs 1.50.
If the minutes accumulation crosses 500 (including IN and OT calls sorted by date), then after IN calls cost Rs 1.00 and 'OT' costs Rs 2.00 per minute
4. Any Unexpected Error should be displayed in Message
Screen Description:
1. Total Amount should be formatted as Rs xxxx.yy
2. No. of Incoming calls is the count of 'IN' calls for the Mobile number
3. Cost needs to be calculated based on following logic for every Mobile number
If the call status in VSAM or DB2 is 'IN', each minute cost Rs 0.50. If call status is 'OT', each minute cost Rs 1.50.
If the minutes accumulation crosses 500 (including IN and OT calls sorted by date), then after IN calls cost Rs 1.00 and 'OT' costs Rs 2.00 per minute
4. Any Unexpected Error should be displayed in Message
these are as per the screen i have given in my first post

User avatar
Natarajan
Moderator
Posts: 537
Joined: Fri Oct 10, 2008 12:57 pm
Location: chennai
Contact:

sample CICS program flow

Post by Natarajan » Fri Nov 12, 2010 4:41 am

Here is the basic structure of CICS program for your cics case study.
You need to write down actual code based on below logical flow.

Code: Select all



 ******************************************************************
       LINKAGE SECTION.                                               
 ******************************************************************
 01  DFHCOMMAREA                 PIC X(02).    


 PROCEDURE DIVISION.


 IF EIBCALEN = 0
         
    use SEND command to send your CICS map "Online Bill Enquiry System "
    Issue RETURN command along with transid of this program & commarea value M0

 ELSE

    ** control comes here when user clicked on ANY KEY on any of the maps

    EVALUATE DFHCOMMAREA
      WHEN   'M0'    <-- First Map

            RECEIVE COMMAND ..

             Check cell phone number exists or not in VSAM file. 
             if not move message to message filed.
                send main map and Issue RETURN command along with 
                transid of this program & commarea value M0



             EVALUATE EIBAID                                           
                WHEN DFHENTER                          
                    
                     IF OPTIONI = 1
                        get required data from vsam 
                        populate values to map fields
                        SEND map &#40; first option screen &#41;
                        Issue RETURN command along with 
                        transid of this program & commarea value M1

                     IF OPTIONI = 2
                         get required data from vsam
                         populate values to map fields
                         SEND map &#40; second option screen &#41;
                         Issue RETURN command along with 
                         transid of this program & commarea value M2


                     IF OPTIONI = 3
                         get required data from vsam 
                         populate values to map fields
                         SEND map &#40; Third option screen &#41;
                         Issue RETURN command along with 
                         transid of this program & commarea value M3


                     IF OPTIONI = 4
                         get required data from vsam 
                         populate values to map fields 
                         SEND map &#40; Fourth option screen &#41;
                         Issue RETURN command along with 
                         transid of this program & commarea value M4

                     IF OPTIONI = 5
                         get required data from vsam 
                         populate values to map fields
                         SEND map &#40; Fifth option screen &#41;
                         Issue RETURN command along with 
                         transid of this program & commarea value M5
       
                     
                 WHEN OTHER                                               
                    MOVE 'INVALID KEY PRESSED' TO MSG1O             
                    Issue RETURN command along with 
                    transid of this program & commarea value M0
               END-EVALUATE. 
                       
      WHEN 'M1'

               REVEIVE COMMAND...

               EVALUATE EIBAID
                   WHEN DFHPF3

                        Send main map 
                        Issue RETURN command along with 
                        transid of this program & commarea value M0

                   WHEN OTHER  
                     MOVE 'INVALID KEY PRESSED. PRESS F3 ' TO MSG1O
                     Issue RETURN command along with 
                     transid of this program & commarea value M1
               END-EVALUATE
    
      ... Repeat above when clause for M2, M3, M4, M5..

   END-EVALUATE.

 END-IF.

Natarajan
Chennai

priyadatt
Member
Posts: 4
Joined: Fri Oct 01, 2010 12:57 pm

Post by priyadatt » Fri Nov 12, 2010 2:58 pm

Thanks Natrajan, I am working on this ..will tell u where i will get stuck...

I am creating VSAM file. The steps which i m following is :

Creation of QSAM file.
Creation of KSDS and VSAM.
Using above fileas,JCL and a COBOL pgm, I will populate the VSAM files.

IS it correct? or for populating VSAM what other ways are there other than writing a pgm...

User avatar
Natarajan
Moderator
Posts: 537
Joined: Fri Oct 10, 2008 12:57 pm
Location: chennai
Contact:

Post by Natarajan » Fri Nov 12, 2010 5:01 pm

We can populate data from flat file to VSAM file using REPRO command , IDCAMS utility.

Code: Select all

 EXEC PGM=IDCAMS
//SYSPRINT  DD SYSOUT=A
//INDD DD DSN=...  
//OUTDD  DD DSN=...
//SYSIN DD *
REPRO -
   INFILE&#40;INDD&#41; -
   OUTFILE &#40;OUTDD&#41;
/*
If you have FILE AID utitlity , you can directly edit your VSAM file and enter data into it.
Natarajan
Chennai

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others