Who Do You Call?
Select messages from
# through # FAQ
[/[Print]\]

MVSFORUMS.com -> Mainframe Challenge

#1: Who Do You Call? Author: samlwho PostPosted: Thu Apr 12, 2007 3:00 pm
    —
In HOGAN COBOL who do you call to do the following:

1). Read a file?

2). Write a file?

3). Issue a condition code?

#2:  Author: kolusuLocation: San Jose PostPosted: Thu Apr 12, 2007 3:10 pm
    —
samlwho,

The 'Mainframe challenge' forum is, for setting problems you already know the answer to and seeing how well others answer it. Please post all your help related questions in the right forum

Kolusu

#3:  Author: samlwho PostPosted: Thu Apr 12, 2007 3:14 pm
    —
Kolusu

Yes, I understand that and I know the answer to the question I just want to see if anyone else knows the answer.

I will post it tommorow.

Thanks,
Samlwho

#4:  Author: samlwho PostPosted: Fri Apr 13, 2007 12:24 pm
    —
In HOGAN COBOL who do you call to do the following:

1). Read a file?
---->The answer is PEM or the Processing Environment Manager.

2). Write a file?
---->The answer is PEM or the Processing Environment Manager.


3). Issue a condition code?
---->The answer is no one, when a condtion code is issued the program abends listing the predefined condtion for the cause of the abend.


In HOGAN COBOL instead of defining input and output files in the program, they are defined in the CICS region as Read and/or Write activities under the HOGAN Umbrella. Therefore, when you want to read and/or write simply call PEM and he will handle the rest.

Below is a HOGAN COBOL program that has READ, WRITE & CONDITION CODES.

Note the condition codes are only issued when PEM does not return with a good result after performing the desired action otherwise processing continues and the program ends normally.


Code:

       IDENTIFICATION DIVISION.
       PROGRAM-ID. X99999.
       AUTHOR.                                                           
       DATE-COMPILED.
       ENVIRONMENT DIVISION.
       CONFIGURATION SECTION.
       SOURCE-COMPUTER.    IBM-370.
       OBJECT-COMPUTER.    IBM-370.
       DATA DIVISION.

       WORKING-STORAGE SECTION.
       01  CONSTANTS.                                                         
           05 CN-1                    PIC 9(01)        VALUE   1.       
           05 CC-N                    PIC X(01)        VALUE  'N'.     
           05 CC-Y                    PIC X(01)        VALUE  'Y'.     

      ******************************************************************
      *THESE ACTIVITIES ARE DEFINED IN THE CICS ONLINE REGIONS.         
      *BOTH OF THESE ACTIVITIES WILL MANIPULATE HIERARCHICAL DATABASES.
      ******************************************************************

       01  PEM-ACTIVITIES.                                             
           05  ACTY-11111-DUMMY.                                       
               10  FILLER              PIC S9(8) COMP  VALUE +11111.   
           05  ACTY-22222-DUMMY.                                       
               10  FILLER              PIC S9(8) COMP  VALUE +22222.   

      ******************************************************************
      *THESE CONDITION CODES ARE ALSO DEFINED IN THE CICS REGIONS.     
      *11111 ='S ACTION SUCCESSFUL                                     
      *22222 ='S ACTION NOT SUCCESSFUL                                 
      ******************************************************************

       01  CONDITION-CODES.
           05  FILLER                  PIC S9(8) COMP  VALUE +11111.
           05  FILLER                  PIC S9(8) COMP  VALUE +22222.
       01  FILLER  REDEFINES           CONDITION-CODES.
           05  FILLER                  PIC X(2).
           05  COND-CODE-11111         PIC X(2).
           05  FILLER                  PIC X(2).
           05  COND-CODE-22222         PIC X(2).

      ******************************************************************
      *ALL INCLUDES (-INC) PRIOR TO THE LINKAGE SECTION ARE HOGAN DEFINED     
      *COPYBOOKS THOSE AFTER THE LINKAGE SECTION ARE USER DEFINED.     
      ******************************************************************

-INC             XXXXXXX                                                       %
-INC             XXXXXXX                                                       %
-INC             XXXXXXX                                                       %
-INC             XXXXXXX                                                       %
-INC             XXXXXXX                                                       %
-INC             XXXXXXX                                                       %
-INC             XXXXXXX                                                       %
-INC             XXXXXXX                                                       %
-INC             XXXXXXX                                                       %
-INC             XXXXXXX                                                       %
       LINKAGE SECTION.
-INC             XXXXXX1                                                       %
-INC             XXXXXX2                                                       %

      ******************************************************************
      *ALL OF 01 LEVELS OF THE COPYBOOKS AFTER THE LINKAGE SECTION ARE 
      *DEFINED BELOW.                                                   
      ******************************************************************

       PROCEDURE DIVISION
           USING
               XXXXXX1
               XXXXXX2.
             

       AA000-HOUSEKEEPING  SECTION.
           MOVE LOW-VALUES TO TCB-USER-CC
                              TCB-RESULT
                              CDMF-RESULT.
       AA000-EXIT.
           EXIT.

       AB000-MAINLINE SECTION.

           PERFORM AC000-INQ-ON-DB.

       AB000-EXIT.
           EXIT.

       AC000-INQ-ON-DB                 SECTION.

           MOVE 123456                 TO XXXXXX1-CUST-NO
           MOVE DGA-READ               TO XXXXXX1-ACTION               
           MOVE LOW-VALUES             TO XXXXXX1-RESULT
           MOVE ACTY-22222-DUMMY       TO TCB-LONG-ACTIVITY             
           PERFORM CA000-CALL-PEM

           IF  XXXXX1-RESULT        = DGR-OK
               PERFORM AD000-SET-REPRINT-FLAG
           ELSE
               MOVE COND-CODE-22222    TO TCB-USER-CC
               GO TO ZZ000-END-OF-PROCESSING
           END-IF.

       AC000-EXIT.
           EXIT.

       AD000-SET-REPRINT-FLAG          SECTION.

           MOVE CC-Y                   TO XXXXXX2-ON-FLAG               
           MOVE DGA-WRITE              TO XXXXXX2-ACTION               
           MOVE LOW-VALUES             TO XXXXXX2-RESULT
           MOVE ACTY-22222-DUMMY       TO TCB-LONG-ACTIVITY
           PERFORM CA000-CALL-PEM

           IF  XXXXXX2-RESULT       = DGR-OK
               MOVE COND-CODE-11111    TO TCB-USER-CC
               GO TO ZZ000-END-OF-PROCESSING
           END-IF.

       AD000-EXIT.
           EXIT.

       CA000-CALL-PEM  SECTION.
           CALL 'PEM' USING TRANSACTION-CONTROL-BLOCK.
       CA000-EXIT.
           EXIT.

       ZZ000-END-OF-PROCESSING SECTION.
      *****************************************************************
      *                                                               *
      *          THIS SECTION ENDS PROCESSING FOR THIS PROGRAM.       *
      *                                                               *
      *****************************************************************
           GOBACK.

#5:  Author: kolusuLocation: San Jose PostPosted: Fri Apr 13, 2007 12:36 pm
    —
Samlwho,

Quick question. Who is the author of this hogan cobol? Any documentation or info regarding will be helpful.

Kolusu

#6:  Author: samlwho PostPosted: Fri Apr 13, 2007 3:02 pm
    —
Kolusu,

I think the author is Bernie Hogan, from my understanding the UMBRELLA system was developed in 1978 and is primarily used in the banking industry.

I do not have a way of providing any documentation as it is all on our book manager system therefore I cannot provide a link. CSC in Dallas provides support for all of the institutions who currently operate under the Hogan Umbrella, they also provide training for new HOGAN programmers.

I attended their training about 8 years ago in Dallas.

Here are some links that will provide some general information about HOGAN COBOL.


http://www.csc.com/industries/banking/offeringdetails/822.shtml
http://www.csc-fs.com/hogan/downloads/HoganCourseCatalog.pdf



MVSFORUMS.com -> Mainframe Challenge


output generated using printer-friendly topic mod. All times are GMT - 5 Hours

Page 1 of 1

Powered by phpBB © 2001, 2005 phpBB Group