1. This is the FAQ that shows the steps to defining a custom object to Banner

This is the FAQ that shows the steps to defining a custom object to Banner

 

STEPS
------
1.
First you must create the object and make sure it is in the correct paths etc.
and object has correct calls to Banner Security.

2.
Next you must define the object to Banner using the GUAOBJS form.
Make an entry for the new object and give it a name, description,
type system indicator etc. Once you have defined the object in GUAOBJS
you will now be able to access via the Direct Access menu in Banner
without getting this "*ERROR* Invalid object name entered"

3.
Now you need to define the object to Banner Security.
Go into GSASECR -- OBJECTS MAINTENANCE and define the
object with: object name, current version, sys code and default role

4.
Now you have to grant access to the object to a user if you are
using Banner Role level security.
Go into GSASECR -- CLASS MAINTENANCE and assign the new
object to a class and then go into GSASECR -- USER MAINTENANCE
and assign the user the class or you can go into
GSASECR -- USER MAINTENANCE and assign the object directly to the user.

5.
You are now ready to log into Banner as a userid that you gave
access to this new object and test access to the object.

6. If the custom object you are adding is a Banner Job you will need to
follow these steps to add it to Job Submission
a. Define job on form GJAJOBS
b. Define any parameters for job on GJAPDEF
c. Define any parameter validation on GJAPVAL
d. Define any parameter default values on GJAPDFT
e. Go to form GJAPCTL and run job.

Special Note #1 - Custom form
===============
If you have create a custom form say you copied
SPAIDEN.FMX to form WPAIDEN.FMX. Now when you call WPAIDEN you get these errors
- "*WARNING* Invalid form name, check your spelling and try again"
- "FRM-40010 Cannot read from WOQMENU"
Upon clicking OK to these errors you are taken to the custom form and all appears
to work fine. Subsequent accesses to that form in the same Banner
session produce no error.
You can fix these errors by copying SOQMENU.FMX to WOQMENU.FMX and placing
in FORMS60_PATH. The Banner menu system is designed to call a non-displaying
XOQMENU (where X is first character of the product) to initialize the product
the first time you enter a product form.
Example the first time you call SPAIDEN then Banner needs to initialize
Student system so it calls SOQMENU.FMX in background to initialize Student
product and then it calls the SPAIDEN.FMX

Special Note #2 - Custom Pro*C
===============
If your program is a copy of a baseline Banner Pro*C job.
Example $BANNER_HOME/general/c/gjrrpts copied to gzrrpts.pc
Then you have to change the line in the program before recompiling it.
Find line
strcpy(rpt_name,"GJRRPTS");
Change to read
strcpy(rpt_name,"GZRRPTS");

Then recompile gzrrpts.pc and test gzrrpts from GJAPCTL.

The code change may also look like this
strcpy(rptname,"FGRODTA");
Change to
strcpy(rptname,"FZRODTA");

If you do not do this you will get this error in the job log file
"Run Sequence number is invalid, aborting job"

-------------------
mtytler 29-OCT-2002

 

 

 

This is the FAQ that shows you how to write an SQL and define it to job submission.

 

Here is an example of running a simple SQL file from Banner Job Submission
Create these 3 files.


VMS -- test_sql.com
-------------------
$! Test of Job Sub process to run SQL SCRIPT.
$ sqlplus 'UIPW @test_sql.sql
$!
$ if PRNT .eqs. "DATABASE"
$ then
$ JTR:=$GEN$EXE:GURINSO.EXE
$ JTR -n 'SEQ -l TEST_SQL.LIS -j 'JOB -w 'UID 'UIPW
$ endif

If you select GJAPCTL Printer = DATABASE the spool file TEST_SQL.LIS
will be loaded into the database for review on GJIREVO form
by calling GURINSO process.


UNIX -- test_sql.shl
--------------------
# test_sql.shl
# mtytler 7/31/97 testing job sub with sqlplus
sqlplus $UIPW @test_sql.sql

if [ "$PRNT" = "DATABASE" ]
then
gurinso -n $ONE_UP -l test_sql.lst -j $PROC -w $BANUID $UIPW
fi

If you select GJAPCTL Printer = DATABASE the spool file test_sql.lst
will be loaded into the database for review on GJIREVO form
by calling GURINSO process.


WinNT/2000 -- test_sql.pl
-------------------------
# test_sql.pl
# mtytler 4/9/2002 testing job sub with sqlplus
use sctban;
&sctban_determine_os;
&sctban_os_specific_env;
&sctban_jsub_env;
$a1 = $ARGV[0];
$a2 = $ARGV[1];
$a3 = $ARGV[2];
$a4 = $ARGV[3];
$a5 = $ARGV[4];
$banner_exe = $ENV{"BANNER_EXE"};
open(PPROCESS,"|sqlplus ${sctban_user_pass} \@test_sql.sql");
close(PPROCESS);


If you select GJAPCTL Printer = DATABASE the sctban.pm has logic that will load the Log file
(rocoram1_ban6_saisusr_test_sql_4483.log) into the database for review on GJIREVO form
by calling GURINSO process


Command File Location Notes:
----------------------------
Note this file needs to be in correct path for OS
VMS in logical GEN$COM or BAN_COMS
UNIX in environment variable $BANNER_LINKS or $PATH
WinNT/2000 in environment variable PERL5LIB or %BANNER_HOME%\general\misc


Create this SQL file

SQL File -> test_sql.sql
-----------------------
rem mtytler 4/9/2002
rem test_sql.sql
rem SQL SCRIPT TO TEST JOBS SUB PROCESS
spool test_sql;
select * from dual;
spool off;

Note this test_sql.sql needs to be in the
VMS in logical SQLPATH/ORA_PATH
UNIX in environment variable $ORACLE_PATH
WinNT/2000 in environment variable SQLPATH


Now define your process to Banner
---------------------------------
1. Please review FAQ #2643 - How do I add a custom object to Banner?
for information on defining process to GUAOBJS, GSASECR, GJAJOBS

2. When defining to JOBSUB (form GJAJOBS) please uses these setting
Name = TEST_SQL
Title = Testing SQL script from JOBSUB
System = G
Description = Testing SQL script from JOBSUB
Type = Procedure
  
3. Make sure the com/shl/pl file is in the correct location as defined above.

4. The Oracle privileges the user gets when they log into SQLPLUS need to be
part of their default role or else you need to use a USR_ROLE_ to give them
privileges and the SQL script needs to issue a
SET ROLE USR_ROLE_NAME;

5. Run the TEST_SQL from GJAPCTL


Example output from run on VMS
-----------------------------
Similar to WinNT/2000
Logs will be called TEST_SQL_1234.LOG;1 and spool file TEST_SQL.LIS;1


Example output from run on UNIX
-------------------------------
Similar to WinNT/2000

Example output from run on WinNT/2000
-------------------------------------
Log file create in BANNER_JOBSUB_HOME -
ban5_saisusr_test_sql_831.log

SQL*Plus: Release 8.1.7.0.0 - Production on Tue Apr 9 10:40:19 2002
(c) Copyright 2000 Oracle Corporation. All rights reserved.
Connected to:
Oracle8i Enterprise Edition Release 8.1.7.3.0 - Production
With the Partitioning option
JServer Release 8.1.7.3.0 - Production

Input truncated to 19 characters

D
-
X

SQL> Disconnected from Oracle8i Enterprise Edition Release 8.1.7.3.0 - Production
With the Partitioning option
JServer Release 8.1.7.3.0 - Production

The spool file test_sql.LST may get created in %BANNER_HOME%\general\misc
test_sql.LST

D
-
X

Special GJIREVO DATABASE Note
------------------------------
Very simple example of how output can be loaded and reviewed
on GJIREVO have been added to the above test files.
This code can be customized as needed to load whatever output
file you may need. The processs GURINSO is called to load
output file like "log" and "lis" when Printer= DATABASE.
For further examples on what this custom code might look like you can
review glrletr.shl/pl/com or glbdata.shl/pl/com etc.


Special Gen62 UNIX note
-----------------------
If your custom script was using UID before Gen62 then you will need to
change that reference to BANUID after Gen62 since GJAJOBS.SHL now defines
BANUID instead of UID.


===================
mtytler 20-DEC-2004

 

 

 

Back to top