Assembler programming question

Status
Not open for further replies.

sdavis9

Beta member
Messages
4
does anybody know how to do this i really need some help if you want me to post the program of what 's in the program let me know but i seriously need some help plus i need to get this program done by monday if you want to post what i got let me know


Management has decided to adjust the salaries of all employees in the company by adding $1.00 to the Hourly Rate of Pay. This will become the Adjusted Rate of Pay. Management also wants to know the Total Hours worked by all employees.


INPUT SPECIFICATIONS:

Use the Lab Input File Layout given on a separate page.



OUTPUT SPECIFICATIONS:

The output will consist of a report listing the

Employee Name
Employee Number
Hours Worked
Rate of Pay
Shift
Adjusted Rate of Pay

At the end of the report, print the Total Hours Worked for all employees on the report.

The Adjusted Rate of Pay and Totals Hours Worked fields must be edited on the output report.

You are also to include a report title and appropriate column headings

You will need to do a Printer Spacing Chart and Flowchart prior to coding this lab problem.



here is my program


I HAVE TO TYPE ALL OF THE OUT BECAUSE I DONT HAVE MAINFRAME ON MY COMPUTER

this is what i got at campus where are using micrufus mainframe to build the program THE ONLY THING IS THAT I CANT FIGURE WHAT AM I SUPPOSE TO DO WHERE AND I SUPPOSE TO PUT THE CALCULATION ALEAST I THINK THAT WHAT I AM SUPPOSE TO DO NOW BUT I DONT KNOW HOW TO DO IT

sample csect
print nogen
LR 3,15
USING SAMPLE 3
OPEN (DSKFLE,INPUT)
OPEN (PRTFLE,OUPUT)
MVC PRTOUT,SPACES
MVC PRTOUT+9(15),=C'BEGIN EXECUTION'
PUT PRTFLE,PRTOUT
MVC PRTOUT,SPACES
PUT PRTOUT,TITLE
PUT PRTOUT,COLHEAD1
PUT PRTFLE,PRTOUT

*
* MAINFLOW LOOP
*
READ GET DSKFLE,DISKIN
MVC PRTOUT,SPACES
MVC EMPNUMO,EPNUMI
MVC EMPNUMO,EMPNUMI
MVC HRO,HOURI
MVC RATEO,RATEI
MVC SHIFTO,SHIFTI
PACK PRATE,RATEI
AP PRATE,=P'100'
PACK PHOURS,HROI
AP PTOTHRS,PHRS
PUT PRTFLE,PRTOUT
B READ
*
* END OF JOB ROUTINE
*
EOJRT MVC PRTOUT,SPACES
PUT PRTFLE,PRTOUT
MVC PRTOUT+9(16),=C'END OF EXECUTION'
PUT PRTFLE,PRTOUT
CLOSE DSKFLE
CLOSE PRTFLE
EOF
*
* DECLARATIVES
TITLE DS 0CL120
DC 40C' '
DC CL40'SHERMAN REPORT'
DC 40C' '


* DECLARATIVES

COLHEAD1 DS 0CL120
DC 9C' '
DC CL15'EMPLOYEE NUM'
DC 4C' '
DC CL24'EMPLOYEE NAME'
DC 5C' '
DC CL5'HOUR'
DC 5C' '
DC CL6'RATE'
DC 5C' '
DC CL5'SHIFT'
DC 28C' '



* DECLARATIVES

SPACES DC CL120' '

*
* DISK FILE DEFINITION
*
DSKFLE DCB DSORG=PS,DDNAME=DSKFLE,MACRF=(GM),
LRECL=80,BLKSIZE=80,RECFM=FBA,EODAD=EOJRT

*
* PRINTER FILE DEFINTION
*
PRTFLE DCB DSORG=PS, DDNAME=SYSOUT,MACRF=(PM) ,
LRECL=120,BLKSIZE=120,RECFM=FM

*
* DECLARITIVES
*
SPACES DC CL120
MSG1 DC C'BEGIN EXECUTION'
MSG2 DC C'END OF EXECUTION'
*
* INPUT RECORD DEFINITION
*
DISKIN DS 0CL80
EMPNAMEI DS CL24
DS CL6
EMPNAMEO DS CL24
DS CL8
HRO DS CL3
DS CL14
RATEO DS CL4
DS CL8
SHIFTO DS CL1
DS CL34
END
 
It looks like you are using an IBM 360/370 architecture, which is not one i have programmed assembly for, but...

Mainflow loop is where everything seems to happen.
In either line 6 or 8 of MAINFLOW LOOP it looks like you are reading in the rate, this is what you want to change. You want to increase everyones rate by $1

MVC means move character (8bits), main storage to main storage. So does the system read from storage, manipulate data and then write back to storage?

Is updating the salaries all you want to do?

this is a bit of coursework right? please tell me it isn't a real system!
 
i working pt. 3 of the lab now but here is what part to looks like i may need some help on part 3 here are the instruction still using the same program



Lab Exercise #3 – Adjusted Gross Pay Report, utilizing MP, DP, and ROUNDING


Management has decided to adjust the Rate of Pay for employees who work either 2nd or 3rd shift. Those employees who work 1st shift will not receive any increase at all. The following table summarizes:

SHIFT RATE OF PAY
1 No Increase
2 10%
3 12%

INPUT: Input consists of the 80 byte fixed unblocked disk file. The file layout is the same as Lab 1 and Lab 2.

OUTPUT: Create a report listing the Employee Name, Employee ID, Shift Code, Hours Worked, Rate of Pay, Gross Pay, Adjusted Rate of Pay and Adjusted Gross Pay for each employee.

Edit all numeric fields on the output report.

At the end of the report print totals on 3 separate lines for the following:

Total Employees listed on the report
Average Gross Pay
Average Adjusted Gross Pay

The report must include a Title, appropriate column headings, and proper identification of totals at the end of the report.

Calculations: Gross Pay = Rate of Pay X Hours

Adjusted Rate of Pay = Rate of Pay X Percentage Increase (From Table Above)
Round to 2 Decimal Positions

Adjusted Gross Pay = Adjusted Rate of Pay X Hours

Average Gross Pay = Total Gross Pay / Total Employees

Average Adjusted Gross Pay = Total Adjusted Gross Pay / Total Employees




sample csect
print nogen
LR 3,15
USING SAMPLE 3
OPEN (DSKFLE,INPUT)
OPEN (PRTFLE,OUPUT)
MVC PRTOUT,SPACES
MVC PRTOUT+9(15),=C'BEGIN EXECUTION'
PUT PRTFLE,PRTOUT
MVC PRTOUT,SPACES
PUT PRTOUT,TITLE
PUT PRTOUT,COLHEAD1
PUT PRTFLE,PRTOUT

*
* MAINFLOW LOOP
*
READ GET DSKFLE,DISKIN
MVC PRTOUT,SPACES
MVC EMPNUMO,EPNUMI
MVC EMPNUMO,EMPNUMI
MVC HRO,HOURI
MVC RATEO,RATEI
MVC SHIFTO,SHIFTI
PACK PRATE,RATEI
AP PRATE,=P'100'
MVC ADRATEO,X='40202020204B2120'
ED ADRATEO,PRATE
PACK PHRS,HOURI
AP PTOTHRS,PHRS
PUT PRTFLE,PRTOUT
B READ
*
* END OF JOB ROUTINE
*
EOJRT MVC PRTOUT,SPACES
PUT PRTFLE,PRTOUT
MVC PRTOUT+9(16),=C'END OF EXECUTION'
PUT PRTFLE,SPACES
MVC HOURRO,=X'40202021204B2020'
ED HOURRO,PTOTHRS
PUT PRTFLE,TOTALS
PUT PRTFLE,PRTOUT
CLOSE DSKFLE
CLOSE PRTFLE
EOF
*
* DECLARATIVES
TITLE DS 0CL120
DC 40C' '
DC CL40'SHERMAN REPORT'
DC 40C' '


* DECLARATIVES

COLHEAD1 DS 0CL120
DC 10C' '
DC CL9'EMPLOYE NUM'
DC 5C' '
DC CL24'EMPLOYEE NAME'
DC 8C' '
DC CL5'HOUR'
DC 12C' '
DC CL4'RATE'
DC 8C' '
DC CL1'SHIFT'
DC 4C' '
DC CL6'ADJRTE'
DC 14C' '


* DECLARATIVES
TOTALS DS 0CL120
DC 10C' '
DC CL14'TOTAL HOURS'
HOURRO DS CL10
DC 86C' '

PHRS DS PL3
PTOTHRS DC PL3 '0'



SPACES DC CL120' '

*
* DISK FILE DEFINITION
*
DSKFLE DCB DSORG=PS,DDNAME=DSKFLE,MACRF=(GM),
LRECL=80,BLKSIZE=80,RECFM=FBA,EODAD=EOJRT

* INPUT RECORD DEFINITION
*
DISKIN DS 0CL80
EMPNAMEI DS CL24
DS CL6
EMPNUMI DS CL9
HOURI DS CL3
RATEI DS CL4
DEPI DS CL1
DS CL1
CLASSI DS CL1
SHIFT1 DS CL1
DS CL30


DECLARATIVES
PRATE DS PL3




*
* PRINTER FILE DEFINTION
*
PRTFLE DCB DSORG=PS, DDNAME=SYSOUT,MACRF=(PM) ,
LRECL=120,BLKSIZE=120,RECFM=FM

*
*

*
PRINT DETAIL LINE DEFINITION
*
PRTOUT DS 0CL120
DS CL10
EMPNUMO DS CL9
DS CL5
EMPNAMEO DS CL24
DS CL8
HRO DS CL3
DS CL14
RATEO DS CL4
DS CL8
SHIFTO DS CL1
DS CL3
ADRATEO DS CL7
DS CL24
END




NOW THATS MY LAB 2 I JUST NEED TO KNOW YOU TO DO EACH OF THE AVERAGES AND I HAVE THEM PRINT OUT ON THE DETAIL LINE FOR EACH PERSON
 
forgive me mods for double posting. For some reason it's not letting me edit my last post...

I meant use the [*code] and [/code] tags in your message around your code (be sure to take out the *)
 
Status
Not open for further replies.
Back
Top Bottom