todsn //intrdr <<EOF
//JOBNAME JOB ACCT,NAME,CLASS=A,MSGCLASS=B
//BR14 EXEC PGM=IEFBR14
//
| #!/bin/awk | |
| !a[$0]++ |
| vincentize <- function(data, bins) | |
| { | |
| if ( length(data) < 2 ) | |
| { | |
| stop("The data is really short. Is that ok?"); | |
| } | |
| if ( bins < 2 ) | |
| { | |
| stop("A number of bins smaller than 2 just really isn't useful"); |
| WITH sel AS ( | |
| SELECT id FROM hometowns WHERE name = 'Portland' | |
| ), | |
| ins AS ( | |
| INSERT INTO hometowns(name) | |
| SELECT 'Portland' | |
| WHERE NOT EXISTS (SELECT 1 FROM sel) | |
| RETURNING id | |
| ) |
| /* REXX */ | |
| PARSE ARG JOBNAME HLQ . | |
| NUMERIC DIGITS 12 | |
| IF JOBNAME='' THEN JOBNAME='*' | |
| HLQ=STRIP(HLQ,'B',"'") | |
| IF HLQ='' THEN HLQ='SYSJO' | |
| IF '/' = LEFT(HLQ,1) THEN DO | |
| if syscalls('ON')>3 then | |
| do | |
| say 'Unable to establish the SYSCALL environment' |
| /* Rexx ispf edit macro to add characters to the meaning of word */ | |
| /* */ | |
| /* This changes internal tables to force specific characters to be */ | |
| /* considered part of a word. For example, In COBOL, The dash is */ | |
| /* valid in a name. If you have code */ | |
| /* MOVE ABC-DEF TO ABC. */ | |
| /* and you issue */ | |
| /* CHANGE ABC XYZ WORD */ | |
| /* the result is */ | |
| /* MOVE XYZ-DEF XYZ. */ |
| # | |
| # This shell function will return with a 0 if the specified program is on the ${PATH}. | |
| # and will echo the full path name, including the executable. If it is not on | |
| # the ${PATH}, it will return with a code of 1, but no output. The return value saves | |
| # the necessity of testing to see if anything was returned. A "conditional execution" | |
| # might be something like: | |
| # fullname=$(which someprog) && ${fullname} | |
| # Not that you'd actually do the above. Perhaps something more like: | |
| # fullname=$(which someprog) && { | |
| # while read i;do ${fullname} $i;done <some.input |
| classmunge () { | |
| if [ -e $1 ]; then | |
| if ! echo $CLASSPATH | /bin/egrep -q "(^|:)$1($|:)" ; then | |
| if [ "$2" = "after" ] ; then | |
| CLASSPATH=$CLASSPATH:$1 | |
| else | |
| CLASSPATH=$1:$CLASSPATH | |
| fi | |
| fi | |
| fi |
| # System wide environment and startup programs, for login setup | |
| # Functions and aliases go in /etc/bashrc | |
| pathmunge () { | |
| if [ -e $1 ]; then | |
| if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then | |
| if [ "$2" = "after" ] ; then | |
| PATH=$PATH:$1 | |
| else | |
| PATH=$1:$PATH | |
| fi |
| You cannot do any of these things in any relational database. You can only do this in navigational databases. There are various kludges which permit you to simulate navigational abilities on top of relational databases, but they are all kludges which are performed by various forms of fakery to impose navigability on top of a model which inherently is not navigable. | |
| For example, many database drivers can kludge you up what is called a "keyset" driven cursor. It does this by executing the query and storing a temporary table containing the primary keys of each table in the query for each result row (this is stored either in the driver (for a client-driven keyset) or on the server (for a server driven keyset). When you ask for a row from the keyset, the primary keys are used to issue a bunch of queries to "reconstruct" the "present view" of the result that would be at that navigational location for you. There are also, usually in these same drivers, what are called "scrollable" cursors. These differ from a |