SelectJobs Benefits to Programmers & Analysts

SelectJobs are invaluable to IT professionals at any Unix/Linux/Windows site because:

  1. They are much more powerful than grep because they can search for multiple patterns with 1 pass, using AND & OR relationships.

  2. You can specify a series of up to 9 patterns that must be present or not present (AND relationships) and you can have multiple such series (OR relationships).

  3. You can specify that the multiple patterns must be found or not found on the same line or on any line in the file, or on 1 or any line between a begining & ending line, that are themselves identified by 1 or multiple patterns.

  4. You can use these tools to investigate problems in text files of any kind: data files, scripts (SQLs, JCLs, FTPs, etc),& any programming language.

  5. You can use Selectjobs to research the impacts of planned changes to your scripts & programs.

  6. SelectJobs create reports in subdir selects/... of the current working directory, automatically named from the file or directory concatenated with patterns used. This allows you to review past searches & easily modify & repeat the search.

  7. The search reports include all relevant info (files,dirs,search patterns,date/time, user,host,etc) to help you document problems & plan proposed changes.

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

SelectJobs (UVdemos Part 3) - Contents


3A1. Select Jobs - Introduction & Practical Examples

3B1. Vancouver Utilities - subdirs relevant to SelectJobs

3B2. Copy $UV/demo/* to demo/ subdir in your homedir
- so you can run SELECT job demos from your demo/... subdir

3B3. Setup check-list - Are you Ready to run the test/demos ?

3C1. selectlf1 - select lines from 1 file identified by up to 9 patterns
matching and/or not-matching datafile contents
- First Example to serve as basis for pattern definition Rules

3D1. Test/Demo selectlf1 to illustrate Pattern Rules (common to all select jobs)
- 10 sample patterns for use with testfile dat1/nameadrs1
  (testdata only 8 records so you can easily check selections correct or not)
- prefix patterns with '+' for presence (default) & '-' for absence
- may specify multiple patterns for 1 selection via sequence#
  example: arg1=+1@Townsend:+2@Canada,-3@Owen
- may restrict search area: arg1=@0[20]Townsend:@20[60]Owen
- output reports created in ./selects/... subdir
  named by concatenating input directory & patterns

3D3. select_nameadrs1 script to run above 10 test/demos automatically (vs keyins)

3D4. Special Character substitutions
- use '^' circumflex for space & '%' percent for commas
- required when patterns coded on command line arg1=...
- not required if you enter patterns at the prompt
 Reports automatically written to selects/ subdir
- named by concatenating input filename & patterns

3E1. Test/Demo selectlf1 using dat1/CanadaMPs Canadian Members of Parliament (335 records)
- higher volume demo file (vs 8 record dat1/nameadrs1)
- a few suggested patterns, then make up your own patterns

3F1. selectlfd1 - select lines from all files in a directory
- same selection rules as for selectlf1

3G1. selectlgfd1 - select line Groups from all Files in a Directory
- same selection rules as for selectlf1
- begin group patterns specified via arg1=...
- end group patterns specified via arg2=...
- optional group qualify patterns specified via arg3=...
(selects all lines of group if arg3 absent)

3G2. selectlgfd2 - same as selectlgfd1, but arg3=... searches for patterns
on any line in the group (vs on the same line)

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

Part 3 SelectJobs - Contents (continued)


3H1. selectlgfd1 - Example#2 select JCL SYSINs with AND & OR conditions
- We need to inspect SORT INCLUDE/OMIT CONDitions with both "AND"s & "OR"s
  which may need manual corrections.

3H2. selectlgfd2 - Example#2 select JCL SYSINs with AND & OR conditions (BETTER)
- selectlgfd2 can select ONLY the SYSINs with BOTH ANDs & ORs
  vs selectlgfd1 which could only select SYSINs with EITHER AND or OR

3I1. selectfdd1 - select Files from 1 directory to a 2nd directory
- based on multiple patterns on the same line or any line
  Note difference 'selectfdd1' (vs prior selectlf1,selectlfd1,selectlgfd1/2)
- selectfdd1 selects the entire file to an output directory
  vs prior select jobs that created reports in the selects/... directory

3J1. Select Demos using demo file of US Congress Representatives & Senators
- csv file downloaded & converted to fixed field locations to allow
  precise selections & selections based on '>' & '<' conditions.
- samples of the 539 records with a column scale for field locations.
- sample selections with results expected that you can run for self training.

Note - SelectJobs also in UVdemos

SelectJobs.htm is the same as UVdemos.htm#Part_3. SelectJobs was duplicated as a separate document because it is 1 of the most useful parts of UVdemos.


TableJobs.htm (same as UVdemos.htm#Part_4) is also a separate document.

UVscripts.htm (same as UVdemos.htm#Part_5) is also a separate document.

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

3A1. Vancouver Utility Programming Aids - Selectjobs

SelectJobs - Introduction & Overview

Select Jobs (selectlf1,selectlfd1,selectlgfd1,etc)are pre-programmed uvcopy jobs to select lines from 1 or all files in a directory, lines identified by up to 9 patterns, matching and/or not-matching datafile contents.

You may prefix patterns with '+' for presence & '-' for absence. You may specify multiple patterns for 1 selection via a sequence#, for example:


 arg1=+1@Townsend:+2@Canada,-3@Owen   <-- multi conditions +present & -absent
 ==================================

You may restrict the search area by displacement[length], for example:


 arg1=+1@0[20]Townsend:+2@20[60]Owen  <-- Townsend in cols 1-20 & Owen in 21-80
 ===================================

This document provides demo files & several suggested search patterns. Please run the demos & check your results to the expected.

We think you will appreciate that these select jobs are much more powerful than 'grep' because they can search for multiple conditional patterns with 1 pass. After the demos & understanding how the patterns & conditions are specified, please try out these select jobs on your files.

You might have a directory of thousands of scripts & you need to select some scripts (for investigation & correction) based on some combination of patterns which may be on the same line or on any line in the script.

Use 'selectlfd1' if the multiple patterns must be on the same line, or use 'selectlgfd2' if the multiple patterns could be anywhere in the file, or if the patterns must be between 2 other lines - start search & stop search lines which can also be identified by up to 9 patterns

For example, we can use selectlgfd2 to search SQL 'SELECT' statements which can be multi-lines, but known to end with a ';' semi-colon. arg1=SELECT,arg2=; & arg3=desired search patterns between arg1 & arg2 (begin & end).

If you have a problem with your files & are wondering how it could be solved with Vancouver Utilities, we invite you to email us, explain the problem, and we will help you solve it (as our time allows).

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

3A2. SelectJobs - Introduction & Overview

Example to Illustrate SelectJob Capabilities vs grep

JCL conversions of complex SORTs with INCLUDE/OMIT AND/OR conditions may need manual corrections & need to be inspected. I wanted to scan hundreds of JCLs extracting only the SORT SYSIN parameters with both "AND" & "OR" CONDitions.

'grep' can not do this because the ANDs & ORs could be on different lines. Here is the command for 'selectlgfd2' which can look for //SYSIN to /* groups with both "AND" & "OR" in between.


 uvcopy selectlgfd2,fild1=jcl2,arg1=@//SYSIN,arg2=/*,arg3=1@COND:2@AND:3@OR%
 ============================================================================
  - scan for //SYSIN to /* line groups with "AND", "OR", "CONDitions"
  - creates report in subdir selects/... named from directory + patterns as shown below:
 # Report: selects/jcl2_SYSIN_1@COND:2@AND:3@OR%
 # ---> uvcopy selectlgfd2,fild1=jcl2,arg1=//SYSIN,arg2=/*,arg3=1@COND:2@AND:3@OR%
 #      =========================================================================
 # format: uvcopy selectlgfd2,fild1=directory,arg1=...,arg2=...,arg3=...,arg4=...,uop=abcdgi
 # arg1 patterns identify begin-group line, arg2 patterns identify end-group line
 # arg3 patterns qualify group selection, arg4 patterns qualify lines to output/print
 #  - code '^' circumflex for ' ' spaces and '%' percent for ',' commas in patterns
 #  - may prefix patterns: '-' for absence, '+' for presence (default)
 #  - may restrict search area: arg2=@0[2]/*  <-- "/*" must be in 1st 2 bytes
 #  - multiple-condition-series: arg3=1@SORT:2@COND:3@AND:4@OR <-- ALL patterns must match
 # Date=2019/06/09_10:29:01, Site=UV_Software, Host=uvsoft5, User=uvadm, Options=
 #===============================================================================
 //SYSIN    DD *
 SORT FIELDS=(1,8,CH,A,69,12,CH,A)
 INCLUDE COND=(((9,1,CH,EQ,C'T'),OR,(COND=(9,1,CH,EQ,C'X'))),
                                 AND,(COND=(56,2,CH,EQ,C'AB')))
 /*
                          EOG: #1, 5 lines selected from jcl2/jgl232
                          EOF:     5 selected from 35 in jcl2/jgl232
 EOD: 7 files, 168 lines, selected 1 groups, 5 lines to selects/jcl2_SYSIN_1@COND:2@AND:3@OR%

SelectJob Advantages

  1. Can select lines based on up to 9 patterns that must be present or absent.

  2. Can select groups of lines (identified by patterns on a start-line & an end-line), that include multiple patterns on any line between the start & end lines.

  3. SelectJobs create reports in subdir selects/... automatically named from the file or directory concatenated with patterns used. This allows you to review your past searches & see the command used for easy modify & repeat.

  4. You may restrict pattern searches to record areas, for example "arg1=1@0[20]Owen,2@40[40]Vancouver" searches for "Owen" anywhere in 1st 20 bytes and "Vancouver" anywhere in columns 41-80. For the JCL/SORT example we could have "arg1=@0[7]//SYSIN,arg2=@0[2]/*" since we know these patterns start in column 1.

  5. SelectJobs can use '>' & '<' conditions, but only if the field is in a fixed position. See examples later in this documentation on page '3E3'.

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

3B1. Vancouver Utility Programming Aids - Selectjobs

Vancouver Utilities - subdirs relevant to SelectJobs

Here is the Vancouver Utilities homedir showing only the most relevant subdirs required for the SelectJob demos documented in this section of UVdemos.htm.

You could run the demos logged in as 'uvadm', but if you are sharing the system with other uvadm users, it would be better to copy the demo/subdirs/files to your own homedir. See the copy instructions below & an expanded view of the demo/... files on the next page.

 /home/uvadm             <-- $UV
 :-----bin                 - UV binaries (uvcopy,uvsort,uvcp,uvhd,uvlist,etc)
 :-----dat1                - test data files to demo various Vancouver Utilities
 :     :-----...         <-- 200 testdata files for all uvcopy job demos
 :     :                   - SelectJobs testdata files copied to demo/dat1/...
 :-----doc                 - Vancouver Utilities documentation (text)
 :     :----UVdemos.doc    - this documentation (1 of 150 files)
 :     :----SelectJobs.doc - Part3 of UVdemos duplicated as a separate document
 :-----dochtml             - documentation in HTML (uploaded to www.uvsoftware.ca)
 :-***-demo              <-- demo files for TestDemo tutorials, copy to your homedir -->
 :     :                   - copy /home/uvadm/demo/* to your /home/userxx/demo/...
 :     :-----dat1          - data files for SelectJob demos, see details on next page
 :     :-----ftps          - SYSIN control cards for various purposes
 :     :-----jcl2          - mainframe JCL samples (8)
 :     :-----sqls          - SQL scripts for SelectJob demos, see next page -->
 :-----pf                <-- Parameter Files for uvcopy
 :     :-----util              - uvcopy SelectJobs
 :     :     :-----selectlf1     - select Lines from 1 File
 :     :     :-----selectlfd1    - select Lines from all Files in a directory
 :     :     :-----selectlgfd1   - select Line Groups from all Files in directory
 :     :     :-----selectlgfd2   - select Line Groups from all Files in directory
 :     :     :-----selectfdd1    - select Files from 1 Directory to a 2nd Directory
 :     :-----adm               - uvcopy jobs for uvadm admin
 :     :-----demo              - uvcopy jobs for various demos
 :     :-----IBM               - uvcopy jobs for Mainframe conversions
 :-----sf                <-- Script Files (bash or Korn shell)
 :     :-----adm               - scripts for uvadm admin
 :     :-----demo              - demo scripts
 :     :-----util              - utility scripts
 :     :-----IBM               - scripts for mainframe conversions
 :-----src               <-- Vancouver Utilities C source code (uvcopy,uvsort,etc)
 :-----tf                  - test files for various demos (similar to dat1/...)
 :-----tmp                 - tmp subdir (test/demo outputs)
 :-----tmp1                - misc, outdir for some utility scripts (like listall1)
 :-----tmp2

Please copy the demo/... files to your homedir to avoid conflict with other users of Vancouver Utilities & to avoid losing your files when new versions of Vancouver Utilities are installed.

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

3B2. Vancouver Utility Programming Aids - Selectjobs

copy $UV/demo to your $HOME/demo/...


 #1. Login userxx --> /home/userxx
 #2. mkdir demo   <-- make directory for copy of demo files in your homedir

 #3. cp -r /home/uvadm/demo/* demo/   <-- copy demo files to your homedir
     ==============================
 #4. cd demo    <-- change into demo/ directory
     =======

SelectJobs demo files copied to your homedir

Here is an expanded view of the most relevant subdirs/files required for the SelectJob demos (omitting subdirs/files used for other parts of UVdemos.doc).

 /home/userxx/demo/              - copy to your homedir, cd demo/ & run jobs there
 :-----dat1                    <-- testdata files for demos
 :     :-----nameadrs1           - 8 line testdatafile to demo pattern rules
 :     :-----CanadaMPs.csv       - CAnadian Members of Parliament Names & constituencies
 :     :-----CanadaMPs           - text files in fixed fields extracted from .csv file
 :     :-----UScongress.csv
 :     :-----UScongress
 :     :
 :-----jcl2                    <-- JCLs to demo selectlgfd1/2
 :     :-----jar200.jcl
 :     :-----...etc...
 :-----pf                      <-- uvcopy job Parameter Files, see note below
 :     :-----                    - you could create your own uvcopy jobs here
 :     :
 :-----selects                 <-- output directory for select job reports
 :     :-----dat1_nameadrs1_+1@Townsend:+2@Canada:-3@Owen
 :     :-----...                 - sample above from selectlf1 1st demo
 :     :-----...                 - concatenation of directory_file_patterns
 :-----sqls                    <-- SQL scripts for SelectJob demos
 :     :-----select_Customers_all
 :     :-----select_Customers_sales
 :     :-----...etc...
 :-----tmp
 :-----tmp1                    <-- tmp dirs for temp files, sorts, etc
 :-----tmp2

uvcopy job Locations


 uvcopy selectlf1,fili1=dat1/nameadrs1,arg1=+1@Townsend:-2@Owen
 ==============================================================
 - sample uvcopy execution of 'selectlf1' Parameter File (uvcopy job)
 - How does uvcopy know where to find its Parameter File of instructions ?

uvcopy looks for the Parameter/Instruction File via $PFPATH, similar to scripts using $PATH. The SELECT jobs are stored in /home/uvadm/pf/util/... (as shown on the previous page) & the common_profile includes:


 export PFPATH=$UV/pf/demo:$UV/pf/IBM:$UV/pf/util:$HOME/pf:---etc---
 ====================================================================

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

3B3. Vancouver Utility Programming Aids - Selectjobs

Setup check-list - Ready to run test/demos ?

We will present a 'setup check-list' here, since you may be reading this in the separate SelectJobs.doc vs UVdemos.doc which includes SelectJobs as Part3.

See UVdemos.htm for the complete setup procedures, but here is a check-list of the steps required before you can execute these test/demos.

  1. Install Vancouver Utilities. See complete documenation at install.htm. Also see the install summary at UVdemos.htm#1A3.

  2. Setup your user login account if not already done. See UVdemos.htm#1C1.

  3. Setup subdir demo/ in your homedir & copy $UV/demo/* to your $HOME/demo/... See the short version here on page '3B2' &/or the long version with file-lists file-lists at UVdemos.htm#1C2 & file-contents at UVdemos.htm#1D1 - 1D6.

    testdata file contents

Here in SelectJobs, we will usually show just a sample of the relevant testdata before each test/demo execution. See UVdemos.htm#1D1 - 1D6 to see all files & all contents of the testdatafiles.

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

3C1. Programming Aids - SelectJobs

dat1/nameadrs1 - testdata file for 1st demo

          1         2         3         4         5         6         7         8
 12345678901234567890123456789012345678901234567890123456789012345678901234567890
 Owen Townsend       4667 Hoskins Rd     North Vancouver, BC Canada V7K2R3
 Jenny Townsend      21 Canada Place     Vancouver, BC       Canada V5P3V8
 John Horgan         123 Townsend Ave.   Townsend City, BC   Canada V1P2G3
 John Townsend       2121 Owen Drive.    St. John, NB        Canada M5W1E6
 John Owens          24 Townsend Dr.     Owenville, ON       Canada M5K3B3
 Donald Trump        1600 Pennsylvannia  Washingtom, DC      USA 00001
 Bill Gates          1 Microsoft Way     Seattle, WA         USA 98052-6399
 Peter Townsend      24 Johnson Road     London, England     UK EC1A 1HQ
Note
  • "Owen" & "Townsend" are repeated in various name & address fields
    so we can practise selecting various combinations from various fields

selectlf1 - 1st Example for Pattern Rules following


 #0b. Login uvadm  --> /home/uvadm  <-- could use uvadm if you are only user
 #0a. Login userxx --> /home/userxx <-- better/safer to copy files to your homedir
 #1.  cd demo            <-- change into demo/ directory
 #2a. rm -f selects/*    <-- remove old selection reports
 #2b. rm -f tmp*/*       <-- remove old temporary files (from tmp/, tmp1/, tmp2/)

 #2. uvcopy selectlf1,fili1=dat1/nameadrs1,arg1=+1@Townsend:+2@Canada:-3@Owen
     ========================================================================
     - select lines from dat1/nameadrs1 with "Townsend" & "Canada", but NOT "Owen"

 #2a. cat    <-- End of Job prompt for command to view output file
      ===      - enter command only (cat,more,vi,etc), no need for filename
               - Result (2 lines) as follows:
 Jenny Townsend      21 Canada Place     Vancouver, BC       Canada V5P3V8
 John Horgan         123 Townsend Ave.   Townsend City, BC   Canada V1P2G3
Note
  • Can you confirm that the 2 lines reported (Jenny Townsend & John Horgan)
    are the only 2 of the 8 input lines that satisfy the selection patterns ???
  • See the dat1/nameadrs1 testdatafile listed at the top of this page.
Note
  • output reports are created in the ./selects/ subdir of current directory
  • named by concatenating input directory + filename + arg1 patterns
  • any characters invalid in filenames such as '/' converted to '_' underscores
  • You may view separately at any time with vi,cat,more,lp,uvlp12,etc

 #3a. vi selects/dat1_nameadrs1_+1@Townsend:+2@Canada:-3@Owen  <-- using 'vi'
      =======================================================

 #3b. cat selects/dat1_nameadrs1_+1@Townsend:+2@Canada:-3@Owen  <-- using 'cat'
      ========================================================
      - 'cat' is convenient when you know the result is less than a screenfull

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

3C2. Programming Aids - SelectJobs

Output Report from selectlf1

The prior page showed only the 2 lines selected from the 8 line input file.

Actually, selectlf1 creates a Report with command parameters used, which are useful when you need to review the results or rerun the selection with different parameters. Here is the full report, with the selected lines & stats at the end

selects/dat1_nameadrs1_+1@Townsend:+2@Canada:-3@Owen

 # Report: selects/dat1_nameadrs1_+1@Townsend:+2@Canada:-3@Owen
 # ---> uvcopy selectlf1,fili1=dat1/nameadrs1,arg1=+1@Townsend:+2@Canada:-3@Owen
 #      =========================================================================
 #format: uvcopy selectlf1,fili1=inputfile,arg1=pattern1:pattern2,etc,uop=i0/i1
 # arg1 - line selection conditions (up to 9 patterns to match or not-match)
 # - code '^' circumflex for ' ' spaces and '%' percent for ',' commas in patterns
 # - may prefix patterns with '-' for absence, '+' for presence (default)
 # - may restrict search area, example: arg1=@0[20]Townsend:@20[60]Owen
 # - multiple conditions: arg1=+1@Townsend:+2@Canada,-1@Owen,-2@BC
 # - if no seq#s (+1,+2,etc) default selects if any +pattern & no -pattern
 # - combination ex: arg1=+1@0[20]Townsend:+2@60[60]Canada:-@0[20]Owen
 # Date=2019/05/12_16:14:14, Site=UV_Software, Host=uvsoft5, User=uvadm, Options=
 #===============================================================================
 Jenny Townsend      21 Canada Place     Vancouver, BC       Canada V5P3V8
 John Horgan         123 Townsend Ave.   Townsend City, BC   Canada V1P2G3
 # EOF - 2 lines selected from dat1/nameadrs1

Report Format for SelectJobs

  1. 1st line identifies the report filename (in selects/... subdir by default)

  2. 2nd line shows the uvcopy SelectJob command line arguments

  3. Lines 3-11 are SELECT job format rules & help info

  4. Line 12 shows current date, sitename, hostname, username,& options

  5. Lines 14+ are the selected data lines (only 2 lines in this example)

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

3D1. Select Jobs - selectlf1, selectlfd1, selectlgfd1

Test/Demos to illustrate Pattern Rules

The Pattern Rules are common to all Select Jobs (selectlf1,selectlfd1,selectlgfd1), but we will use selectlf1 for most examples below. You may run the commands below & confirm your results match our documented selection counts.

Patterns may be entered on the command line via arg1=... OR at the prompt, They are best entered on the command line for easy rerun from command history.

dat1/nameadrs1 - compare demo outputs to these 8 records

          1         2         3         4         5         6         7         8
 12345678901234567890123456789012345678901234567890123456789012345678901234567890
 Owen Townsend       4667 Hoskins Rd     North Vancouver, BC Canada V7K2R3
 Jenny Townsend      21 Canada Place     Vancouver, BC       Canada V5P3V8
 John Horgan         123 Townsend Ave.   Townsend City, BC   Canada V1P2G3
 John Townsend       2121 Owen Drive.    St. John, NB        Canada M5W1E6
 John Owens          24 Townsend Dr.     Owenville, ON       Canada M5K3B3
 Donald Trump        1600 Pennsylvannia  Washingtom, DC      USA 00001
 Bill Gates          1 Microsoft Way     Seattle, WA         USA 98052-6399
 Peter Townsend      24 Johnson Road     London, England     UK EC1A 1HQ

 #1. uvcopy selectlf1,fili1=dat1/nameadrs1,arg1=Townsend:Owen
     ========================================================
     - select lines with "Townsend" OR "Owen" anywhere on the line
      --> enter patterns if not on command line arg1=...
      selects/dat1_nameadrs1_Townsend:Owen default filo02 -->     <-- null accept
      default command null, OR enter: vi,cat,more,etc     --> cat <-- enter cat
           ---------------- 6 of 8 lines are selected --------------
     Owen Townsend       4667 Hoskins Rd     North Vancouver, BC Canada V7K2R3
     Jenny Townsend      21 Canada Place     Vancouver, BC       Canada V5P3V8
     John Horgan         123 Townsend Ave.   Townsend City, BC   Canada V1P2G3
     John Townsend       2121 Owen Drive.    St. John, NB        Canada M5W1E6
     John Owens          24 Townsend Dr.     Owenville, ON       Canada M5K3B3
     Peter Townsend      24 Johnson Road     London, England     UK EC1A 1HQ
Note
  • #1 above specifies the input file (fili1=dat1/nameadrs1)
  • But, we will omit on following examples, since it is the default
  • Here is the revised command, the prompts,& the recommend replies:
  • null to accept the I/O files & 'cat' to display the selected records

 #1. uvcopy selectlf1,arg1=Townsend:Owen  <-- can omit fili1=dat1/nameadrs1 (default)
     ===================================
     - select lines with "Townsend" OR "Owen" anywhere on the line
      dat1/nameadrs1 = default fili01                     -->     <-- null accept
      --> enter patterns if not on command line arg1=...
      selects/dat1_nameadrs1_Townsend:Owen default filo02 -->     <-- null accept
      default command null, OR enter: vi,cat,more,etc     --> cat <-- enter cat
Note
  • We will not show these prompts & replies on the following examples
  • But please enter the 2 nulls & 'cat' when prompted

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

3D2. Select Jobs - Test/Demos to illustrate Pattern Rules


 #2. uvcopy selectlf1,arg1=+Townsend:+Canada:-Owen
     =============================================
     - select lines with "Townsend" OR "Canada", but NOT "Owen"   <-- ERROR, INVALID

You may code 1st byte of pattern as '+' (default) to indicate the pattern must be present and '-' to indicate the pattern must be absent (NOT found). But, this example is INVALID, cannot mix '+' & '-' conditions, unless the '-' conditions are at the end of a conditional series, for example: +1...,+2...,-3...,-4...


 #3. uvcopy selectlf1,arg1=+1@Townsend:+2@Canada:-3@Owen <-- CONDITION SERIES
     ===================================================
     - select lines with "Townsend" AND "Canada", but NOT "Owen"
           ---------------- 2 of 8 lines are selected --------------
     Jenny Townsend      21 Canada Place     Vancouver, BC       Canada V5P3V8
     John Horgan         123 Townsend Ave.   Townsend City, BC   Canada V1P2G3

The '+1' indicates the First condition & '+2' the Second condition of a series (9 max). Match assumed if any '+' pattern found, then negated if any '-' pattern found. You must code '+' patterns prior to any '-' patterns in a series 1/2/3. You could omit the '+' condition prefixes since that is the default


 #4. arg1=+@0[60]Townsend:+@60[20]Canada:-@0[20]Owen  <-- RESTRICTED SEARCH AREAS
     ===============================================
     - match if "Townsend" in 0-59 OR "Canada" in 60-79, But not if "Owen" in 0-19.
           ---------------- 3 of 8 lines are selected --------------
     Jenny Townsend      21 Canada Place     Vancouver, BC       Canada V5P3V8
     John Horgan         123 Townsend Ave.   Townsend City, BC   Canada V1P2G3
     John Townsend       2121 Owen Drive.    St. John, NB        Canada M5W1E6

You may specify "Restricted Search Areas" by coding the Displacement[Length] following the '@' identifier.


 #5. arg1=+1@Townsend:+2@Canada:-3@Owen:+1@Townsend:+2@UK:-3@Owen <-- MULTI-SERIES 1,2,3,1,2,3
     ===========================================================
     - match if "Townsend" AND "Canada" & NOT "Owen"
     - AND   if "Townsend" AND "UK" & NOT "Owen"
           ---------------- 2 of 8 lines are selected --------------
     Jenny Townsend      21 Canada Place     Vancouver, BC       Canada V5P3V8
     John Horgan         123 Townsend Ave.   Townsend City, BC   Canada V1P2G3
     Peter Townsend      24 Johnson Road     London, England     UK EC1A 1HQ

 #6. uvcopy selectlf1,arg1=-Townsend           <-- NOT present
     ===============================
     - select lines WITHOUT "Townsend" (anywhere in record)
           ---------------- 3 of 8 lines are selected --------------
     John Owens          24 Townsend Dr.     Owenville, ON       Canada M5K3B3
     Donald Trump        1600 Pennsylvannia  Washingtom, DC      USA 00001
     Bill Gates          1 Microsoft Way     Seattle, WA         USA 98052-6399

 #7. uvcopy selectlf1,arg1=-1@Townsend:-2@Owen  <-- SERIES NOT present
     =========================================
     - select lines WITHOUT "Townsend" & without "Owen"
           ---------------- 3 of 8 lines are selected --------------
     Donald Trump        1600 Pennsylvannia  Washingtom, DC      USA 00001
     Bill Gates          1 Microsoft Way     Seattle, WA         USA 98052-6399

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

3D3. Select Jobs - Test/Demos to illustrate Pattern Rules

script to run 10 selectlf1 test/demos

 # select_nameadrs1 - script stored at $UV/demo/sf/select_nameadrs1
 #                  - to test uvcopy $UV/pf/util/selectlf1
 #                  - by Owen Townsend, UV Software, May13/2019
 # - run selectlf1 with various selection patterns, reports collectedin ./selects/...
 #              --------- testdatafile -----------
 # Owen Townsend       4667 Hoskins Rd     North Vancouver, BC Canada V7K2R3
 # Jenny Townsend      21 Canada Place     Vancouver, BC       Canada V5P3V8
 # John Horgan         123 Townsend Ave.   Townsend City, BC   Canada V1P2G3
 # John Townsend       2121 Owen Drive.    St. John, NB        Canada M5W1E6
 # John Owens          24 Owen Avenue      Owenville, ON       Canada M5K3B3
 # Donald Trump        1600 Pennsylvannia  Washingtom, DC      USA 00001
 # Bill Gates          1 Microsoft Way     Seattle, WA         USA 98052-6399
 # Peter Townsend      24 Johnson Road     London, England     UK EC1A 1HQ
 #
 export UVCOPYROP=q0i7r0  # inhibit prompts
 # default fili1=dat1/nameadrs1 (omitted here to save space)
 uvcopy selectlf1,arg1=Townsend:Owen                  #1 - any match
 uvcopy selectlf1,arg1=+1@Townsend:+2@Canada:-3@Owen  #2 - multi-condition match
 uvcopy selectlf1,arg1=+1@0[20]Townsend:+2@60[20]Canada:-3@0[60]Owen #3(1) - restricted areas
 uvcopy selectlf1,arg1=+1@0[20]Townsend:+2@60[20]Canada:-3@0[60]Owen\
 :+1@0[20]Townsend:+2@60[20]UK:-3@0[60]Owen           #5 - multi-condition-series
 uvcopy selectlf1,arg1=-Townsend                      #6 - NOT condition
 uvcopy selectlf1,arg1=-1@Townsend:-2@Owen            #7 - NOT multi-conditions
 uvcopy selectlf1,arg1=@0[4]>Owen                     #8 - > or < condition
 # following will be rejected with errmsgs
 uvcopy selectlf1,arg1=+Townsend:+Canada:-Owen        #1 ERR: mixed +/-, - not end series
 uvcopy selectlf1,arg1=-Townsend:+Owen                #2 ERR: mixed #1 '-' & any '+'
 uvcopy selectlf1,arg1=-Townsend:-owen                #3 ERR: multi #1 '-'s
 uvcopy selectlf1,arg1=-1@Townsend:+2@Owen            #4 ERR: #1 '-' with any '+'

executing sf/adm/select_nameadrs1


 #0b. Login uvadm  --> /home/uvadm  <-- could use uvadm if you are only user
 #0a. Login userxx --> /home/userxx <-- better/safer to copy files to your homedir

 #1. rm -f selects/*    <-- remove old selection reports

 #2. select_nameadrs1      <-- execute script (no arguments required)
     ================        - will get multiple prompts for input file accept/change
      dat1/nameadrs1 = default fili01                     -->     <-- null accept
      --> enter patterns if not on command line arg1=...
      selects/dat1_nameadrs1_Townsend:Owen default filo02 -->     <-- null accept
      default command null, OR enter: vi,cat,more,etc     --> cat <-- enter cat

For each of the 10 runs in the script, you can reply null to accept the default filenames and then reply "cat" to see the output records selected.

OR, you could reply null to all prompts & then inspect output reports in selects/...


 #3. vi selects/*       <-- view all 10 output reports
     ============

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

3D4. Select Jobs - Test/Demos to illustrate Pattern Rules

Special Characters in arg1 patterns

  1. You can not code ' ' spaces in the arg1 patterns (for testsst2 & select jobs below), because these jobs convert spaces to tildes when storing patterns in the table, & because the uvcopy command line does not allow embedded spaces. BUT, you may code ' ' spaces as '^' circumflexes, which will be converted to ' ' spaces.

  2. You can not code ',' commas in arg1 patterns, because the uvcopy command line uses ',' commas to separate arguments. BUT, you may code commas as '%' percents, which will be converted to ',' commas.

    reports written to selects/... subdir

  3. By default, the SELECT jobs create their output reports in ./selects/... (subdir in the current directory).

  4. The output report filename defaults to a concatenation of the input directory, and the arg1/2/3 patterns, with '/'s converted to '_' underscores. Note in the above example, the report is 'selects/jcl2_SYSIN_1@cond:2@and:3@or'.

  5. If desired, you could specify an alternate output report filename, but the default is very convenient & creates unique filenames identifying the directory searched & the search patterns used.

  6. Note the 14 line report prefix which includes the Report: filename, the uvcopy command that created it, several lines of "help" information, and the current date=..., Site=..., Host=..., User=...,& Options=...

    Try selectlf1 with YOUR PATTERNS

Please try out selectlf1 with your own patterns, You might vary the suggested patterns listed on the previous page in the 'select_nameadrs1' script. See if you can find a pattern that does not give the expected results.


 uvcopy selectlf1,fili1=dat1/nameadrs1,arg1=...YOURPATTERNS...
 =============================================================

Try selectlf1 with YOUR DATA files & PATTERNS

Then try out selectlf1 with your own files & patterns.


 #1. cd your working directory (above your directory of files)

 #2. mkdir selects   <-- make directory for output reports
     =============

 #3. uvcopy selectlf1,fili1=yourdir/YOURDATAFILE,arg1=...YOURPATTERNS...
     ===================================================================

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

3E1. Select Jobs - *selectlf1, selectlfd1, selectlgfd1

dat1/CanadaMPs - larger test file to demo Select Jobs

$UV/dat1/CanadaMPs is the CAnadian Members of Parliament data file that we can use for tutorials & you can use for self training using these Select Jobs.

We downloaded a spreadsheet, extracted a csv file (dat1/CanadaMPs.csv) & converted to a fixed layout so we could define specific fields required for some selections. See '10D1' if you are interested to see the uvcopy job (demo/pf/CanadaMPscsv2txt).

Here are the samples of the 335 records with a column scale in case you wish to test select job searches with restricted areas.

samples of Canadian MPs .csv converted to fixed fields

 Title,First Name,Last Name,Constituency,Province/Territory,Political Affiliation,Start Date
 ,Ziad,Aboultaif,Edmonton Manning,Alberta,Conservative,10/19/2015
 ,Dan,Albas,Central Okanagan/Similkameen/Nicola,British Columbia,Conservative,10/19/2015
          1         2         3         4         5         6         7         8         9       100
 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
               ----------------- First 2 of 335 MP's ------------------
 001  Aboultaif          Ziad            Edmonton Manning              AB Conservative     2015
 002  Albas              Dan             Central Okanagan/Similkameen/ BC Conservative     2015
               --------------- samples of all parties --------------
 010  Anderson           David           Cypress Hills/Grasslands      SK Conservative     2015
 011  Angus              Charlie         Timmins/James Bay             ON NDP              2015
 023  Barsalou-Duval     Xavier          Pierre-Boucher/Les Patriotes/ QC Bloc Quebecois   2015
 032  Bernier            Maxime          Beauce                        QC People's Party   2015
 202  May                Elizabeth       Saanich/Gulf Islands          BC Green Party      2015
 328  Wilson-Raybould    Jody            Vancouver Granville           BC Independent      2015
               ----------------- Last of 335 MP's ------------------
 335  Zimmer             Bob             Prince George/Peace River/Nor BC Conservative     2015

sample selection from CAnadian Members of Parliament


 uvcopy selectlf1,fili1=dat1/CanadaMPs,arg1=1@AB:2@Liberal
 ========================================================
  - select "Liberal" party members from "AB" (Alberta)
  - report created in selects/... named by concatenating directory + patterns
 # Report: selects/dat1_CanadaMPs_1@AB:2@Liberal
 # ---> uvcopy selectlf1,fili1=dat1/CanadaMPs,arg1=1@AB:2@Liberal
 #      =========================================================================
 #format: uvcopy selectlf1,fili1=inputfile,arg1=pattern1:pattern2,etc,uop=i0/i1
 # arg1 - line selection conditions (up to 9 patterns to match or not-match)
 # - code '^' circumflex for ' ' spaces and '%' percent for ',' commas in patterns
 # - may prefix patterns with '-' for absence, '+' for presence (default)
 # - may restrict search area, example: arg1=@0[20]Townsend:@20[60]Owen
 # - multiple conditions: arg1=+1@Townsend:+2@Canada,-1@Owen,-2@BC
 # - combination ex: arg1=+1@0[20]Townsend:+2@60[60]Canada:-@0[20]Owen
 # Date=2019/07/06_16:32:34, Site=UV_Software, Host=uvsoft5, User=uvadm, Options=
 #===============================================================================
 042  Boissonnault       Randy           Edmonton Centre               AB Liberal          2015
 140  Hehr               Kent            Calgary Centre                AB Liberal          2015
 294  Sohi               Amarjeet        Edmonton Mill Woods           AB Liberal          2015
 # EOF - 3 lines selected from dat1/CanadaMPs

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

3E2. Select Jobs - *selectlf1, selectlfd1, selectlgfd1

suggested patterns for searching dat1/CanadaMPs

Here are some suggested search patterns you might run on the CAnadian Members of Parliament file (for tutorials & self training on Select Jobs).

Here are 1st 3 of the 335 records with a column scale in case you wish to test select job searches with restricted areas. Note scale is 1 relative, but you must code the zero relative values for restricted area searches.

          1         2         3         4         5         6         7         8         9       100
 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
 001  Aboultaif          Ziad            Edmonton Manning              AB Conservative     2015
 002  Albas              Dan             Central Okanagan/Similkameen/ BC Conservative     2015
 003  Albrecht           Harold          Kitchener/Conestoga           ON Conservative     2015

search CanadaMPs MP file for Liberals in Vancouver


 uvcopy selectlf1,fili1=dat1/CanadaMPs,arg1=1@70[2]BC:2@Liberal:3@Vancouver
 ==========================================================================
 - select MP's from "BC" who are "Liberal"s from "Vancouver" --> result 5 records
 117  Fry                Hedy            Vancouver Centre              BC Liberal          2015
 128  Goldsmith-Jones    Pamela          West Vancouver/Sunshine Coast BC Liberal          2015
 223  Murray             Joyce           Vancouver Quadra              BC Liberal          2015
 272  Sajjan             Harjit S.       Vancouver South               BC Liberal          2015
 327  Wilkinson          Jonathan        North Vancouver               BC Liberal          2015
 # EOF - 5 lines selected from dat1/CanadaMPs

Other searches showing only number of matches expected


 uvcopy selectlf1,fili1=dat1/CanadaMPs,arg1=AB
 =============================================
 - select all 'MP's from Alberta --> result = 34 records
 - see if you get the same result ?

 uvcopy selectlf1,fili1=dat1/CanadaMPs,arg1=@70[2]AB
 ===================================================
 - restrict search for "AB" to columns 71-72 (in case AB occurring elsewhere)
 - we got the same number of records (34), so "AB" did not occur elsewhere
 - Next, let's try case insensitive to see if "ab" does occur elsewhere

 uvcopy selectlf1,fili1=dat1/CanadaMPs,arg1=ab
 =============================================
 - search for "ab" vs "AB", will not work, since default is case sensitive
 --> gets 15 unrelated records with "ab" as parts of names

 uvcopy selectlf1,fili1=dat1/CanadaMPs,arg1=ab,uop=s1  - case insensitive option 's1'
 ====================================================  - "ab" same as "AB"
 - option 's1' (case insensitive) gets --> 52 records (18 more)

 uvcopy selectlf1,fili1=dat1/CanadaMPs,arg1=...
 ==============================================
 - continue testing with your own patterns

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

3E3. Select Jobs - *selectlf1, selectlfd1, selectlgfd1

searching with > & < conditions

Searching for > & < can only be used on fields with fixed-positions. We will demo using dat1/CanadaMPs which has the year elected in columns 91-94 (zero relative 90-93). Here are 1st 3 of 335 records with a column scale.

          1         2         3         4         5         6         7         8         9       100
 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
 001  Aboultaif          Ziad            Edmonton Manning              AB Conservative     2015
 002  Albas              Dan             Central Okanagan/Similkameen/ BC Conservative     2015
 003  Albrecht           Harold          Kitchener/Conestoga           ON Conservative     2015

 #1. uvcopy "selectlf1,fili1=dat1/CanadaMPs,arg1=1@Conservative:2@90[4]>2015"
     ========================================================================
     - search for Conservatives elected since 2015
     - must enclose command in quotes when '<' or '>' used

 #2. cat selects/dat1_CanadaMPs_1@Conservative:2@90[4]_2015
     ======================================================
     - display output report (or could have replied just 'cat' at the prompt)
 022  Barrett            Michael         Leeds/Grenville/Thousand Isla ON Conservative     2018
 030  Benzen             Bob             Calgary Heritage              AB Conservative     2017
 074  Davidson           Scot            York/Simcoe                   ON Conservative     2019
 102  Falk               Rosemarie       Battlefords/Lloydminster      SK Conservative     2017
 164  Kusie              Stephanie       Calgary Midnapore             AB Conservative     2017
 182  Lloyd              Dane            Sturgeon River/Parkland       AB Conservative     2017
 197  Martel             Richard         Chicoutimi/Le Fjord           QC Conservative     2018
 222  Motz               Glen            Medicine Hat/Cardston/Warner  AB Conservative     2016
 # EOF - 8 lines selected from dat1/CanadaMPs

Try some other commands such as:


 uvcopy "selectlf1,fili1=dat1/CanadaMPs,arg1=1@Green:2@90[4]>2015:1@NDP:2@90[4]>2015"
 ====================================================================================
 195  Manly              Paul            Nanaimo/Ladysmith             BC Green Party      2019
 293  Singh              Jagmeet         Burnaby South                 BC NDP              2019

 uvcopy "selectlf1,fili1=dat1/CanadaMPs,arg1=1@Green:2@90[4]>2015:3@90[4]<2020"
 ==============================================================================
 195  Manly              Paul            Nanaimo/Ladysmith             BC Green Party      2019

Notes

  1. You must enclose command in quotes when '<' or '>' used

  2. Output files (named from filename & arg1 concatenated) will have any '>' & '<' replaced by '_' underscores

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

3F1. SelectJobs: *selectlf1* ,selectlfd1,selectlgfd1,selectlgfd2,selectfdd1

selectlfd1 - SELECT from all files in a directory

'selectlfd1' will select lines from all files in a directory, vs 'selectlf1' which selects lines for only 1 file at a time. We will demo using a directory of SQL scripts $UV/demo/sqls/... (copied to /home/userxx/demo/sqls/...)

4 SQL "customer" scripts in sqls/...

/* select_customers_all */ SELECT * FROM Customers;

 /* select_customers_basic */
     SELECT Name, Phone, Address, City, Zip
            FROM Customers;

/* select_customers_sales10000 */ SELECT custno, Name, Phone, Address, City, Zip, TYsales, LYsales, FROM Customers WHERE LYsales >10000;

/* select_customers_sales20000 */ SELECT custno, Name, Phone, Address, City, Zip, TYsales, LYsales, FROM Customers WHERE LYsales >20000;

select "customer" references from all scripts in directory


 uvcopy selectlfd1,fild1=sqls,arg1=1@SELECT:2@FROM:3@Customers,uop=s1
 ====================================================================
 - select lines with "SELECT","FROM",& "Customers" from all files in sqls/*
 - best to use option 's1' case insensitive
 # Report: selects/sqls_1@SELECT:2@FROM:3@Customers
 # ---> uvcopy selectlfd1,fild1=sqls,arg1=1@SELECT:2@FROM:3@Customers,uop=s1
 #      ====================================================================
 #format: uvcopy selectlf1,fili1=inputfile,arg1=pattern1:pattern2,etc,uop=i0/i1
 # Date=2019/06/03_17:06:11, Site=UV_Software, Host=uvsoft5, User=uvadm, Options=s1
 #=================================================================================
     SELECT * FROM Customers;
                               EOF - 1 lines selected from sqls/select_customers_all
 # EOD - 1 lines selected from 11 files in directory sqls

PROBLEM Notes

  1. File#1 was the only file with all 3 words on the same line (as required by selectlfd1). It would be better to select the Multi-Line SQL statement vs 1 matching line.

  2. See alternative jobs 'selectlgfd1' on the next page to select line groups from arg1="SELECT" until arg2=";" ending SQL statements qualified by arg3 match to 1 or multiple words on 1 line. Or see 'selectlgfd2' which can qualify by matching multiple words on any line between arg1 & arg3.

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

3G1. SelectJobs: selectlf1,selectlfd1, *selectlgfd1*, selectlgfd2,selectfdd1

selectlgfd1 - Multi-Condition-Series on any ONE line

'selectlgfd1' will select line groups from arg1=... until arg2=... qualified by arg3 matches to 1 or multiple words on 1 line. Here is an example where arg1=SELECT, & arg2=; (begin & end of SQL SELECT statement), qualified by "Customers" & "LYsales", which must appear on the same line for selectlgfd1 (vs selectlgfd2 any line).


 uvcopy "selectlgfd1,fild1=sqls,arg1=SELECT,arg2=;,arg3=1@Customers:2@LYsales,uop=s1"
 ====================================================================================
 # # Report: selects/sqls_SELECT_1@Customers:2@LYsales
 # # ---> uvcopy selectlgfd1,fild1=sqls,arg1=SELECT,arg2=;,arg3=1@Customers:2@LYsales
 # #      ===========================================================================
 # # format: uvcopy selectlgfd1,fild1=directory,arg1=...,arg2=...,arg3=...,arg4=...,uop=abcdgi
 # # arg1 patterns identify begin-group line, arg2 patterns identify end-group line
 # # arg3 patterns qualify group selection, arg4 patterns qualify lines to output/print
 # #  - code '^' circumflex for ' ' spaces and '%' percent for ',' commas in patterns
 # #  - may prefix patterns: '-' for absence, '+' for presence (default)
 # #  - may restrict search area: arg2=@0[2]/*  <-- "/*" must be in 1st 2 bytes
 # #  - multiple-condition-series: arg3=1@SORT:2@COND:3@AND:4@OR <-- ALL patterns must match
 # # Date=2019/06/03_12:40:18, Site=UV_Software, Host=uvsoft5, User=uvadm, Options=
 # #===============================================================================
 #     SELECT custno, Name, Phone, Address, City, Zip,
 #     TYsales, LYsales, FROM
 #     Customers WHERE LYsales >10000;
 #                          EOG: #1, 3 lines selected from sqls/select_customers_sales10000
 #                          EOF:     3 selected from 4 in sqls/select_customers_sales10000
 # EOD: 11 files, 36 lines, selected 1 groups, 3 lines to selects/sqls_SELECT_1@Customers:2@LYsales

Notes Re: *selectlfgfd1 (& selectlgfd2) vs prior selectlf1/selectlfd1

  1. This 'selectlgfd1' shows the complete SQL statement (from "SELECT" to ending ";") (vs 'selectlf1' & 'selectlfd1' which showed only the lines with the search argument)

  2. 'selectlgf1' qualifies the group selection by arg3 patterns, but multiple conditional series patterns (1,2,3,etc) must appear on the same line.

  3. For the 'selectlgfd1' above, we get only 1 of 4 statements (SELECT FROM Customers) because only file#3 had both "Customers" & "LYsales" on the same line.

  4. See next page example 'selectlgfd2', which can qualify the group selection by arg3 conditional series patterns (1,2,3,etc) using multiple words that can appear on any line between the arg1/arg2 begin/end patterns.

  5. Note that we need to enclose the uvcopy "selectlgfd1...arg2=;,..." command in quotes when the arguments include characters such as ';'

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

3G2. SelectJobs: selectlf1,selectlfd1,selectlgfd1, *selectlgfd2*, selectfdd1

selectlgfd2 - Multi-Condition-Series on MULTI lines (vs 1 line)

'selectlgf2' will select line groups from arg1=... until arg2=... qualified by arg3 matches to 1 or multiple words on ANY line in the Group. Here is an example where arg1=SELECT, & arg2=; (begin & end of SQL SELECT statement), qualified by "Customers" & "LYsales", which may appear on ANY line (vs selectlgfd1 one line).


 uvcopy "selectlgfd2,fild1=sqls,arg1=SELECT,arg2=;,arg3=1@Customers:2@LYsales,uop=s1"
 ====================================================================================
 # # Report: selects/sqls_SELECT_1@Customers:2@LYsales
 # # ---> uvcopy selectlgfd2,fild1=sqls,arg1=SELECT,arg2=;,arg3=1@Customers:2@LYsales,uop=s1
 # #      ==================================================================================
 # # format: uvcopy selectlgfd2,fild1=directory,arg1=...,arg2=...,arg3=...,arg4=...,uop=abcdgi
 # # arg1 patterns identify begin-group line, arg2 patterns identify end-group line
 # # arg3 patterns qualify group selection, arg4 patterns qualify lines to output/print
 # #  - code '^' circumflex for ' ' spaces and '%' percent for ',' commas in patterns
 # #  - may prefix patterns: '-' for absence, '+' for presence (default)
 # #  - may restrict search area: arg2=@0[2]/*  <-- "/*" must be in 1st 2 bytes
 # #  - multiple-condition-series: arg3=1@SORT:2@COND:3@AND:4@OR <-- ALL patterns must match
 # # Date=2019/06/03_12:43:54, Site=UV_Software, Host=uvsoft5, User=uvadm, Options=
 # #===============================================================================
 #     SELECT custno, Name, Phone, Address, City, Zip,
 #     TYsales, LYsales, FROM
 #     Customers WHERE LYsales >10000;
 #                          EOG: #1, 3 lines selected from sqls/select_customers_sales10000
 #                          EOF:     3 selected from 4 in sqls/select_customers_sales10000
 #     SELECT custno, Name, Phone, Address, City, Zip,
 #     TYsales, LYsales, FROM
 #     Customers
 #     WHERE LYsales >20000;
 #                          EOG: #1, 4 lines selected from sqls/select_customers_sales20000
 #                          EOF:     4 selected from 5 in sqls/select_customers_sales20000
 # EOD: 11 files, 36 lines, selected 2 groups, 7 lines to selects/sqls_SELECT_1@Customers:2@LYsales

Notes Re: *selectlfgfd2 (& selectlgfd1) vs prior selectlf1/selectlfd1

  1. Both selectlgfd1 & *selectlgfd2 shows complete SQL statements ("SELECT" to ending ";") (vs 'selectlf1' & 'selectlfd1' which showed only the lines with the search argument).

  2. 'selectlgf1' qualifies the group selection by arg3 patterns, but multiple conditional series patterns (1,2,3,etc) must appear on the same line. For 'selectlgfd1', we got only 1 of 4 statements because only file#3 had both "Customers" & "LYsales" on the same line.

  3. This 'selectlgfd2' can qualify the group selection by arg3 conditional series patterns using multiple words that can appear on any line between the arg1/arg2 begin/end patterns.

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

3H1. SelectJobs: selectlf1,selectlfd1, *selectlgfd1*, selectlgfd2,selectfdd1

selectlgfd1 - select JCL SYSINs with AND & OR conditions

We need to inspect SORT INCLUDE/OMIT CONDitions with both "AND"s & "OR"s which may need manual corrections. Here is the command line, followed by the report.


 uvcopy selectlgfd1,fild1=jcl2,arg1=//SYSIN,arg2=/*,arg3=1@COND:2@AND:1@COND:2@OR
 ================================================================================
 # Report: selects/jcl2_SYSIN_1@COND:2@AND:1@COND:2@OR%
 # ---> uvcopy selectlgfd1,fild1=jcl2,arg1=//SYSIN,arg2=/*,arg3=1@COND:2@AND:1@COND:2@OR%
 #      =========================================================================
 # format: uvcopy selectlgfd1,fild1=directory,arg1=...,arg2=...,arg3=...,arg4=...,uop=abcdgi
 # arg1 patterns identify begin-group line, arg2 patterns identify end-group line
 # arg3 patterns qualify group selection, arg4 patterns qualify lines to output/print
 #  - code '^' circumflex for ' ' spaces and '%' percent for ',' commas in patterns
 #  - may prefix patterns: '-' for absence, '+' for presence (default)
 #  - may restrict search area: arg2=@0[2]/*  <-- "/*" must be in 1st 2 bytes
 #  - multiple-condition-series: arg3=1@SORT:2@COND:3@AND:4@OR <-- ALL patterns must match
 # Date=2019/06/09_10:26:58, Site=UV_Software, Host=uvsoft5, User=uvadm, Options=
 #===============================================================================
 //SYSIN    DD *
 SORT FIELDS=(31,6,CH,A,1,6,CH,A)
 OMIT COND=((11,2,CH,EQ,C'65'),OR,(COND=(11,2,CH,EQ,C'85'))
 /*
                          EOG: #1, 4 lines selected from jcl2/jar200
                          EOF:     4 selected from 23 in jcl2/jar200
 //SYSIN    DD *
 SORT FIELDS=(1,8,CH,A,69,12,CH,A)
 INCLUDE COND=((9,1,CH,EQ,C'T'),AND,(COND=(56,2,CH,EQ,C'BC'))
 /*
                          EOG: #1, 4 lines selected from jcl2/jgl230
                          EOF:     4 selected from 34 in jcl2/jgl230
 //SYSIN    DD *
 SORT FIELDS=(1,8,CH,A,69,12,CH,A)
 INCLUDE COND=(((9,1,CH,EQ,C'T'),OR,(COND=(9,1,CH,EQ,C'X'))),
                                 AND,(COND=(56,2,CH,EQ,C'AB')))
 /*
                          EOG: #1, 5 lines selected from jcl2/jgl232
                          EOF:     5 selected from 35 in jcl2/jgl232
 EOD: 7 files, 168 lines, selected 3 groups, 13 lines to selects/jcl2_SYSIN_1@COND:2@AND:1@COND:2@OR%

Notes re tts & selectlgfd1 demo

  1. demo/jcl2/* contains 7 demo JCLs with 5 SYSINs (3 of them sorts). 'arg1=//SYSIN' defines the group starting line & arg2=/*' defines the group ending line.

  2. 'arg3=1@COND:2@AND:1@COND:2@OR' defines the select group conditions. This arg3 selects groups with lines that contain ("COND" & "AND") OR ("COND" & "OR"). The pattern rules are the same as for the 'sst' instruction (preceding).

  3. Better if we could select ONLY the groups with BOTH AND & OR, since it is only those that need correction, But 'selectlgfd1' (using 'tts' instruction) can not do this, Because its multi conditions apply to single lines & not to all lines in the group

  4. See 'selectlgfd2 (using the 'ttx' instruction), which searches for all lines in the group to satisfy multi condition series patterns (1,2,3,etc).

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

3H2. SelectJobs: selectlf1,selectlfd1,selectlgfd1, *selectlgfd2*, selectfdd1

selectlgfd2 - select JCL SYSINs with AND & OR conditions (BETTER)

'selectlgfd2' can do a BETTER job of selecting ONLY the SYSINs with BOTH ANDs & ORs (vs 'selectlgfd1 which could only select SYSINs with EITHER AND or OR)


 uvcopy selectlgfd2,fild1=jcl2,arg1=1@//SYSIN,arg2=/*,arg3=1@COND:2@AND:3@OR%
 ============================================================================
 # Report: selects/jcl2_SYSIN_1@COND:2@AND:3@OR%
 # ---> uvcopy selectlgfd2,fild1=jcl2,arg1=//SYSIN,arg2=/*,arg3=1@COND:2@AND:3@OR%
 #      =========================================================================
 # format: uvcopy selectlgfd2,fild1=directory,arg1=...,arg2=...,arg3=...,arg4=...,uop=abcdgi
 # arg1 patterns identify begin-group line, arg2 patterns identify end-group line
 # arg3 patterns qualify group selection, arg4 patterns qualify lines to output/print
 #  - code '^' circumflex for ' ' spaces and '%' percent for ',' commas in patterns
 #  - may prefix patterns: '-' for absence, '+' for presence (default)
 #  - may restrict search area: arg2=@0[2]/*  <-- "/*" must be in 1st 2 bytes
 #  - multiple-condition-series: arg3=1@SORT:2@COND:3@AND:4@OR <-- ALL patterns must match
 # Date=2019/06/09_10:29:01, Site=UV_Software, Host=uvsoft5, User=uvadm, Options=
 #===============================================================================
 //SYSIN    DD *
 SORT FIELDS=(1,8,CH,A,69,12,CH,A)
 INCLUDE COND=(((9,1,CH,EQ,C'T'),OR,(COND=(9,1,CH,EQ,C'X'))),
                                 AND,(COND=(56,2,CH,EQ,C'AB')))
 /*
                          EOG: #1, 5 lines selected from jcl2/jgl232
                          EOF:     5 selected from 35 in jcl2/jgl232
 EOD: 7 files, 168 lines, selected 1 groups, 5 lines to selects/jcl2_SYSIN_1@COND:2@AND:3@OR%

Notes re ttx vs tts & selectlgfd2 vs selectlgfd1

  1. Compare this selectlgfd2 (using the 'ttx' instruction) search result to the previous selectlgfd1 (using the 'tts' instruction).

  2. selectlgfd1/tts selection was 'arg3=1@COND:2@AND:1@COND:2@OR', which selected groups with (COND & AND) or (COND & OR). The result would include extra groups that do not need correction - ONLY groups with BOTH (AND & OR) may need correction.

  3. selectlgfd2/ttx selection is 'arg3=1@COND:2@AND:3@OR', which selects ONLY groups with BOTH ("AND" & "OR"), ie only those that may need correction.

  4. The 'tts' instruction), bases multi condition series patterns (1,2,3,etc) only on patterns found on any 1 line in the group.

  5. The 'ttx' instruction), bases multi condition series patterns (1,2,3,etc) on patterns found on any line in the group.

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

3I1. SelectJobs: selectlf1,selectlfd1,selectlgfd1,selectlgfd2, *selectfdd1*

select ENTIRE FILE to a 2nd directory - arg1=patterns on 1 line

You could use 'selectfdd1' to select the entire SQL script. 'selectfdd1' selects entire files from the input directory to an output directory.

 'selectfdd1' can be use with BOTH multi-pattern-conditional-series-selection methods
 - based on arg1=multi-patterns on any 1 line AND/OR on arg2=multi-patterns on any line
   in the entire file.

Example#1 will test the arg1 method which selects multi-patterns on ONE line. (Also see Ex#2 on the next page which selects multi-patterns on any line in the file)

selectfdd1 Example#1 - multi-patterns on 1 line (arg1)


 #1. mkdir tmp2 OR rm -f tmp2/*   <-- make an output dir OR clear existing dir
     ==========================

 #2. uvcopy "selectfdd1,fild1=sqls,fild2=tmp2,arg1=1@Customers:2@LYsales,uop=s1t1"
     =========================================****================================
      - select files from sqls/* referencing "Customers" & "LYsales"
        (appearing on ONE line in the file)

stats Report written to selects/...

 # Report: selects/sqls_tmp2_sqls_1@customers:2@lysales
 # ---> uvcopy selectfdd1,fild1=sqls,fild2=tmp2,arg1=1@customers:2@lysales,uop=s1t1
 #      ===========================================================================
 #format: uvcopy selectfdd1,fild1=indir,fild2=outdir,arg1=LinePatterns,arg2=FilePatterns
 # Date=2019/06/03_20:56:02, Site=UV_Software, Host=uvsoft5, User=uvadm, Options=s1t1
 #============----===================================================================
   EOF - 4 lines written to tmp2/select_customers_sales10000
 **EOD Input  - 36 lines  read from 11 files in directory sqls
 **EOD Output - 4 lines written to 1 files in directory tmp2

 #3. cat tmp2/*     <-- display output files
     ==========

/* select_customers_sales10000 */ SELECT custno, Name, Phone, Address, City, Zip, TYsales, LYsales, FROM Customers WHERE LYsales >10000;

Notes Re selectfdd1 selections by *arg1 or arg2

  1. Using "arg1=1@Customers:2@LYsales" we get only 1 of the 2 files that have both "Customers" & "LYsales" - because the other file has these patterns on different lines.

  2. See Ex#2 on the next page which selects multi-patterns on any line in the file. - coding search args on arg2=... finds multi-patterns on any line in the file (vs arg1=... which looks for multi-patterns on the same line).

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

3I2. SelectJobs: selectlf1,selectlfd1,selectlgfd1,selectlgfd2, *selectfdd1*

select ENTIRE FILE to a 2nd directory - arg2=patterns on ANY line

 'selectfdd1' can be use with BOTH multi-pattern-conditional-series-selection methods
 - based on arg1=multi-patterns on any 1 line AND/OR on arg2=multi-patterns on any line
   in the entire file.

Example#1 (on previous page) used 'arg1=...' which looks for multi-patterns on ONE line. This Example#2 uses 'arg2=...' which looks for multi-patterns on any line in the file.

selectfdd1 Example#2 - multi-patterns on ANY line (arg2)


 #1. mkdir tmp2 OR rm -f tmp2/*   <-- make an output dir OR clear existing dir
     ==========================

 #2. uvcopy "selectfdd1,fild1=sqls,fild2=tmp2,arg2=Customers:LYsales"
     =========================================****===================
      - select files from sqls/* referencing "Customers" & "LYsales"
        (appearing on ANY line in the file)

stats Report written to selects/...

 # Report: selects/sqls_tmp2_sqls_1@select:2@customers:3@lysales
 # ---> uvcopy selectfdd1,fild1=sqls,fild2=tmp2,arg2=1@select:2@customers:3@lysales,uop=s1t1
 #      ====================================================================================
 #format: uvcopy selectfdd1,fild1=indir,fild2=outdir,arg1=LinePatterns,arg2=FilePatterns
 # Date=2019/06/03_20:34:37, Site=UV_Software, Host=uvsoft5, User=uvadm, Options=s1t1
 #===================================================================================
   EOF - 4 lines written to tmp2/select_customers_sales10000
   EOF - 5 lines written to tmp2/select_customers_sales20000
 **EOD Input  - 36 lines  read from 11 files in directory sqls
 **EOD Output - 9 lines written to 2 files in directory tmp2

 #3. cat tmp2/*     <-- display output files
     ==========

/* select_customers_sales10000 */ SELECT custno, Name, Phone, Address, City, Zip, TYsales, LYsales, FROM Customers WHERE LYsales >10000;

/* select_customers_sales20000 */ SELECT custno, Name, Phone, Address, City, Zip, TYsales, LYsales, FROM Customers WHERE LYsales >20000;

Notes selections by arg1 or *arg2 & options 's1t1'

  1. Example#2 using arg2=..., gets both the files that have "Customers" & "LYsales" vs prior Example#1 which got only 1 file with "Customers" & "LYsales" on same line.

  2. To use option s1 with selectlgfd2, you need to also specify option 't1' which translates the data file to lower case when loaded into memory.

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

3J1. Vancouver Utility Programming Aids - Selectjobs

Select Demos using dat1/UScongress

$UV/dat1/UScongress is a data file of US Governament Representatives & Senators that we will use for demos & that you can use for self training using SelectJobs.

We downloaded a spreadsheet, extracted a csv file (dat1/UScongress.csv) & converted to a fixed layout so we could define specific fields required for some selections. See '10E1' if you are interested to see the uvcopy job (demo/pf/UScongresscsv2txt).

Here are the samples of the 539 records with a column scale in case you wish to test select job searches with restricted areas.

samples US Reps & Senators .csv converted to fixed field

 Abraham,Ralph,,,,Ralph Lee Abraham,1954-09-16,M,rep,LA,5,,Republican,
 Adams,Alma,,,,Alma S. Adams,1946-05-27,F,rep,NC,12,,Democrat,
 Aderholt,Robert,B.,,,Robert B. Aderholt,1965-07-22,M,rep,AL,4,,Republican,
          1         2         3         4         5         6         7         8
 12345678901234567890123456789012345678901234567890123456789012345678901234567890
 001  Abraham             Ralph          19540916  M  LA  rep  Republican
 002  Adams               Alma           19460527  F  NC  rep  Democrat
 003  Aderholt            Robert         19650722  M  AL  rep  Republican
              ---------- omitting 533 lines ----------
 537  Young               Don            19330609  M  AK  rep  Republican
 538  Young               Todd           19720824  M  IN  sen  Republican
 539  Zeldin              Lee            19800130  M  NY  rep  Republican

sample selection from UScongress testfile


 uvcopy selectlf1,fili1=dat1/UScongress,arg1=1@57[3]sen:2@53[2]OH
 ================================================================
  - select "senators" from OHio
  - report created in selects/... named by concatenating file + patterns
 # Report: selects/dat1_UScongress_1@57[3]sen:2@53[2]OH
 # ---> uvcopy selectlf1,fili1=dat1/UScongress,arg1=1@57[3]sen:2@53[2]OH
 #      =========================================================================
 #format: uvcopy selectlf1,fili1=inputfile,arg1=pattern1:pattern2,etc,uop=i0/i1
 # arg1 - line selection conditions (up to 9 patterns to match or not-match)
 # - code '^' circumflex for ' ' spaces and '%' percent for ',' commas in patterns
 # - may prefix patterns with '-' for absence, '+' for presence (default)
 # - may restrict search area, example: arg1=@0[20]Townsend:@20[60]Owen
 # - multiple conditions: arg1=+1@Townsend:+2@Canada,-1@Owen,-2@BC
 # - if no seq#s (+1,+2,etc) default selects if any +pattern & no -pattern
 # - combination ex: arg1=+1@0[20]Townsend:+2@60[60]Canada:-@0[20]Owen
 # Date=2019/07/07_10:29:30, Site=UV_Software, Host=uvsoft5, User=uvadm, Options=
 #===============================================================================
 050  Brown               Sherrod        19521109  M  OH  sen  Democrat
 384  Portman             Robert         19551219  M  OH  sen  Republican
 # EOF - 2 lines selected from dat1/UScongress

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

3J2. Select Demos using selectlf1 & UScongress file

suggested patterns for searching dat1/UScongress

Here are some suggested search patterns you might run on the UScongress testfile for tutorials & self training on Select Jobs.

Here are 1st 3 of the 539 records with a column scale in case you wish to test select job searches with restricted areas. Note scale is 1 relative, but you must code the zero relative values for restricted area searches.

 #        1         2         3         4         5         6         7         8
 #2345678901234567890123456789012345678901234567890123456789012345678901234567890
 001  Abraham             Ralph          19540916  M  LA  rep  Republican
 002  Adams               Alma           19460527  F  NC  rep  Democrat
 003  Aderholt            Robert         19650722  M  AL  rep  Republican

search UScongress file for Female Democrats from teXas


 uvcopy selectlf1,fili1=dat1/UScongress,arg1=1@50[2]F:2@62[15]Democrat:3@53[2]TX
 ===============================================================================
 - select Female Democrats from TeXas
 # Report: selects/dat1_UScongress_1@50[2]F:2@62[15]Democrat:3@53[2]TX
 # ---> uvcopy selectlf1,fili1=dat1/UScongress,arg1=1@50[2]F:2@62[15]Democrat:3@53[2]TX
 #      =========================================================================
 # --- omitting 9 lines of HELP info & Date,Site,Host,User (same as prior page) ---
 #===============================================================================
 149  Escobar             Veronica       19690915  F  TX  rep  Democrat
 160  Fletcher            Lizzie         19750213  F  TX  rep  Democrat
 174  Garcia              Sylvia         19500906  F  TX  rep  Democrat
 237  Jackson Lee         Sheila         19500112  F  TX  rep  Democrat
 242  Johnson             Eddie          19351203  F  TX  rep  Democrat
 # EOF - 5 lines selected from dat1/UScongress

search UScongress file for Male Replublicans from CAlifornia


 uvcopy selectlf1,fili1=dat1/UScongress,arg1=1@50[2]M:2@62[15]Republican:3@53[2]CA
 =================================================================================
 - select Male Republicans from CAlifornia
 # Report: selects/dat1_UScongress_1@50[2]M:2@62[15]Republican:3@53[2]CA
 # ---> uvcopy selectlf1,fili1=dat1/UScongress,arg1=1@50[2]M:2@62[15]Republican:3@53[2]CA
 #      =========================================================================
 # --- omitting 9 lines of HELP info & Date,Site,Host,User (same as prior page) ---
 #===============================================================================
 061  Calvert             Ken            19530608  M  CA  rep  Republican
 098  Cook                Paul           19430303  M  CA  rep  Republican
 232  Hunter              Duncan         19761207  M  CA  rep  Republican
 275  LaMalfa             Doug           19600702  M  CA  rep  Republican
 318  McCarthy            Kevin          19650126  M  CA  rep  Republican
 320  McClintock          Tom            19560710  M  CA  rep  Republican
 358  Nunes               Devin          19731001  M  CA  rep  Republican
 # EOF - 7 lines selected from dat1/UScongress

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

3J3. Select Demos using selectlf1 & UScongress file

more examples searching dat1/UScongress

Here are 1st 3 of the 539 records with a column scale so you can verify the field locations specified in the examples below. Note scale is 1 relative, but you must code the zero relative values for restricted area searches.

 #        1         2         3         4         5         6         7         8
 #2345678901234567890123456789012345678901234567890123456789012345678901234567890
 001  Abraham             Ralph          19540916  M  LA  rep  Republican
 002  Adams               Alma           19460527  F  NC  rep  Democrat
 003  Aderholt            Robert         19650722  M  AL  rep  Republican

search UScongress file for Female Democrats born after 1985


 uvcopy "selectlf1,fili1=dat1/UScongress,arg1=1@50[1]F:2@40[4]>1985"
 ===================================================================
 - select Female Democrats born after 1985
 # Report: selects/dat1_UScongress_1@50[1]F:2@40[4]_1985
 # ---> uvcopy selectlf1,fili1=dat1/UScongress,arg1=1@50[1]F:2@40[4]>1985
 #      =========================================================================
 # --- omitting 9 lines of HELP info & Date,Site,Host,User (same as prior page) ---
 #===============================================================================
 156  Finkenauer          Abby           19881227  F  IA  rep  Democrat
 219  Hill                Katie          19870825  F  CA  rep  Democrat
 359  Ocasio-Cortez       Alexandria     19891013  F  NY  rep  Democrat
 497  Underwood           Lauren         19861004  F  IL  rep  Democrat
 # EOF - 4 lines selected from dat1/UScongress

search UScongress file for Male Republicans born after 1985


 uvcopy "selectlf1,fili1=dat1/UScongress,arg1=1@50[1]M:2@40[4]>1985"
 ===================================================================
 - select Male Republicans born after 1985
 # Report: selects/dat1_UScongress_1@50[1]M:2@40[4]_1985
 # ---> uvcopy selectlf1,fili1=dat1/UScongress,arg1=1@50[1]M:2@40[4]>1985
 #      =========================================================================
 # --- omitting 9 lines of HELP info & Date,Site,Host,User (same as prior page) ---
 #===============================================================================
 203  Harder              Josh           19860801  M  CA  rep  Democrat
 407  Rose                Max            19861128  M  NY  rep  Democrat
 # EOF - 2 lines selected from dat1/UScongress

Notes

  1. You must enclose command in quotes when '<' or '>' used

  2. Output files (named from filename & arg1 concatenated) will have any '>' & '<' replaced by '_' underscores since >/< are invalid in filenames.

    Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

    Permuted Index of Keywords from ** Headings **

    A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z 

    3B2 $home: copy $UV/demo to your $HOME/demo/...
    3B2 $uv: copy $UV/demo to your $HOME/demo/...

    3E3 >: searching with > & < conditions
    3E3 <: searching with > & < conditions

    3I1 *arg: Notes Re selectfdd1 selections by *arg1 or arg2
    3I2 *arg2: Notes selections by arg1 or *arg2 & options 's1t1'
    3G1 *selectlfgfd1: Notes Re *selectlfgfd1 (& selectlgfd2) vs prior selectlf1/selectl
    3G2 *selectlfgfd2: Notes Re *selectlfgfd2 (& selectlgfd1) vs prior selectlf1/selectl

    3C2 +2@canada: selects/dat1_nameadrs1_+1@Townsend+2@Canada-3@Owen

    3B2 ...: copy $UV/demo to your $HOME/demo/...
    3D4 ...: reports written to selects/... subdir
    3F1 ...: 4 SQL "customer" scripts in sqls/...
    3I1 ...: stats Report written to selects/...
    3I2 ...: stats Report written to selects/...
    3E1 .csv: samples of Canadian MPs .csv converted to fixed fields
    3J1 .csv: samples US Reps & Senators .csv converted to fixed field

    3D3 Adm: executing sf/adm/select_nameadrs1
    3A2 Advantages: SelectJob Advantages
    3H1 And: selectlgfd1 - select JCL SYSINs with AND & OR conditions
    3H2 And: selectlgfd2 - select JCL SYSINs with AND & OR conditions (BETTER)
    3I2 Arg: Notes selections by arg1 or *arg2 & options 's1t1'
    3D4 Arg1: Special Characters in arg1 patterns
    3I1 Arg1: selectfdd1 Example#1 - multi-patterns on 1 line (arg1)
    3I1 Arg1=pattern: select ENTIRE FILE to a 2nd directory - arg1=patterns on 1 line
    3I1 Arg2: Notes Re selectfdd1 selections by *arg1 or arg2
    3I2 Arg2: selectfdd1 Example#2 - multi-patterns on ANY line (arg2)
    3I2 Arg2=pattern: select ENTIRE FILE to a 2nd directory - arg2=patterns on ANY line

    3H2 Better: selectlgfd2 - select JCL SYSINs with AND & OR conditions (BETTER)
    3J3 Born: search UScongress file for Female Democrats born after 1985
    3J3 Born: search UScongress file for Male Republicans born after 1985

    3J2 California: search UScongress file for Male Replublicans from CAlifornia
    3E1 Canadamps: dat1/CanadaMPs - larger test file to demo Select Jobs
    3E2 Canadamps: search CanadaMPs MP file for Liberals in Vancouver
    3E2 Canadamps: suggested patterns for searching dat1/CanadaMPs
    3E1 Canadian: sample selection from CAnadian Members of Parliament
    3E1 Canadian: samples of Canadian MPs .csv converted to fixed fields
    3A2 Capabilitie: Example to Illustrate SelectJob Capabilities vs grep
    3D4 Characters: Special Characters in arg1 patterns
    3B3 Check-list: Setup check-list - Ready to run test/demos ?
    3E3 Commands: Try some other commands such as
    3D1 Compare: dat1/nameadrs1 - compare demo outputs to these 8 records
    3E3 Conditions: searching with > & < conditions
    3H1 Conditions: selectlgfd1 - select JCL SYSINs with AND & OR conditions
    3H2 Conditions: selectlgfd2 - select JCL SYSINs with AND & OR conditions (BETTER)
    3E1 Converte: samples of Canadian MPs .csv converted to fixed fields
    3J1 Converte: samples US Reps & Senators .csv converted to fixed field
    3B2 Copied: SelectJobs demo files copied to your homedir
    3B2 Copy: $UV/demo to your $HOME/demo/...
    3F1 Customer: 4 SQL "customer" scripts in sqls/...
    3F1 Customer: select "customer" references from all scripts in directory

    Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

    A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z 

    3C1 Dat1: dat1/nameadrs1 - testdata file for 1st demo
    3D1 Dat1: dat1/nameadrs1 - compare demo outputs to these 8 records
    3E1 Dat1: dat1/CanadaMPs - larger test file to demo Select Jobs
    3E2 Dat1: suggested patterns for searching dat1/CanadaMPs
    3J1 Dat1: Select Demos using dat1/UScongress
    3J2 Dat1: suggested patterns for searching dat1/UScongress
    3J3 Dat1: more examples searching dat1/UScongress
    3C2 Dat1_nameadrs1_+1@toselects/dat1_nameadrs1_+1@Townsend+2@Canada-3@Owen
    3D4 Data: Try selectlf1 with YOUR DATA files & PATTERNS
    3B2 Demo: SelectJobs demo files copied to your homedir
    3B2 Demo: copy $UV/demo to your $HOME/demo/...
    3B2 Demo: copy $UV/demo to your $HOME/demo/...
    3C1 Demo: dat1/nameadrs1 - testdata file for 1st demo
    3D1 Demo: dat1/nameadrs1 - compare demo outputs to these 8 records
    3E1 Demo: dat1/CanadaMPs - larger test file to demo Select Jobs
    3H1 Demo: Notes re tts & selectlgfd1 demo
    3J2 Democrats: search UScongress file for Female Democrats from teXas
    3J3 Democrats: search UScongress file for Female Democrats born after 1985
    3B3 Demos: Setup check-list - Ready to run test/demos ?
    3D1 Demos: Test/Demos to illustrate Pattern Rules
    3D3 Demos: script to run 10 selectlf1 test/demos
    3J1 Demos: Select Demos using dat1/UScongress
    3F1 Directory: select "customer" references from all scripts in directory
    3F1 Directory: selectlfd1 - SELECT from all files in a directory
    3I1 Directory: select ENTIRE FILE to a 2nd directory - arg1=patterns on 1 line
    3I2 Directory: select ENTIRE FILE to a 2nd directory - arg2=patterns on ANY line

    3I1 Entire: select ENTIRE FILE to a 2nd directory - arg1=patterns on 1 line
    3I2 Entire: select ENTIRE FILE to a 2nd directory - arg2=patterns on ANY line
    3A2 Example: Example to Illustrate SelectJob Capabilities vs grep
    3C1 Example: selectlf1 - 1st Example for Pattern Rules following
    3I1 Example: selectfdd1 Example#1 - multi-patterns on 1 line (arg1)
    3I2 Example: selectfdd1 Example#2 - multi-patterns on ANY line (arg2)
    3J3 Examples: more examples searching dat1/UScongress
    3D3 Executing: sf/adm/select_nameadrs1
    3E2 Expected: Other searches showing only number of matches expected

    3J2 Female: search UScongress file for Female Democrats from teXas
    3J3 Female: search UScongress file for Female Democrats born after 1985
    3J1 Field: samples US Reps & Senators .csv converted to fixed field
    3E1 Fields: samples of Canadian MPs .csv converted to fixed fields
    3E1 Fixed: samples of Canadian MPs .csv converted to fixed fields
    3J1 Fixed: samples US Reps & Senators .csv converted to fixed field
    3C1 Following: selectlf1 - 1st Example for Pattern Rules following
    3C2 Format: Report Format for SelectJobs

    3A2 Grep: Example to Illustrate SelectJob Capabilities vs grep

    3B2 Homedir: SelectJobs demo files copied to your homedir

    3A2 Illustrate: Example to Illustrate SelectJob Capabilities vs grep
    3D1 Illustrate: Test/Demos to illustrate Pattern Rules
    3A1 Introduction: SelectJobs - Introduction & Overview

    3E1 Larger: dat1/CanadaMPs - larger test file to demo Select Jobs
    3E2 Liberal: search CanadaMPs MP file for Liberals in Vancouver
    3G1 Line: selectlgfd1 - Multi-Condition-Series on any ONE line
    3G2 Line: selectlgfd2 - Multi-Condition-Series on MULTI lines (vs 1 line)
    3I1 Line: select ENTIRE FILE to a 2nd directory - arg1=patterns on 1 line
    3I1 Line: selectfdd1 Example#1 - multi-patterns on 1 line (arg1)
    3I2 Line: select ENTIRE FILE to a 2nd directory - arg2=patterns on ANY line
    3I2 Line: selectfdd1 Example#2 - multi-patterns on ANY line (arg2)
    3B2 Locations: uvcopy job Locations

    Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

    A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z 

    3J2 Male: search UScongress file for Male Replublicans from CAlifornia
    3J3 Male: search UScongress file for Male Republicans born after 1985
    3E2 Matches: Other searches showing only number of matches expected
    3E1 Members: sample selection from CAnadian Members of Parliament
    3E1 Mps: samples of Canadian MPs .csv converted to fixed fields
    3G2 Multi: selectlgfd2 - Multi-Condition-Series on MULTI lines (vs 1 line)
    3G1 Multi-condition-seriselectlgfd1 - Multi-Condition-Series on any ONE line
    3G2 Multi-condition-seriselectlgfd2 - Multi-Condition-Series on MULTI lines (vs 1 line)
    3I1 Multi-patterns: selectfdd1 Example#1 - multi-patterns on 1 line (arg1)
    3I2 Multi-patterns: selectfdd1 Example#2 - multi-patterns on ANY line (arg2)

    3C1 Nameadrs1: dat1/nameadrs1 - testdata file for 1st demo
    3D1 Nameadrs1: dat1/nameadrs1 - compare demo outputs to these 8 records
    3E2 Number: Other searches showing only number of matches expected

    3G1 One: selectlgfd1 - Multi-Condition-Series on any ONE line
    3I2 Options: Notes selections by arg1 or *arg2 & options 's1t1'
    3D1 Outputs: dat1/nameadrs1 - compare demo outputs to these 8 records
    3A1 Overview: SelectJobs - Introduction & Overview

    3E1 Parliament: sample selection from CAnadian Members of Parliament
    3C1 Pattern: selectlf1 - 1st Example for Pattern Rules following
    3D1 Pattern: Test/Demos to illustrate Pattern Rules
    3D4 Patterns: Special Characters in arg1 patterns
    3D4 Patterns: Try selectlf1 with YOUR DATA files & PATTERNS
    3D4 Patterns: Try selectlf1 with YOUR PATTERNS
    3E2 Patterns: suggested patterns for searching dat1/CanadaMPs
    3J2 Patterns: suggested patterns for searching dat1/UScongress
    3G1 Prior: Notes Re *selectlfgfd1 (& selectlgfd2) vs prior selectlf1/selectl
    3G2 Prior: Notes Re *selectlfgfd2 (& selectlgfd1) vs prior selectlf1/selectl
    3F1 Problem: PROBLEM Notes

    3D1 Records: dat1/nameadrs1 - compare demo outputs to these 8 records
    3F1 References: select "customer" references from all scripts in directory
    3B1 Relevant: Vancouver Utilities - subdirs relevant to SelectJobs
    3J2 Replublicans: search UScongress file for Male Replublicans from CAlifornia
    3J1 Reps: samples US Reps & Senators .csv converted to fixed field
    3J3 Republicans: search UScongress file for Male Republicans born after 1985
    3C1 Rules: selectlf1 - 1st Example for Pattern Rules following
    3D1 Rules: Test/Demos to illustrate Pattern Rules
    3B3 Run: Setup check-list - Ready to run test/demos ?
    3D3 Run: script to run 10 selectlf1 test/demos

    3I2 S1t1: Notes selections by arg1 or *arg2 & options 's1t1'
    3E1 Sample: selection from CAnadian Members of Parliament
    3J1 Sample: selection from UScongress testfile
    3E1 Samples: of Canadian MPs .csv converted to fixed fields
    3J1 Samples: US Reps & Senators .csv converted to fixed field
    3E2 Search: CanadaMPs MP file for Liberals in Vancouver
    3J2 Search: UScongress file for Female Democrats from teXas
    3J2 Search: UScongress file for Male Replublicans from CAlifornia
    3J3 Search: UScongress file for Female Democrats born after 1985
    3J3 Search: UScongress file for Male Republicans born after 1985
    3E2 Searches: Other searches showing only number of matches expected
    3E2 Searching: suggested patterns for searching dat1/CanadaMPs
    3E3 Searching: with > & < conditions
    3J2 Searching: suggested patterns for searching dat1/UScongress
    3J3 Searching: more examples searching dat1/UScongress
    3E1 Select: dat1/CanadaMPs - larger test file to demo Select Jobs
    3F1 Select: "customer" references from all scripts in directory
    3F1 Select: selectlfd1 - SELECT from all files in a directory
    3H1 Select: selectlgfd1 - select JCL SYSINs with AND & OR conditions
    3H2 Select: selectlgfd2 - select JCL SYSINs with AND & OR conditions (BETTER)
    3I1 Select: ENTIRE FILE to a 2nd directory - arg1=patterns on 1 line
    3I2 Select: ENTIRE FILE to a 2nd directory - arg2=patterns on ANY line
    3J1 Select: Select Demos using dat1/UScongress
    3D3 Select_nameadrs1: executing sf/adm/select_nameadrs1
    3I1 Selectfdd1: Notes Re selectfdd1 selections by *arg1 or arg2
    3I1 Selectfdd1: Example#1 - multi-patterns on 1 line (arg1)
    3I2 Selectfdd1: Example#2 - multi-patterns on ANY line (arg2)
    3E1 Selection: sample selection from CAnadian Members of Parliament
    3I1 Selection: Notes Re selectfdd1 selections by *arg1 or arg2
    3J1 Selection: sample selection from UScongress testfile
    3I2 Selections: Notes selections by arg1 or *arg2 & options 's1t1'
    3A2 Selectjob: Example to Illustrate SelectJob Capabilities vs grep
    3A2 Selectjob: SelectJob Advantages
    3A1 Selectjobs: SelectJobs - Introduction & Overview
    3B1 Selectjobs: Vancouver Utilities - subdirs relevant to SelectJobs
    3B2 Selectjobs: SelectJobs demo files copied to your homedir
    3C2 Selectjobs: Report Format for SelectJobs
    3G1 Selectl: Notes Re *selectlfgfd1 (& selectlgfd2) vs prior selectlf1/selectl
    3G2 Selectl: Notes Re *selectlfgfd2 (& selectlgfd1) vs prior selectlf1/selectl
    3C1 Selectlf1: - 1st Example for Pattern Rules following
    3C2 Selectlf1: Output Report from selectlf1
    3D3 Selectlf1: script to run 10 selectlf1 test/demos
    3D4 Selectlf1: Try selectlf1 with YOUR DATA files & PATTERNS
    3D4 Selectlf1: Try selectlf1 with YOUR PATTERNS
    3G1 Selectlf1: Notes Re *selectlfgfd1 (& selectlgfd2) vs prior selectlf1/selectl
    3G2 Selectlf1: Notes Re *selectlfgfd2 (& selectlgfd1) vs prior selectlf1/selectl
    3F1 Selectlfd1: - SELECT from all files in a directory
    3H2 Selectlgfd: Notes re ttx vs tts & selectlgfd2 vs selectlgfd1
    3G1 Selectlgfd1: - Multi-Condition-Series on any ONE line
    3G2 Selectlgfd1: Notes Re *selectlfgfd2 (& selectlgfd1) vs prior selectlf1/selectl
    3H1 Selectlgfd1: Notes re tts & selectlgfd1 demo
    3H1 Selectlgfd1: - select JCL SYSINs with AND & OR conditions
    3H2 Selectlgfd1: Notes re ttx vs tts & selectlgfd2 vs selectlgfd1
    3G1 Selectlgfd2: Notes Re *selectlfgfd1 (& selectlgfd2) vs prior selectlf1/selectl
    3G2 Selectlgfd2: - Multi-Condition-Series on MULTI lines (vs 1 line)
    3H2 Selectlgfd2: - select JCL SYSINs with AND & OR conditions (BETTER)
    3C2 Selects: selects/dat1_nameadrs1_+1@Townsend+2@Canada-3@Owen
    3D4 Selects: reports written to selects/... subdir
    3I1 Selects: stats Report written to selects/...
    3I2 Selects: stats Report written to selects/...
    3J1 Senators: samples US Reps & Senators .csv converted to fixed field
    3B3 Setup: Setup check-list - Ready to run test/demos ?
    3E2 Showing: Other searches showing only number of matches expected
    3E3 Some: Try some other commands such as
    3D4 Special: Special Characters in arg1 patterns
    3F1 Sql: 4 SQL "customer" scripts in sqls/...
    3F1 Sqls: 4 SQL "customer" scripts in sqls/...
    3I1 Stats: Report written to selects/...
    3I2 Stats: Report written to selects/...
    3D4 Subdir: reports written to selects/... subdir
    3B1 Subdirs: Vancouver Utilities - subdirs relevant to SelectJobs
    3E3 Such: Try some other commands such as
    3E2 Suggested: patterns for searching dat1/CanadaMPs
    3J2 Suggested: patterns for searching dat1/UScongress
    3H1 Sysins: selectlgfd1 - select JCL SYSINs with AND & OR conditions
    3H2 Sysins: selectlgfd2 - select JCL SYSINs with AND & OR conditions (BETTER)

    Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

    A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z 

    3B3 Test: Setup check-list - Ready to run test/demos ?
    3D1 Test: Test/Demos to illustrate Pattern Rules
    3D3 Test: script to run 10 selectlf1 test/demos
    3E1 Test: dat1/CanadaMPs - larger test file to demo Select Jobs
    3B3 Testdata: file contents
    3C1 Testdata: dat1/nameadrs1 - testdata file for 1st demo
    3J1 Testfile: sample selection from UScongress testfile
    3J2 Texas: search UScongress file for Female Democrats from teXas
    3D4 Try: Try selectlf1 with YOUR DATA files & PATTERNS
    3D4 Try: Try selectlf1 with YOUR PATTERNS
    3E3 Try: Try some other commands such as
    3H2 Tt: Notes re ttx vs tts & selectlgfd2 vs selectlgfd1
    3H1 Tts: Notes re tts & selectlgfd1 demo
    3H2 Tts: Notes re ttx vs tts & selectlgfd2 vs selectlgfd1

    3J1 Uscongress: Select Demos using dat1/UScongress
    3J1 Uscongress: sample selection from UScongress testfile
    3J2 Uscongress: search UScongress file for Female Democrats from teXas
    3J2 Uscongress: search UScongress file for Male Replublicans from CAlifornia
    3J2 Uscongress: suggested patterns for searching dat1/UScongress
    3J3 Uscongress: more examples searching dat1/UScongress
    3J3 Uscongress: search UScongress file for Female Democrats born after 1985
    3J3 Uscongress: search UScongress file for Male Republicans born after 1985
    3B1 Utilities: Vancouver Utilities - subdirs relevant to SelectJobs
    3B2 Uvcopy: job Locations

    3B1 Vancouver: Vancouver Utilities - subdirs relevant to SelectJobs
    3E2 Vancouver: search CanadaMPs MP file for Liberals in Vancouver
    3G1 Vs: Notes Re *selectlfgfd1 (& selectlgfd2) vs prior selectlf1/selectl
    3G2 Vs: Notes Re *selectlfgfd2 (& selectlgfd1) vs prior selectlf1/selectl
    3G2 Vs: selectlgfd2 - Multi-Condition-Series on MULTI lines (vs 1 line)

    3D4 Written: reports written to selects/... subdir
    3I1 Written: stats Report written to selects/...
    3I2 Written: stats Report written to selects/...

    A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z 

    Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

    Visitor Counters for ThisYear and LastYear