how to do the following



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

how to do the following

Postby breentha_d » Sat Dec 22, 2007 2:34 pm

GIVEN :1 CARD

FORMAT:STUDNO NAME COURSECODE1 GRADE1 COURSECODE2 GRADE2 COURSECODE3 GRADE3

REQUIRED: GENERATE THE FOLLOWING REPORT:

ITAC RESOURCES SDN BHD
STUDENT GRADE REPORT


STUDENT NO: 99999999

STUDENT NAME :XXXXXXXXXXXXXXXXXXX


COURSE GRADE
XXXXXXXXXXXXXXXXXX 999.99

XXXXXXXXXXXXXXXXXX 999.99

XXXXXXXXXXXXXXXXXXX 999.99


Ineed to know how do i write the pseudocode to generate the report above..
breentha_d
 
Posts: 28
Joined: Mon Dec 10, 2007 2:26 am
Has thanked: 0 time
Been thanked: 0 time

Re: how to do the following

Postby vasanthamugi » Sat Dec 22, 2007 3:42 pm

according to my undestanding the answer to ur question is u can use the psuedotechnics only if there are too many conditions and we need to execute each one at any particular condition . u know that there are 3 psuedo technics.
and the above question seems to be just a BMS map to display the student name , student number and the grade .
consider there are 3 grades a,b,c now if the student mark is above 80% grade is A. if the student mark is above 60% and below 80% the grade is B. if the student mark is below 60% the grade is C.
in map u need to code grade field, total field, percenatge field
consider the following code,
Handle-para.
if eibaid = dfhpf1 go to para1
else if eibaid = dfhpf2 go to para2
else eibaid = dfhpf3 go to para3.
para1.
if studmark>=80 move grade A to gradeo
else if studmark>=60 move grade B to gradeo
else studmark <60 move grade C to gradeo.
perform send-map.
para2
sub1+sub2+sub3+sub4+sub5=totalmarks.
move totalmarks to totalO.
para3.
percentage=(sub1+sub2+sub3+sub4+sub5)/5
move percentage to percento.
here percento,gradeo,totoalo are the outbox field which display in map .
as i undestood the question i could do this if i am wrong i am sorry please correct me
vasanthamugi
vasanthamugi
 
Posts: 14
Joined: Thu Dec 20, 2007 2:38 pm
Has thanked: 0 time
Been thanked: 0 time

Re: how to do the following

Postby arunprasad.k » Fri Dec 28, 2007 2:40 pm

breentha_d,

You want to get that report in a file or you want the information to be displayed in a CICS screen?

Arun.
arunprasad.k
 
Posts: 110
Joined: Thu Dec 27, 2007 5:18 pm
Has thanked: 0 time
Been thanked: 0 time


Return to IBM Cobol