Working with flat files in peoplesoft

Working with flat files in peoplesoft



1) Using Filelayout
2) Using Array

Using Array:

Declare Function ClearData PeopleCode N_SR_RUNCNTL.N_SELECTION_TYPE FieldFormula;

Declare Function add_attachment PeopleCode N_SR_ATTACH_WRK.ATTACHADD FieldChange;
Declare Function display_attachment_buttons PeopleCode N_SR_ATTACH_WRK.ATTACHADD RowInit;
Local number &CurRow, &RETCODE;
Local string &Guid, &URL_ID;
Local Rowset &RS1, &Rs_Std;
Local Rowset &Level1;

rem local record &RS1;


/****************************************************************/
/* Call the correct database record where your file attachment  */
/*    will be stored 

N_MOODLE_INTFC_R2_ATTACH                                           */
/****************************************************************/
&URL_ID = "URL.N_MOODLE_INTFC_R2_ATTACH"; /************************ */
/* In order to make sure the attachmentname is unique           */
/*     you can add a GUID in front of your File name            */
/*************************************************************** */


&Level1 = GetLevel0()(1).GetRowset(Scroll.N_NINT09_R2_TMP);
&Level1.Flush();

add_attachment(@&URL_ID, "", &Guid, 0, True, "Record.N_NINT09_R2_RC", N_NINT09_R2_RC.ATTACHSYSFILENAME, N_NINT09_R2_RC.ATTACHUSERFILE, 2, &RETCODE);
If &RETCODE = %Attachment_Success Then
   rem display_attachment_buttons("Success");
   
   &filepath = GetCwd();
   &InputfileName = N_NINT09_R2_RC.ATTACHSYSFILENAME.Value;
   &M = GetAttachment(URL.N_MOODLE_INTFC_R2_ATTACH, &InputfileName, &filepath | &InputfileName);
   &N_File_Input = GetFile(&filepath | &InputfileName, "r", "a", %FilePath_Absolute);
   &N_File_Input.SetFileLayout(FileLayout.N_SR_NINT09_FL);
   rem &RS1 = CreateRecord(RECORD.N_NINT09_R2_TMP);
   
   &num = 0;
   &RS1 = &N_File_Input.CreateRowset();
   &RS1 = &N_File_Input.ReadRowset();
   &RS1 = &N_File_Input.ReadRowset();
   rem ClearData();
   /*************************START READING FROM INPUT FILE**************************************/
   While &RS1 <> Null;
      /*****************************INSERT INTO TEMPORARY RECORD*********************************/
      
      &Row = &Level1.ActiveRowCount;
      &Level1.InsertRow(&Row);
      rem MessageBox(0, "", 0, 0, "Row :" | &Row);
      rem MessageBox(0, "", 0, 0, "Runc Cntl :" | N_NINT09_R2_RC.RUN_CNTL_ID.Value);
      rem MessageBox(0, "", 0, 0, "Emplid :" | &RS1(1).GetRecord(1).EMPLID.Value);
      
      &Level1(&Row + 1).N_NINT09_R2_TMP.OPRID.Value = %OperatorId;
      &Level1(&Row + 1).N_NINT09_R2_TMP.RUN_CNTL_ID.Value = N_NINT09_R2_RC.RUN_CNTL_ID.Value;
      &Level1(&Row + 1).N_NINT09_R2_TMP.EMPLID.Value = &RS1(1).GetRecord(1).EMPLID.Value;
      &Level1(&Row + 1).N_NINT09_R2_TMP.STRM.Value = &RS1(1).GetRecord(1).STRM.Value;
      &Level1(&Row + 1).N_NINT09_R2_TMP.CLASS_NBR.Value = &RS1(1).GetRecord(1).CLASS_NBR.Value;
      &Level1(&Row + 1).N_NINT09_R2_TMP.CRSE_GRADE_INPUT.Value = &RS1(1).GetRecord(1).CRSE_GRADE_INPUT.Value;
      
      &RS1 = &N_File_Input.ReadRowset();
   End-While; /*Read Lines inside a file*/
   
   For &I = &Level1.ActiveRowCount To 1 Step - 1
      If None(&Level1.GetRow(&I).N_NINT09_R2_TMP.OPRID.Value) Then
         &Level1.DeleteRow(&I);
      End-If;
   End-For;
   
   &N_File_Input.Close();
Else
   N_NINT09_R2_RC.ATTACHUSERFILE.Value = "";
End-If;

Step by step setting up Elements of Academic Structure

Step by step setting up Elements of Academic Structure 

1.    Overview of Academic Structure


Academic structure is the foundation of the PeopleSoft Student Administration modules and their functions. It encompasses the institution’s schools and colleges, academic programs and departments, and subject areas. The Academic Structure serves as the basis for the course catalog and schedule, grading scheme, and all related tables that must be created prior to implementation.

The academic structure and its elements are the building blocks for an academic institution. This diagram illustrates the institution’s academic structure at high level.

Figure 1: Academic Structure Elements



An academic institution can have many campuses.

Academic programs are part of academic careers and the academic institution.

Subject areas are part of academic organizations and the academic institution.

Academic plans and academic sub-plans are subdivisions of academic programs.

Degree records are directly linked to academic plans.

Courses and classes are subdivisions of subject areas and directly linked to terms and sessions.

2.    Basic Elements of Academic Structure


 Academic Institution: Institution is a highest level of the academic structure. Institutions are assigned by SetId. SetId allows the sharing of common codes, structures, and facilities between colleges.

Academic Group:The academic group is the college or school with in the university. These groups are attached to the catalog.

 Academic Career: This is a level of study in university or institution like Undergraduate, Graduate etc. This also refers to a grouping of all academic work undertaken by a student that is grouped into a single record (Transcript).

 Academic Programs: An academic entity to which the student applies to., is admitted into, and ultimately graduates from. Programs offer plans and sub-plans.

 Academic Plan: Plans refers to an area of study within an academic program. The academic plan is a formal course of study that a student pursues in order to receive a degree.

 Academic Sub-Plans: Sub-plans refers to specializations or concentrations that are directly linked to the academic plan. Example: A student may be enrolled in the classical studies plan with a sub-plan of Greek and Latin.


Academic Structure Elements
Sample Values
Academic Institution
University of Alberta
Academic Group
Arts & Science
Academic Career
Undergraduate
Academic Program
UGENG: English
Academic Plan
BA-CLAS: Classical Studies
Academic Sub-Plan
OPT-CLASG: Greek
Table 1: Example of Academic Structure


This structure will impact the development of the tables used in defining campus locations, academic organizations, subjects, catalog, and course schedule.

Locations and Campuses: Campuses belongs to single institution and use the same course catalog, Produce a common transcript, and are usually associated with separate physical locations.

 Academic Organization: Defines how an institution is organized from a administrative perspective. The academic organization information is used to create a Tree Manager. The tree controls security levels and access to certain Peoplesoft panels and functions.

 Subjects: An academic subject is aspecific area of institution within an academic organization. For example, if the course is MATH 155, Math is a subject area. This is tied back to the academic organization Tree (Department). Academic subjects are also linked with course catalog.

 Catalog: Before the course catalog is developed, the institution codes, academic group, subject, campuses, academic organizations, and academic career must be defined. The course catalog panel group contains panels that specify everything you need to enter for a course: the definition, number of credits, contact hours, topic prerequisites, etc. The course catalog information provides the template for scheduling classes. The information entered rolls forward to the class schedules.

 Schedules of class: The class schedule is generated using information from the course catalog. Peoplesoft will allow roll classes from term to term, adding new courses to the schedule, and revising those already scheduled. Creating a schedule include Term and Sessions. Term is defined as approved start and end dates with career. Sessions are created within a term for art and end dates of course. Each term is associated with an academic year.

 Academic Term: The Term is defined as the start and end dates of the semester. These dates are approved by university and affect financial aid enrolment verification, and financial process.

 Sessions: Sessions are created within term and may have different start and end dates from the term. Academic dates, such as last day of drop and add and refund of dates are determined by the session. Each course must be attached to the session and term.

Academic Institution is a highest level in academic structure and also a common key field in all the major components in campus solutions. Academic institutions are assigned with SetId’s. The SetId allows sharing of common codes.

3.1 Setting up Grading Scheme

     n   Define the name and location of the academic institution.
     n   Set academic institution defaults and options.
     n   Set additional institutional defaults and option.
     n   Activate instructor workload.
     n   Set repeat checking controls.

3.2 Defining Repeat Scheme


     n   Define repeat schemes and repeat codes.
     n   Define repeat rules.
     n   Set up repeat checking for academic institutions.
     n   Set up repeat checking for academic careers.
     n   Set up repeat checking for academic programs.

3.3 Defining Academic Institutions


     n   Define the name and location of the academic institution.
     n   Set academic institution defaults and options.
     n   Set additional institutional defaults and option.
     n   Activate instructor workload.
     n   Set repeat checking controls.




4.    Setting Up Academic Groups and Careers


4.1 Defining Academic Groups

     n   Describe academic groups.
     n   Link academic career catalog numbers to academic groups.
     n   Define standard class meeting patterns.

4.2 Defining Academic Careers

     n   Describe academic career parameters.
     n    Set additional academic career parameters.
     n    Set up academic career pointers.
     n    Set repeat checking controls for academic careers.
     n    Set up self-service options.

4.3 Setting Up Holiday Schedules Values

     n   Define holiday schedule values on the Holiday Schedule Table page in HRMS.



5.    Setting Up Academic Programs, Plans and Sub-Plans


5.1 Defining an Academic Calendar

     n   Describe academic calendars.
     n   Set up term landmark dates.
     n   Define self-service graduation terms.
     n   Set up session cancellation and withdrawal dates.
     n   Set up session drop dates.

5.2 Defining Academic Level and Load Rules

     n   Define academic level and load determination values.
     n   Define level rules.
     n   Define load rules.
     n   Define contiguous term load rules.

5.3 Academic Programmes

     n   Set up defaults for academic programs.
     n   Set up academic standing parameters for academic programs.
     n   Set up honours and award parameters for academic programs.
     n   Establish academic organization ownership for academic programs.
     n   Set taxonomy and repeat checking options for academic programs.
     n   Define campuses and business units for academic programs.
     n   Define grade lapse rules for academic programs.
     n   Set up term enrollment limits for academic programs.
     n   Set up session enrollment limits for academic programs.
     n   Set up course count limits for academic programs.

5.4 Academic Plans

     n   Describe academic plans.
     n   Set up print options.
     n   Set up taxonomy.
     n   Establish academic organization ownership.

5.5 Academic Sub-Plans

     n   Describe academic subplans.
     n   Set up taxonomy.

6.    Establishing Academic Terms and Sessions


6.1 Defining Tem Values

Set up term values and their descriptions. You use these term values for all academic institutions and careers throughout Campus Solutions, regardless of the structure of the terms that you define.
Access the Term Values Table page (Set Up SACR, Foundation Tables, Term Setup, Term Values Table, Term Values Table).

6.2 Defining Time Periods

     n   Use the Time Period Table component (TIME_PERIOD_TABLE) to set up Time Period.
     n   Define the time periods, or critical points in time, that are valid for each academic career within a setID.
     n   You can add more time period translate values, provided that you attach your own coding to them.

6.3 Defining Academic Terms and Sessions

     n   Define terms within academic careers. Different academic careers at an institution can have different term structures.
     n   Define the sessions of a term, including the significant dates within the session. Sessions subdivide a term into multiple time periods in which to offer classes.
     n   Define landmark time periods within each session of a term. The system uses time periods for enrollment security purposes.




7.    Defining Academic Organizations


7.1 Setting up Organisations

     n   Add/Modify academic organizations.
     n   Designate financial ownership for academic organizations.
     n   Designate human resource ownership for academic organizations.

7.2 Setting Up Academic Subjects

     n   Describe subject areas.
     n   Define subject area taxonomy.
     n   Define subject and component multipliers from Subject workload page.


Peoplesoft Component Processor Flow

Campus Solutions Tables

1.    Setup SACR

1.1  Academic structure

Record Name
Description
PS_INSTITUTION_TBL
Institution setup
PS_CAMPUS_TBL
Campus setup
PS_CAMPUS_LOC_TBL
Campus location setup
PS_HOME_CAMPUS_TBL
Home campus setup
PS_ACAD_GROUP_TBL
Academic group setup
PS_ACAD_ORG_TBL
Academic organisation setup

1.2  Academic career

Record Name
Description
PS_ACAD_CAR_TBL
Academic career setup
PS_ACAD_CAR_PTRS
Academic career pointers setup
PS_CATLG_CAR_TBL
Academic career level setup
PS_ACAD_CAL_TABLE
Academic career calendar setup
PS_HOLIDAY_TBL
Holiday setup

1.3 Programs, Plans and Degrees

Record Name
Description
PS_ACAD_PROG_TBL
Academic program setup
PS_ACAD_PROG_OWNER
Academic program owner setup
PS_SSR_ACD_PRG_AUS
Australian-specific academic program setup
PS_SSR_PRG_CD_TBL
Academic program code setup
PS_ACAD_PLAN_TBL
Academic plan setup
PS_DEGREE_TBL
Degree setup


1.4 Term and Session

Record Name
Description
PS_TERM_TBL
Term setup
PS_TERM_VAL_TBL
Term Values
PS_SESSION_TBL
Term session setup
PS_SESS_TIME_PEROD
Session time periods

1.5 Load/Level Rules

Record Name
Description
PS_LVL_LD_RULE_TBL
Academic level/load rules setup
PS_ACAD_LEVEL_TBL
Academic level setup
PS_ACAD_LOAD_TBL
Academic load setup
PS_ACAD_LOAD2_TBL
Academic load for statistics setup

1.6  Grading

Record Name
Description
PS_GRADE_TBL
Grade setup
PS_GRADE_BASIS_TBL
Grading basis setup
PS_GRD_BASE_CHOICE
Grading basis choice setup
PS_GRADESCHEME_TBL
Grading scheme setup
PS_SSR_GRADE_FLAG
Grading flag setup

2. Campus Community

2.1  Person Data

Record Name
Description
PS_PERSON
Core person data including birth and death information
PS_PERS_DATA_EFFDT
Core person data history includes martial status and gender
PS_PERSONAL_DATA
Snapshot bio/demo data
PS_PER_POI_TYPE
Person of Interest (POI) Type
PS_PER_POI_TRANS
Person of Interest (POI) History

2.2  Identification Data

Record Name
Description
PS_CITIZENSHIP
Citizenship data
PS_SCC_CITIZ_HIST
Citizenship history
PS_CITIZEN_PSSPRT
Citizenship passport data
PS_DIVERS_ETHNICITY
Ethnicity data
PS_DIVERSITY
Ethnicity diversity data
PS_PERS_NID
National ID data
PS_EXTERNAL_SYSKEY
External system data (key)
PS_EXTERNAL_SYSTEM
External system data
PS_PER_ORG_ASGN
Organisational relationships
2.3 Biographic/Demographic

Record Name
Description
PS_ADDRESSES
Address history
PS_EMAIL_ADDRESSES
Email addresses
PS_NAMES
Names history
PS_PERSONAL_PHONE
Phone & Fax data

2.4  3Cs (Communications, Checklists and Comments)

Record Name
Description
PS_COMMUNICATION
Communication data
PS_PERSON_CHECKLST
Checklist data
PS_PERSON_COMMENT
Comment data
PS_VAR_DATA_[AF]
Variable data. Replace [AF] with administrative function e.g. SPRG
PS_LAST_3CS_TBL
Tracks the last SEQ_3C value for a student

2.5 Campus Event Planning (and Meetings

Record Name
Description
PS_CAMPUS_EVENT
Campus Event
PS_EVENT_MTG
Campus Event Meeting

2.6  Service Indicators

Record Name
Description
PS_SRVC_IND_DATA
Service indicator data
PS_SRVC_IN_RSN_TBL
Service indicator reason
PS_AUDIT_SRVC_IND
Service indicator audit



3.    Curriculum Management

3.1 Course data

Record Name
Description
PS_CRSE_CATALOG
Course catalog
PS_CRSE_COMPONENT
Course components
PS_CRSE_OFFER
Course offerings
PS_CRSE_EQUIV_TBL
Course equivalencies
PS_CRSE_LST_HDR_SF
Course list header
PS_CRSE_LST_DTL_SF
Course list details
PS_CRSE_TOPICS
Course topics

3.2  Class data

Record Name
Description
PS_CLASS_TBL
Class data
PS_CLASS_ASSOC
Class associations
PS_CLASS_ATTENDNCE
Class attendance
PS_CLASS_COMPONENT
Class components
PS_CLASS_INSTR
Class instructors
PS_CLASS_MTG_PAT
Class meeting patterns
PS_CLASS_NOTES
Class notes

4.    Student Admissions/Recruiting

4.1 Applicants

Record Name
Description
PS_ADM_APP_CAR_SEQ
Application career sequence (stores next available career nbr)
PS_ADM_APPL_DATA
Application data
PS_ADM_APPL_PLAN
Application plan
PS_ADM_APPL_PROG
Application program
PS_SAD_APL_PRG_AUS
Australian-specific application program data
PS_ADM_APPL_RCR_CA
Recruiting category

4.2 Prospects

Record Name
Description
PS_ADM_PRSPCT_CAR
Prospect career
PS_ADM_PRSPCT_PLAN
Prospect plan
PS_ADM_PRSPCT_PROG
Prospect program


5. Security

5.1 Student Records Security

Record Name
Description
PS_SCRTY_TBL_INST
Institution security
PS_SCRTY_TBL_ACAD
Academic organisation security
PS_SCRTY_TBL_CAR
Academic career security
PS_SCRTY_TBL_PLAN
Academic plan security
PS_SCRTY_TBL_PROG
Academic program security
PS_SCRTY_ADM_ACTN
Admissions action security
PS_SCRTY_PROG_ACTN
Program action security
PS_SCRTY_APPL_CTR
Application centre security
PS_SCRTY_RECR_CTR
Recruiting centre security
PS_OPR_GRP_3C_TBL
3Cs operator group security
PS_ENRL_ACCESS_GRP
Enrolment access group security
PS_ENRMT_OVRD_TBL
Enrolment override security by enrolment access ID
PS_SCRTY_TBL_SRVC
Service indicator security
PS_SCRTY_TSCRPT
Transcript type security
PS_SAD_TEST_SCTY
Test ID security

 

5.2 Student Financials Security

Record Name
Description
PS_SEC_ISET_OPR
Operator Institution set security
PS_SEC_UNITSF_OPR
Operator Business unit security
PS_SEC_SETID_OPR
Operator SetID security