About Detlef

AKA The COBOL Kid

COBOL and the Dinosaur Story

COBOL is not a Dinosaur!

Everybody who ever heard something about COBOL, especially that is is an OLD Langugage, needs to view this Video.
Then, imagine, really imagine the impression to a point where you see the picture of COBOL beeing one of the most modern languages you can think of.

There is only one limit in this world, your Brain.

Poor Quality Code

Here’s an older but Interesting Article on CIO.com.  Bill Curtis from Cast said

“there are many people going into Java now that really don’t have strong computer science backgrounds. We may just be seeing the fact that there is an awful lot of people writing code who aren’t gurus in software engineering.”

What does that really mean?

I was always told that students do not learn COBOL at school because it is not modern. Now I read that they learned the modern language Java but only up to the point to write “Hello World”?
I have to repeat my most important message again! How can we make students understand that COBOL is not dead? How can we make Teachers understand that they have to teach even so called dead languages?

Let’s start the Discussion! You, yes you, who just read it, play the Ball.

I think it will not be the last time to repeat this.

Here’s the full article.

CIO article snip

If someone in Germany, Area Cologne, wants to learn COBOL and more, please contact me via

Detlef.Lexut @ lexut.de (no spaces)

COBOL Skills Gap opening wide

Today I read an interesting article from Ed Airey about the “COBOL Skills Gap“. When Ed says “If we don’t drive interest in IT the impact on business could be brutal.”, and I just can completely agree to this. I see COBOL Programmers leaving companies where they worked more then 30+ years. These Programmers built applications from scratch and maintained these for decades to adjust them to market needs. When these people retire they are sometimes replaced by 2 or more programmers to fill the gap. And I am talking about really experienced individuals, and yes, you guess right, they will also retire soon. Ed also writes: “The student perception of languages such as COBOL is that it is considered ‘un-cool, outdated or even ‘dead’. The current business use and reliance on the COBOL language demonstrates this to be an incorrect position.”  Agreed, I also find Java Programmers who talk about COBOL will be gone by 2015 because IBM will no longer develop CHIPs that can run COBOL Programs. I don’t know where they get this idea from but I know that we have to do something to share our knowledge with the future students. let's-talkI am wondering how one can help here. Myself I am writing in this ‘un-cool’ and ‘dead’ language since 25+ years. Using the Micro Focus Workbench I started writing Mainframe emulators. A complete Toolset to migrate files, run Batch processes and Emulating a whole Transactional System, all written in this ‘un-cool’ Language. How can we make students understand that COBOL is not dead? How can we make Teachers understanding that they have to teach even so called ‘dead’ languages? Let’s start the Discussion! You, yes you, who just read it, play the Ball.  Let’s talk. Wants to read the full Article? Here you go.

CZO_20130426_001

Leave a comment below and let’s continue the conversation.

Oh great, how did you do this, what language?

Oh great, how did you do this, what language?

A good friend of mine had a question to me today. He had a simple text file with blocks of various number of lines that he would like to be sorted by a string identifiable in each blocks header line.
The file itself was about 22,000 lines, to much for manual sorting. He asked me if I would have an idea for a tool or software like Textpad to do this job.
I just told him I can make this happen in an hour and then he can check results and if it fulfils his requirements. We agreed to this.
After just 15 minutes I sent the file back to him. He tested quickly and figured out it still has some curious things like being shown before . This was just a forgotten UPPER vs. lower case issue. Fixed and sent back a new file in another minute. File looked great then.

While I am writing the friend is keen to get the information on how I did this. He is a real good programmer; he has all the tools I am having. But sometimes it is really beneficial to think about the good old tools that you have somewhere around. Yes, we have text files, but this must not require modern tools like Textpad to handle such files efficiently.

I used a simple 120 lines COBOL code and a small JCL to run the job. 105 of the lines were just COPY & PASTE and the rest was quickly typed in. The JCL was copied and only the file names had to be added. With some tricks we probably can write the same COBOL code in less then 50 lines. It would still do the same damned good job but it would not look that easy it is looking right now.


The CODE:
###############################################################################
###############################################################################
###############################################################################
      ******************************************************************
      *                                                                *
      *    I D E N T I F I C A T I O N                     DIVISON     *
      *                                                                *
      ******************************************************************
       IDENTIFICATION DIVISION.
       PROGRAM-ID.    TstSRT04.
      ******************************************************************
      *                                                                *
      *    E N V I R O N M E N T                           DIVISON     *
      *                                                                *
      ******************************************************************
       ENVIRONMENT DIVISION.
      ******************************************************************
      *    C O N F I G U R A T I O N                       SECTION     *
      ******************************************************************
       CONFIGURATION SECTION.
       SPECIAL-NAMES.
           DECIMAL-POINT     is   COMMA.
      /*****************************************************************
      *    I N P U T - O U T P U T                         SECTION     *
      ******************************************************************
       INPUT-OUTPUT SECTION.
       FILE-CONTROL.
       SELECT                     I1
               ASSIGN         TO  I1
               ORGANIZATION   IS  SEQUENTIAL SARF
               FILE STATUS    IS  STAT.
       SELECT                     O1
               ASSIGN         TO  O1
               ORGANIZATION   IS  SEQUENTIAL SARF
               FILE STATUS    IS  STAT.
       SELECT                     S1
               ASSIGN         TO  S1
               FILE STATUS    IS  STAT.
      /
      ******************************************************************
      *                                                                *
      *    D A T A                                         DIVISON     *
      *                                                                *
      ******************************************************************
       DATA DIVISION.
 
      ******************************************************************
      *    F I L E                                         SECTION     *
      ******************************************************************
       FILE SECTION.
       FD  I1.
       01  I1Rec                       PIC  X(500).
       FD  O1.
       01  O1Rec                       PIC  X(500).
       SD  S1.
       01  S1Rec.
           05  S1Key.
            10 S1KeyID                 PIC  X(100).
            10 S1KeyCnt                PIC  9(010).
           05  S1Data                  PIC  X(500).
 
      ******************************************************************
      *    W O R K I N G - S T O R A G E                   SECTION     *
      ******************************************************************
       WORKING-STORAGE SECTION.
       01          WorkFlds.
        05         wSrtKeyID           PIC  X(100).
        05         wSrtKeyCnt          PIC  9(010).
        05         tLgI                PIC  9(004)  COMP-5.
      ******************************************************************
      *            global workfields used anywhere in the pgm          *
      ******************************************************************
           05      STAT                PIC  X(002).
      ******************************************************************
      *                                                                *
      *    P R O C E D U R E                               DIVISON     *
      *                                                                *
      ******************************************************************
       PROCEDURE DIVISION.
      ******************************************************************
      *    A - M a i n                                     SECTION     *
      ******************************************************************
       A-Main SECTION.
           PERFORM  C-Sort1
           STOP   RUN
           .
       C-Sort1 SECTION.
           OPEN  INPUT   I1
           OPEN  OUTPUT  O1
           MOVE  LOW-VALUE  TO  wSrtKeyID
           MOVE  ZERO       TO  wSrtKeyCnt
           SORT  S1  ascending key  S1Key
                     INPUT  PROCEDURE IPROC
                     OUTPUT PROCEDURE OPROC
           CLOSE  I1
           CLOSE  O1
           .
       IPROC SECTION.
       IPROC-Loop.
           READ  I1  next
                 at  end  EXIT  SECTION
           end-read
           IF  I1Rec(01:17)  =  "/****** Object:  "
               MOVE  I1Rec(18:)     TO  wSrtKeyID
               MOVE  ZERO           TO  wSrtKeyCnt
               MOVE  length of          wSrtKeyID  TO  tLgI
               CALL  "YUCASE01"  using  wSrtKeyID, tLgI
           end-if
           ADD     1           TO  wSrtKeyCnt
           MOVE    wSrtKeyID   TO  S1KeyId
           MOVE    wSrtKeyCnt  TO  S1KeyCnt
           MOVE    I1Rec       TO  S1Data
           RELEASE S1Rec
           GO      IPROC-Loop
           .
       OPROC SECTION.
       OPROC-Loop.
           RETURN  S1
                 at  end  EXIT  SECTION
           end-return
           MOVE   S1Data  TO  O1Rec
           WRITE  O1Rec
           GO     OPROC-Loop
           .
      *-eof-*
###############################################################################
###############################################################################
###############################################################################

THE JOB CONTROL:
###############################################################################
###############################################################################
###############################################################################

stp  TSTSRT04;
asg  I1  C:\TEMP\SPS_TABLES_082311_NOTSORTED.TXT;
asg  O1  C:\TEMP\SPS_TABLES_082311_SORTED.TXT;
def  O1  StripSpace=Yes;
endstep;

done:
*eof
###############################################################################
###############################################################################
###############################################################################

The JOB EXECUTION:
###############################################################################
###############################################################################
###############################################################################


###############################################################################
###############################################################################
###############################################################################

Job ran in less then a second to sort all the blocks in the 22,000 lines.

COBOL can help you always. Just have the right ideas. And of course, you should have these at the right times. 🙂

That sounds great, and what language did you choose?

This week I was talking to the Assistant of a General Manager at a not so small company.

Generally there were some questions regarding COBOL, SOA, BPEL and WebServices and how to get there. While talking about this and that we came to a point where I was talking about some work I did in the past weeks.

For their development environment we change the Visual Source Safe checkin methodology from a manual to an automated way. Production still runs on a BULL coupled system and another machine is type of integration. Parallel to this there is another production environment on the Windows side as well as an Integration. And not to forget about the Development on the Windows side. Once Sources are checked out from VSS it will reside on the developers local machine and once checked in the source will get write-protected on the local machine. But there was manual process to push sources to the two different Integrations as well as the two Production environments. Wherever human action is in place there is a small hole (or a big one?) for failures or simple immediate requirements. Over the last several years there were many sources, copies or programs, not synchronized causing potential issues in future. Now, I wrote a couple programs to control the push of sources. Instead checkin in manually there are now defined procedures to follow. Source must go to Mainframe Integration and being compiled there for use on the integration. At the same time another automated process will make sure sources are also pushed to the Windows Integration machine. No interaction required. Then, after the departments tested they have to use one command on the Mainframe production to move the sources to the Mainframe production and once successfully compiled the sources will pushed to the Windows Production and from there another process will pick up everything and automatically checkin the sources into the VSS database. It is doing so with the credentials of the user who originally checked the sources out from VSS!. To be able to do this the developers had once to provide there password and save it somewhere. There is a program that uses WinZip or WinRar to pick up the password and crypt it, the crypted string is then stored in file and converted back at the time we need to connect into VSS.

The question from the Assistant was: What language did you use to write all these processes like watching for files in directories, manipulating these in binary formats. How to interrogate with VSS? is this C++ or Java? How do the Processes on the Mainframe work?

My simple answer to all the questions! I used COBOL.

 

Remember at the beginning, sources on the local drive get their write protection with the manual process. Now, we checkin from the Production Windows Machine. There is no way to get back to the Developers machine. I’m blogging about it when it’s in place. In the meantime you can guess a bit about what language this can be written in? And guess about what problems may arise and how to get around these. Spread your mind.

 

The COBOL Kid

Plugin by Social Author Bio