Tuesday, October 12, 2021

IBM Z Xplore - Getting through Files Challenge in Fundamentals level

Hello πŸ‘‹,

In this post, I'll guide you through the second challenge, Files, in the Fundamentals level.



If you're new here, I would recommend you to check my previous post on IBM Z Xplore and getting thru the first challenge (VSC1) in the Fundamentals level, πŸ‘‰ here


Let's get started 

From the home page of IBM Z Xplore, you just need to click on that tile that say Files.

Now, you'll have to watch a video which runs for 2 minutes. This will help you demystify what the equivalents of files πŸ–Ή and folders πŸ“are known as, in IBM Z systems. 

Data Sets and Members

In a Windows system, you've got Files and Folders. Likewise, in IBM Z, they are Data sets and PDS (Partitioned Data Set) respectively. 

        Files (in Windows)          =     Data sets (in IBM Z)
Folders (in Windows)     =     PDS (in IBM Z)

A file in Windows system can either be inside a Folder or outside, but it's still called as file. In IBM Z, if a file (actually, Data set) is inside a PDS, it's a Member. If the file is not inside a PDS, it's a Sequential Data set.

Inside the Files in Windows system, you've got Lines. Inside a Sequential Data set and member(s) of PDS, you've got Records.

Keep it Simple: A Sequential Data Set store records sequentially one after the another. It is useful where all the data needs to be referenced in the order that it was stored, such as a log or report. 
A Partitioned Data Set stores data in individual members. An example of the type of data stored in a PDS would be Program Load Modules or JCL Batch jobs.
z/OS works with a number of different types of Data Sets though but they're all out of scope for now. 
 
The way you name a Data Set or PDS is quite different in IBM Z as there are some rules:  
  • A data set name consists of one or more parts connected by periods. Each part is called a qualifier.
  • Each qualifier must be 1 to 8 characters in length.
  • Each qualifier must begin with an alphabetic character (A to Z) or the special character @, #, or $.
  • The remaining characters in each qualifier can be alphabetic, special, or numeric (0 to 9) characters.
  • The maximum length of a complete data set name before specifying a member name is 44 characters, including the periods.
Some examples for valid Data Set names are,
INPUT.FILE.#1
OUTPUT.FILE.#1
S

You're all caught up! 

After watching the 2 minute video πŸ“Ή, you'll have to take up a quiz which contain 3 questions. You'll get 3 brownie points if you answer all the 3 questions correctly. 

I'm gonna put the questions here but without the answers. Give it a go.  

Question 1: What are the two types of data sets we learned about so far?
Question 2: Which of the following can go inside a Partitioned Data Set, and can contain Records?
Question 3: Which data set do you have full read & write access to? (Hint: Your own data sets)

The Challenge πŸ’ͺ

Grab a copy of  the challenge instructions PDF.  Fire up the VS Code application in your PC and get into the Zowe Explorer extension. 

First thing that you have to do as part of this challenge is to have the data sets and members, that you'll use for this challenge, created from ZXP.PUBLIC.JCL (a read-only PDS) to your personal PDS, ZXXXXX.INPUT.  (Please make sure to enter your Z ID, not ZXXXXX).

Now, go through each and every member in your personal PDS (ZXXXXX.INPUT) for one of them will contain text directing you to rename it and the name you should rename it to. Follow the instructions in the PDF carefully to rename the member. 

Tip πŸ’‘: Don't miss to read the blue boxes (usually at the bottom of each page) in the Challenge Instructions PDF. 

After renaming the member, continue going through other members for one of them will direct you to delete it . Just right click on that member and choose "Delete". Poof! πŸ’¨ It should've been gone. 

Done with the renaming and deletion? 

Alright. Get into a different PDS named as ZXXXXX.SURPRISE. It will have only one member in it. You need to copy that member to your personal PDS (ZXXXXX.INPUT). How? The instructions in the PDF has it all. It's just a matter of few clicks on your mouse and you'll be done. 

Roger, Copy that?

Now, you should be looking for a Sequential Data set named as ZXXXXX.SEQDS. 

You'll usually view the contents of the members and data sets on the right side, on a editor which is called as Z Open Editor. It's an extension in VS Code and it allows you to view, edit and save z/OS data sets. 

Use the Z Open Editor to view the contents of the Sequential Data set and add a new line at the bottom (after the line starting with 'Visit') and enter some text. The text can be anything as long as it's appropriate. 


 You may then press Ctrl + S to save the dataset. 

Lastly, you've to make your own member in your personal PDS. To do that, just right click on your personal PDS, ZXXXXX.INPUT and choose 'Create New Member'. When prompted for a name, type MYNEWMEM as the name and hit Enter. You'll be done. 

Finish line 🏁

Now, you've got to record your victoryπŸ₯‡. In ZXP.PUBLIC.JCL PDS, look for FILES1 member, right click on it and select “Submit Job” to hand in your work. 

Then go back to IBM Z Xplore and Open the Files challenge. Go to the bottom of the page and hit on "CHALLENGE COMPLETE, CHECK MY JCL SUBMISSION". When you come out of the page, you should've unlocked new challenges.  

I hope that by now, you would've got acquanited with the PDS, members, data sets and records. In the next post, we'll look into JCL1 challenge in Fundamentals level.  



1 comment:

  1. would you happen to have a copy of the pdf files you can share?

    ReplyDelete