Skip to content

Commit 3fa7ae3

Browse files
committed
Update COBOL Programming Course #2 - Advanced Topics.md
Signed-off-by: radha <[email protected]>
1 parent 1abd151 commit 3fa7ae3

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

COBOL Programming Course #2 - Advanced Topics/COBOL Programming Course #2 - Advanced Topics.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,30 +205,31 @@ Happy Coding! 😉
205205
_Disclaimer: This challenge is also posted in [Medium.com](https://medium.com/@jessielaine.punongbayan/zowe-cobol-challenge-the-unemployment-claims-2e35a42eabaa)._
206206
207207
\newpage
208+
208209
## Hacker News Rankings for Mainframe/COBOL Posts
209210
210211
![](Images/hacker-img1.png)
211212
212213
We will explore the popular Hacker News website for this challenge. Hacker News is an online community started by Paul Graham for sharing "Anything that good hackers would find interesting. That includes more than hacking and startups".
213214
214215
215-
### A little Background
216+
### A Little Background
216217
The site offers a dynamic list of posts/stories, submitted by users, each of which could be expanded into its own unique comment thread. Readers can upvote or downvote links and comments, and the top thirty links are featured on the front page. Today, more than five million people read Hacker News each month, and landing a blog post on the front page is a badge of honor for many technologists.
217218
218219
### Our Goal
219220
We will be working on a Hacker News 2015-2016 dataset from Kaggle with a full year’s worth of stories: Our goal is to extract only the Mainframe/COBOL related stories and assign ranking scores to them based on (a simplified version) the published Hacker News ranking algorithm. We will create a front page report that reflects this ranking order. The algorithm works in a way that nothing stays on the front page for too long, so a story’s score will eventually drop to zero over time (the gravity effect). Since our posts are spread out over a year and as older posts will always have a lower (or zero) ranking, we will distort the data so all our stories have the same date and and consider only the times in the ranking score calculation. This will give all our posts a fair chance of landing the front page. Our front page report is published at 11:59pm. [Here's some additional information on the ranking.](http://www.righto.com/2013/11/how-hacker-news-ranking-really-works.html)
220221
221-
### The plan
222+
### The Plan
222223
[] There are different creative ways of accomplishing this but here’s our plan: We will have a COBOL program that reads the input CSV file and retrieves only the ***Mainframe/COBOL*** stories. It then calculates the ranking score for the stories by factoring in the time they were posted and the number of votes they received. Each of the records is then written to an output dataset along with the ranking score.
223224
224225
[] We will then use `DFSORT` to sort the output dataset on ranking score, highest to lowest and display the posts as a simple report mimicking the front page.
225226
226227
Let's get started!
227-
1. Take a look and familialize yourself with the dataset on z/OS: `ZOS.PUBLIC.HACKER.NEWS`. This is a CSV file that serves as input to your COBOL program. The file was created by downloading [this Kaggle dataset](https://www.kaggle.com/hacker-news/hacker-news-posts), removing the lengthy `URL` column that is of no relevance to us and uploading it to z/OS. You can directly reference this DS in your JCL. Please avoid making a copy as it is fairly large with around 300,000 records.
228+
1. Take a look and familiarize yourself with the dataset on z/OS: `ZOS.PUBLIC.HACKER.NEWS`. This is a CSV file that serves as input to your COBOL program. The file was created by downloading [this Kaggle dataset](https://www.kaggle.com/hacker-news/hacker-news-posts), removing the lengthy `URL` column that is of no relevance to us and uploading it to z/OS. You can directly reference this DS in your JCL. Please avoid making a copy as it is fairly large with around 300,000 records.
228229
229230
![](Images/hacker-img2.png)
230231
231-
2. Create your COBOL program in `<userid>.CBL` in the Code4z editor – This program will :
232+
2. Create your COBOL program in `<userid>.CBL` using VS Code with the Code4z extension installed and enabled – This program will :
232233
1. Read in each record in the input CSV file
233234
2. Select only the records that have mention of the words ***Mainframe*** or ***COBOL*** (ignore case) in the `Title` field
234235
3. Calculate the ranking score for each record based on the number of votes it received and the time it was posted (Ignore date as we assume all posts were created on the same date)
@@ -254,4 +255,4 @@ We will be working on a Hacker News 2015-2016 dataset from Kaggle with a full ye
254255
![](Images/hacker-img5.png)
255256
256257
257-
Happy COBOL coding!
258+
Hope you have fun working on this Challenge. Happy COBOL coding!

0 commit comments

Comments
 (0)