Background
I have this problem with a complex sorting report that i have been trying to figure out but it seems that i'll need help from all of you. I want to do is some fancy sorting (with atleast three level depth on some) with data pulled in fom two files. The files are devided in such a way that info. relevant to each is separated.
Here is an example.
Lets say we have two files one with information about the student like so:
student- file: (Note this is and example for this post-Data is ficticous)
<br> 456234567!Bob Smith!Engineering!Graduate 852234567!Ivan Milla!Business!Undergrad 123234567!Sergio Veara!Arts!Graduate 987234567!Richard Thompson!Economics!undergrad 963434567!Patrick Klivert!Economics!Graduate 789234567!Janfranco Vialli!Engineering!Graduate

In the above datafile we have SS#, name, major and status. Now look at the student information file:

<br> <br> 45623456!COMP8769!A!Dr.Smith!MWF!10:00 45623456!COMP7960!B!Dr.Smith!MWF!11:00 45623456!COMP7100!B!Dr.Rose!MWF!1:00 987234567!ECON6900!A!Dr.Jones!W!9:00 45623456!COMP7600!A!Dr.Gillian!MWF!9:00 852234567!BUS4000!C!Dr.Rossa!M!2:00 789234567!BUS4000!A!Dr.Rossa!M!2:00

In the above file, we collected the class info. about the students we have in the student datafile. Class-info file had: SS#,class,grade, Instructor,Days,TIme.

Problem
What i am trying to do is have a report that sorts both of these files in a few different ways automatically going through all the data. Here are examples of what kind of output i am looking for.

Type1 (Sort Students by a particular KEY i.e. By a class):
Students who took BUS4000
SCHOOL
Students
Other Data
Engineering Janfranco Vialli A, Dr.Rosa
Business Ivan Milla ...
etc.    
     
Students who took COMP8769
SCHOOL
Students
Other Data
Engineering Bob Smith A, Dr.Rosa
etc.    
     

 

Type2 (Regular Sort By all students):

SCHOOL
Students
Other Data
Engineering Janfranco Vialli A, Dr.Rosa, BUS4000
  Bob Smith A,Dr.Smith,COMP8769
B,Dr.Smith,COMP7960
etc.
Business Ivan Milla ...
Arts Sergio Veara ...
Economics Richard Thompson A, Dr. Jones,ECON6900
  Patrick Klivert ...
etc.    
     

As you see in the aboove example, all of this output should appear on one page. As you saw in Type1, i need to sort also based on a particular falue in the (student-info) datafile also. I have done soring like this in the past but this is a bit complicated from what i have been use to. As always any input will be great.

 

 


In reply to Complex Sorting/Reporting by data67

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.