Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / BCI433 Lab 8 Lab objectives: Create an RPGLE program that implements concepts from previous labs

BCI433 Lab 8 Lab objectives: Create an RPGLE program that implements concepts from previous labs

Computer Science

BCI433 Lab 8

Lab objectives:

Create an RPGLE program that implements concepts from previous labs. User Defined functions, adding records to a file and setting up the run of the program with a CLLE driver program

 

Research new RPGLE concepts %XLATE, SETLL, %TimeStamp() …

 

Students will have until the end of the semester to solve this lab and this lab will be the first one with minimal instructor help

 

Requirements to pass the lab:

 

Demonstrate how to put together your program showing the code employing user defined functions and the code with the user defined function solution and the prototype code (Don’t put this in a program it needs to be manually shown)

 

Perform all the necessary compilations to put together your application

 

Successfully run the application

Running the instructors version of Lab8

 

CHGCURLIB BCI433LIB

CALL RUNLAB8

CHGCURLIB  (back to your library)

 

This application employs user defined functions that use a simple encoding technique to encrypt customer data to be stored in a file. The user defined functions use the %XLAT E function. This can be researched online.

 

Copy this for the simple encryption you will be using. Copy and paste into your user defined function.

 

For upper case letter translation:

                                                                                                            ZXCVBNMASDFGHJKLQWERTYUIOP

For lower case letter translation:

                                                                                                            jhgfdsalkpoiuytqwermnbvczx

For number translation:

                                                                                                            =¢$#@*(&+)

 

Using the above scheme         A would translate to Z

                                                                                    Z would translate to P

                                                                                    a would translate to j

                                                                                    z would translate to x

                                                                                    0 would translate to =

                                                                                    9 would translate to )

 

The user defined function should support 80 characters being passed to it. Here is the user defined function being used to encode the first name:

Firstname = Scramble(String);

Here is the user defined function used to decode the first name:

Firstname = UnScramble(String);

 

The file to be updated. Firstname, Lastname and Phone are encoded. The timestamp is not encoded.

 

CUSTOMERX

 

 

 

You do not need to store your file in a collection. Use your student library. My file is in a collection to illustrate an auditing function. Students can enter normal names and are encouraged to put in one or two records. What if a student wanted to enter a rude name or enter 20 records.

 

We learned about automatic journaling in lab 7. What if someone asked a friend with access to change a salary? We can see the user profile who made the change. In this case the journal shows the user profile who entered a record with a rude name on November 13. It was DK433A40.

 

 

 

How the application runs

 

 

 

 

 

 

 

Two customers were added and this shows on the screen. This time F3 will be pressed and no more customers will be added.

 

Option 2 was selected from the first screen. It decodes the records and starts from the end of file and reads backwards to the beginning of file. The user can read all the way to beginning of file which causes an exit or press the F3 key and exit immediately

 

Option 3 was selected and the encoded record shows. The records are read backwards from the end of file similar to the option 2 method.

 

 

 

Use a validation subroutine that can flag more than one blank field at a time when adding Customer records.

 

 

 

The CLLE driver program runs your program and then shows all the encrypted records in your file.

 

How the application is put together

You have read all the way to the end of this lab. So here is your prize. You do not have to code the display file for this. It is available in BCI433LIB/HiddenP.

 

One update was done with the instructor version of this program. It asked for a numeric phone number, but did not enforce this. So entering a non digit in the phone number field would cause a crash when retrieving the encoded record. To solve this, the phone number field was changed to numeric on the display file (PhoneN). The encoded phone number remained a character field in the Customer file (Phone).

 

So convert the numeric phone number to a character phone number, then encode it.

 

Phone = %char(PhoneN)

 

Going in the other direction when showing a numeric edited phone number after it has been decoded

 

PhoneOut =  %DEC(Phone:10:0) 

 

This second part was already in the original application.

Indicator 20 can not be on and off at the same time. When it is on, the encoded character phone is displayed. When it is off, the numeric edited decoded phone number is displayed.

Option 1

Low Cost Option
Download this past answer in few clicks

18.99 USD

PURCHASE SOLUTION

Already member?


Option 2

Custom new solution created by our subject matter experts

GET A QUOTE

Related Questions