COBOL NBA Information System
Hello again, I need more help with a Information system I am constructing in my COBOL class. I'll begin with a explaination...
I started with a data dictionary file which I named 'NBADATADIC'
Code:
FMT A* .....A*. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7
*************** Beginning of data ************************************
0001.00 *
0002.00 * Data Dictionary for NATIONAL BASKETBALL
0003.00 *
0004.00 A R RECORD
0005.00 A ASSISTPG 2S 0 TEXT('ASSISTS PER GAME')
0006.00 A BLOCKSPG 2S 0 TEXT('BLOCKS PER GAME')
0007.00 A FGPERCENT 2S 0 TEXT('FIELD GOAL PERCENT')
0008.00 A FTPERCENT 2S 0 TEXT('FREE THROW PERCENT')
0009.00 A GMSPLAYED 2S 0 TEXT('GAMES PLAYED')
0010.00 A GMSSTART 2S 0 TEXT('GAMES STARTED')
0011.00 A MINPG 2S 0 TEXT('MINUTES PER GAME')
0012.00 A PLAYERNAME 18A TEXT('PLAYER NAME')
0013.00 A PLAYERPOS 2A TEXT('POSITION CODE')
0014.00 A POSITION 7A TEXT('POSTION DESC.')
0015.00 A PPG 2S 0 TEXT('POINTS PER GAME')
0016.00 A STLPG 2S 0 TEXT('STEALS PER GAME')
0017.00 A TEAMCODE 3A TEXT('TEAM CODE')
0018.00 A TEAMNAME 11A TEXT('TEAM NAME')
0019.00 A TEAMCONF 4A TEXT('TEAM CONFRENCE')
0020.00 A THREEPTP 2S 0 TEXT('THREE PT PERCENT')
0021.00 A TURNOVERS 2S 0 TEXT('TURNOVERS')
****************** End of data *************************************
....that seems alright. Do I add information in there now ? Do I compile it first (crtpf), or do I do the entry (strdfu) now ?
Then I still need to add two physical files. But with those physical file I need to join them with a logical file and that is where I am begging to get confused. I have a logical file named 'NBAJOIN' that should join two physical files 'NB'ATEAM' and 'NBAPOSTN'. This is what they look like...
Code:
FMT PF .....A..........T.Name++++++RLen++TDpB......Functions++++++++++++++++++
*************** Beginning of data *************************************
0001.00 A REF(NBADATADIC)
0002.00 A R NBATEAM
0003.00 A TEAMCODE R
0004.00 A TEAMNAME R
0005.00 A TEAMCONF R
****************** End of data ****************************************
.....and........
Code:
FMT PF .....A..........T.Name++++++RLen++TDpB......Functions++++++++++++++++++
*************** Beginning of data *************************************
0001.00 A REF(NBADATADIC)
0002.00 A R NBAPOSTN
0003.00 A PLAYERPOS R
0004.00 A POSITION R
****************** End of data ****************************************
Re: COBOL NBA Information System
.and my join file...
Code:
FMT LF .....A..........T.Name++++++.Len++TDpB......Functions++++++++++++++++++
*************** Beginning of data *************************************
0001.00 A UNIQUE
0002.00 *
0003.00 * Join: Join 3 files
0004.00 *
0005.00 A R NBAJOIN JFILE(NBAROSTER NBATEAM NBAPOSTN
0006.00 A J JOIN(1 2) JFLD(TEAMCODE TEAMCODE
0007.00 A J JOIN(1 3) JFLD(PLAYERPOS PLAYERPOS
0008.00 *
0009.00 * Projection: Project NBAROSTER fields
0010.00 * ( teamcode, playername, PLAYERPOS)
0011.00 *
0012.00 *
0013.00 A TEAMCODE JREF(1)
0014.00 A TEAMNAME
0015.00 A POSITION
0016.00 A PLAYERNAME
0017.00 A PLAYERPOS JREF(1)
0018.00 *
0019.00 * Alternate Path:
0020.00 *
0021.00 A K TEAMCODE
****************** End of data *********************
so then when i run 'GO QUERY' and run my NBAJOIN query, it complies and comes up blank ?!? And I'm not sure if my alternate path is straight but you know.... Can anyone shed some light and help me out. Thanks in advance, very much !! - Justin