Hello!
This challenge is a bit the same as last year except it has a few more data types to learn. Bits, Nibbles, Bytes, Hexadecimal, EBCDIC, ASCII, and BCD. Last year we didn’t learn about Nibbles (4-bits) or BCD. Time for something new!
z/OS its default encoding is EBCDIC. EBCDIC stands for Extended Binary Coded Decimal Character Interchange Code. It’s an 8-bit-standard way to store letters and punctuation marks. Here is a handy EBCDIC table.
In each table cell above, the first row is an abbreviation for a control code or (for printable characters) the character itself; and the second row is the Unicode code (blank for controls that don’t exist in Unicode).
You can read what IBM wrote about EBCDIC on mtm2019.mybluemix.net. I won’t explain the character formats on this blog as IBM already does on the challenge page itself.
EBCDIC Character Encoding
IBM Master the Mainframe 2019 Part Two – Challenge #08
We need to edit Z#####.PDS.DATA and make a new member called EBCDIC. Then we need to copy a data set into it and change the way we view the file.
- dslist pds.data as primary command.
- e as line command next to the data set.
- s EBCDIC as primary command.
- copy ‘zos.mtm2019.public.shared.data(ebcdic)’ as primary command inside EBCDIC member.
- hex on as primary command.
- cols as primary command.
This is what I see. We don’t have to do anything yet. Now let’s go back to our data set and create the next member. Press F3.
ASCII Character Encoding
Still inside PDS.DATA we create a new member ASCII and copy some data into it.
- s ASCII as primary command.
- copy ‘zos.mtm2019.public.shared.data(ascii)’ as primary command.
- hex on ; reset ; as primary command.
- source ascii as primary command.
- cols line command at 000004.
This is what I see. Now I will enter the primary command reset to reset my view and enter the primary command cancel to cancel my changes.
BCD and Packed Decimal Character Encoding
Again in PDS.DATA we will create a new data member called packed and copy some data into it.
- s packed as primary command.
- copy ‘zos.mtm2019.public.shared.data(packed)’ as primary command inside edit mode of the member packed.
This is what I get. Let me first reset and then do the following.
- Overtype line 5 with cols
- Overtype line 6 with hx
- Overtype line 9 with hx
- Overtype line 12 with hx
This is the result. Looks good! Let’s cancel and select a new member so we can solve this challenge using cancel ; s #08 as primary command.
Complete the Challenge
IBM wants us to type a few things.
- Do not press enter key until explicitly reading ‘now press enter key’
- Tab to first empty line and type 0123456789
- Tab to second empty line and type uppercase A
- Tab to third empty line and type lowercase z
- Tab to forth empty line and type number 4096
- Now press enter key
Let’s enable the hex view using hex on primary command to see what we are dealing with.
Change member #08 as follows:
- Change line 2 column 1 from EBCDIC uppercase A to ASCII uppercase A
- Change line 3 column 1 from EBCDIC lowercase z to ASCII lowercase z
- Change line 4 columns 1-4 from EBCDIC 4096 to Packed Decimal 4096
Line 4 – Packed Decimal 4096 will leave column 3 unused
Line 4 – Change column 3 to x’40’, an EBCDIC space
Hmm, seems very complicated! Let’s see what I can do. I will use an array to display the changes I make. With the first element inside the array being the hexadecimal high order byte and the second element being the hexadecimal low order byte.
Change line 2 column 1 from EBCDIC uppercase A to ASCII uppercase A
We see that uppercase A in EBCDIC is [C,1]. In ASCII uppercase A is [4,1]. So let’s change that!
Change line 3 column 1 from EBCDIC lowercase z to ASCII lowercase z
Again we can consult the table above. z in EBCDIC is [A,9]. In ASCII lowercase z is [7,A].
Change line 4 columns 1-4 from EBCDIC 4096 to Packed Decimal 4096
4096 EBCDIC to 4096 packed decimal is easy. [04,09,6D] will be the new number.
I have changed the other column to [4,0] so it becomes a space.
Copying to P2.OUTPUT
This is what my copy looks like.
I feel like this should be correct. Let’s overtype 000001 with line command c99 and then issue the primary command rep p2.output(#08).
I’m too curious! I’ll just run TSO SCOREP2 primary command to see if what I have is correct.
It’s correct! Phew, this was a hard one!
Hi,
for those who, like me, didn’t got why 4096 is in 3 bytes, on http://mtm2019.mybluemix.net/references/references_character_encoding.html table 3, we see the following: the last 4 bits (that should be in a byte) should contain the sign.
so:
4096+ is taking 5 caracters, but we need to be on 6 to match sentence above
04096+ works!
another explanation that seems way more clear for me:
https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_74/rzasd/padecfo.htm
According to last IBM documentation, F means +, D means –
so, to avoid using non standard numbers, solution may be :
0x04096F
Why is line 2 empty? shouldn’t there be a character representing A in ASCII?
I have ‘[‘ where A used to be (I have used [4,1] for A in ASCII)
****** ***************************** Top of Data ******************************
000001 0123456789
000002 [
000003 :
000004 %
****** **************************** Bottom of Data ***************************
hello everyone… i mess up in exercise 8.. but i manage to show you guys how i delete the member files without delete the other file
you go to ispf then type 3.4
then enter,
then put / on the left side of the z#### name
then choose a member you wanted to delete.
Hi there, TSO SCOREP2 doesn’t work with me.
34 +++ lastmbr = sysmembers + 6
3 +++ call set_member_values
Error running SCOREP2, line 34: Bad arithmetic conversion
I don’t know how else I can check my progress.
EDIT: after seeing the REXX code of SCOREP2 in the CLIST library, I saw the problem, just in case it happens to anyone else.
I always execute the command TSO PROFILE NOPREFIX to remove my user from my default prefix, in order to avoid the quotation marks when I want to prefix something else that doesn’t start with my USER. SCOREP2 wants to read the files with getting our USER as the default prefix.
To solve to problem I just execute the opposite command, TSO PROFILE PREFIX, and typed my user when they asked me for the prefix.
Thanks and sorry for the inconvenience.
hello Kevin ,can you tell me how can i restart #08, becouse of i am not getting 4 rows where i can write A,Z, and ………..i am getting only 3 rows?Please help me?
after typing cancel ; s #08 i did’n get proper result…..
command ==> hex off
(should get you to the ‘proper interface’) // use command ===> hex on (to go back)
https://kevindurant.be/wp-content/uploads/2019/09/2019_p2c8_05.png
I am facing problem here please help me , if any video is available please share..
I am getting the combination of
44444444….
0000000….
after executing this command – cancel ; s #08
How to delete and recreate #08
Good morning House
I can’t open the link to start.
Someone help me please.
HELLO , THANKS FOR ALL YOUR BLOGGING IT HELPS ALOT , SO I HIT A SNAG BECAUSE I ACCIDENTALLY DELETED MY PDS.DATA SECTION AND NOW I CANT COMPLETE CHALLENGE 8 OR 9 OR 10 OR 11 OR 12 LOL IM HOPING YOU KNOW OF A SOLUTION for this 🙁
Hi Anonymous
Holy schnitzel, do you still have Z#####.PDS.DATA in your DSLIST?
Originally PDS.DATA only has 4 members: BINARY, COUNTRY, FUN and Z. The rest of its contents was generated by challenges. I’m afraid you’ll have to figure out which challenges that were and do them again if necessary. I don’t know how to create a data set itself.
What I do know, if you still have PDS.DATA. You can always get fresh copies from ZOS.MTM2019.PUBLIC. So create a new member (s BINARY) called BINARY and COPY ‘ZOS.MTM2019.PUBLIC.PDS.DATA(BINARY)’ into it. Do this also for the other three members.
If you want to get more help with this issue, please ask the official support Slack at https://masterthemainframe18.slack.com/.
Kind regards,
– Kevin
unfortunately no I do not have pds. data 🙁
Hello! When I attempt to copy ‘zos.mtm2019.public.shared.data(packed)’ as primary command it says ‘COPY pending’. Am I doing something wrong?
https://prnt.sc/ppx5w7
Hi Shelton
This is because you can’t copy data into a member when it already has data. It seems you already have the required data.
Kind regards,
– Kevin
Hi Kevin, I’m doing the MTM 2019 as well and I have a doubt:
the challenge says “Line 4 – Packed Decimal 4096 will leave column 3 unused”, but I don’t see how it can happen. I would have done it like you did, do you have any thoughts about that?
I’ll subscribe to the blog I didn’t think there was someone blogging about this and it’s great!
-Matteo
Hey im stuck on the part where you say
“This is what I get. Let me first reset and then do the following.”
”
Overtype line 5 with cols
Overtype line 6 with hx
Overtype line 9 with hx
Overtype line 12 with hx
”
my screen still looks like the first figure under BCD and Packed Decimal Character Encoding
Let me rephrase the question.
Under the first step of: BCD and Packed Decimal Character Encoding
How do i Reset my page so that all the numbers are deleted except line 6, 9, and 12, where my screen looks like the screenshot below the instructions of
Overtype line 5 with cols
Overtype line 6 with hx
Overtype line 9 with hx
Overtype line 12 with hx
I guess my main question is, what do u mean by “This is what I get. Let me first reset and then do the following.”
Hi Vinh
I executed the primary command ‘reset’ so the view would reset to the one without the HEX view. I put reset in bold as an indicator of a command, it’s not that clear; that’s my bad.
Does this help?
Kind regards,
Kevin
hello, i also got this and im stuck here. my screen doesnt change when i write cols 5. hex 6, 9, 12
Hi, I also got this problem. Typing “HEX OFF; RESET” solved it for me
Hello Do I have to have all of Part Two completed in order to view my progress?
It will not let me use TSO SCOREP2 and I have only finished up to P2 C8. Thank you!
Hi Amanda,
You don’t have to have completed all of the challenges to run TSO SCOREP2. Are you running it from the ISPF Primary Option menu?
Kind regards,
Kevin
Hi,
The problem I found is the BCD number, because:
006
49D
I made:
49A
060
what is wrong!
In the case of positive BCD number you can use A, C, E or F.
If you use the D for negative it’s okay as well for the exercise, curious !
Georges
Hello, I got same everything same as you but on my status says incomplete. Do you know why happen?
Correct me if I’m wrong, but when you “Change line 4 columns 1-4 from EBCDIC 4096 to Packed Decimal 4096” you change it to [04,09,6!!!D!!!]. Shouldn’t it be 04096!!!A!!! like in Figure #9?
Hi Jupiops,
You’re right! Thanks for pointing that out!
Kind regards,
– Kevin
Hello. In Challenge # 08 I have redone it several times, in p2.output it seems to be ok, but in status … still appears as Incorrect. Help me please. Thank you very much in advance.
Link to the images
https://mega.nz/#F!yIozUArZ!cqJy_VHOu0jqkJ3UWYNBrw
Hi EGMON,
Can you show me the hex view of challenge 8? The screenshots you sent still make it seem like you didn’t do the changes. It needs to look like this: https://kevindurant.be/wp-content/uploads/2019/09/2019_p2c8_13.png
Kind regards,
-Kevin
I think my mistake starts with “packed” because my screen output is never the same as the one shown in the guidelines.
I put the other images in the folder
https://mega.nz/#F!yIozUArZ!cqJy_VHOu0jqkJ3UWYNBrw
Thank you very much. I did it. I finally found my mistake 😀 kk
Hi EGMON
I’m glad you found your mistake! Could you please post what you needed to fix? Maybe other readers will benefit from your information 🙂
Kind regards,
– Kevin
Hello Kevin,
problem is in that line: “4096 EBCDIC to 4096 packed decimal is easy. [04,09,6A] will be the new number” it should contains [04,09,6D].
Akos