COBOL Assignment Question

Packed Decimal:

Show the numeric EDCDIC bit code for the following numbers:

  1. 8
  2. 24
  3. 127
  4. 78
  5. 518

Show the COMP-3 bit codes for these values including the proper sign code:

  1. + 2
  2. +21
  3. +145
  4. -68
  5. -271

How many bytes will these PIC COMP-3 fields require?

  1. PIC S9(4)V9
  2. PIC S9V9
  3. PIC S9(8)V9(4)
  4. PIC S999V99
  5. PIC S9(6)

Code the COBOL SORT command to

  • Accomplish sorting a file for input to the following three scenarios which are on the next three pages.
  • Use the file names of IN-FILE, WORK-FILE, SORT-FILE, and
  • Make up variable names as needed with the prefixes of IN-, WRK-, and SRT-.

Example:

If the input file has this description:

COBOL Assignment Question Image 1

And the report description lists the employees alphabetical within descending rate values

COBOL Assignment Question Image 2

I would need to sort the file like this:

SORT WORK-FILE

ON DESCENDING WRK-RATE

ASCENDING WRK-LAST WRK-FIRST

USING IN-FILE

GIVING SORT-FILE

Scenario One:

Using this input file:

COBOL Assignment Question Image 3

And this report description that list employees alphabetical within hire date:

COBOL Assignment Question Image 4

Code a SORT command to support the requirements.

Scenario Two

Using this input file:

COBOL Assignment Question Image 5

And this report description that lists students alphabetical within average. The averages are listed from high to low.

COBOL Assignment Question Image 6

Code a SORT command to support the requirements.

Scenario Three

Using this input file

COBOL Assignment Question Image 7

And this report description that lists the information in chronological order by order date and grouped by salesperson number.

COBOL Assignment Question Image 8

Code a SORT command to support the requirements.

Using COBOL syntax, code the entire Process-Record module of a program for the three scenarios on the next three pages.

Include the processing elements necessary per the report layout and specifications in the Scenario.

EXAMPLE:

If a program was needed that exemplified the typical processing and produced a typical report, this is what is needed:

Hint: Remember, the logic model in XAD for the typical Process-Record module looks like the following. You are to convert the XAD to COBOL code.

ProcessRecord
Read command
DetailLineCalculation
TotalLineAccumulation
Detail Line

200-Process.

Read In-file

At end

Move “yes” to eof-sw

Not at end

Perform 210-det-calc

Perform 220-accum

Perform 230-detail

End-read

Scenario One

Use the reporting requirements of Scenario One on page 3.

Scenario Two

Use the reporting requirements of Scenario Three on page 5.

Scenario Three

With this as the input file:

COBOL Assignment Question Image 9

And this as the report description:

COBOL Assignment Question Image 10

Code the Process-Record module, validating that both first and last name fields contain data and that the grade point and semester credit hour fields contain numeric, positive values. Should any error be found, cause the logic to write out an error message to a second report.

citation generator
citaion generator
make money online