IBM MTM 2018: Part Three – Challenge #06

I’ve noticed some other Belgians have reached the wall of fame on mybluemix, nice! All from the same school too! Where are the New Media and Communication students at? Hello? *echo*

Come on Kevin! I know, I know, I’m slacking… I had time to make a blogpost yesterday but decided to just watch some Netflix and shut down my brain for a few hours. It was awesome! Well, time to put my brain Billie Branchboots back to work for a few weeks. No breaks allowed!

This is the last small and short challenge of IBM’s Master The Mainframe Part three series. The following blogposts will be significantly longer and more complex hereafter.

Load Client Records in VSAM

IBM Master the Mainframe Part Three – Challenge #06

VSAM, Virtual Storage Access Method, is used as an access method to manage verious user data types. VSAM is a high performance data set type and popular for storing critical data. This challenge is about defining a VSAM KSDS and load client data from a sequential data set.

If you’re interested, then you can either read IBM’s redbook or read this VSAM tutorial to know more about VSAM. BUT! It is required to read about KSDS before attempting this challenge.

We need to create the data structure above. Let’s go! Let’s edit Z30163.JCL(defvsam).

I’m in, now I need to do the following:

  1. Replace @TYPE with VSAM DEFINE parameter to define VSAM KSDS type
  2. Replace @LENGTH,@OFFSET to specify VSAM KSDS key
  3. Replace @MIN,@MAX to specify VSAM KSDS minimum and maximum record length

Again, no solution this time! Sorry! I might be able to help a bit though! Tutorialpoint gives us this:

RECSZ(average, maximum)
KEY(length, offset)

Regarding RECORDSIZE, keep in mind that each record is 170 characters long. Regarding KEYS, specifies the length and offset of primary key from first column. Think about it 🙂


SYSTSPRT looks okay, now just copy to P3.OUTPUT(#06) and I’m done!

Took me longer than expected

I thought this would only take me 15 minutes or so. Sadly, I was wrong. It took me about an hour and a half.

Next challenge is very long, seriously! Next up, DB2 relational databases! I’ll probably do challenge 07 and 08 this weekend. Expect the longest blogpost ever! I’ll be sure to contact guinsess worlds records.

What took you longer than expected?

10 thoughts on “IBM MTM 2018: Part Three – Challenge #06

  1. I had the same values, but I don´t understand why the offset is zero (0) in Key(8,0) is it not supposed to be the difference between the begin column and the end column of the record layout?

    1. Key(8,0) means that the key has a total length of 8 and starts at offset 0, which in this case 0 means the first position within the record. For more information check out dbzTHEdinosauer’s answer on

      If offset would be 1, then it would start from the second position. If it was 7, then it would start from the eighth position. From the beginning of the file, how much do I skip? What’s the offset? That’s my two cents.

      Sorry for the late reply, been busy 🙂

      Kind regards

    1. Hi Anna

      This is a common issue throughout the challenge, it just means the disk is full. You might want to ask an IBM employee for help via mail or on their dedicated Slack channel (fastest medium). They need to free up some space.

      You can contact them on the following urls:, mail to [email protected] or

      I personally use their Slack to solve issues like this.

      Kind regards

        1. Hi Anna

          I can’t access the system right now but I think that looks right. If you’re not getting the results you want, then you could try KEY(8,0) instead of KEYS. Don’t forget the commas.

          Kind regards

Leave a Reply

Your email address will not be published. Name, email and website not required.