** c:\djh\cc\slc\README.WNT *** L=007 --- 2009/06/14 11:53:45 (L07) SELCOPY/WNT - Install Guide for Microsoft Windows. Copyright: Compute(Bridgend)Ltd UK Tel: +44 (1656) 652222 Fax: +44 (1656) 652227 Eml: support@cbl.com Web: http://www.cbl.com/ * Contents * ** Overview. Files on Distribution Master (DMS_WNT.ZIP) SELCOPY/WNT Install procedure. SELCOPY/WNT Test Drive 1. Ctl stmts at the console when selcopy asks for them. 2. Ctl stmts from the command line. 3. Ctl stmts from a file. 4. Ctl stmts from an existing file, but pass some args. 5. Ctl stmts as used for SELCOPY on the IBM M/f. * Overview * ** Essentially, SELCOPY for the AS/400, the PC, Windows NT and the various flavours of unix, are the same program, written in C++ to emulate the IBM mainframe version of SELCOPY, simply recompiled on each platform. All documentation for SELCOPY applies equally to all platforms unless stated otherwise. * Files on the SELCOPY/WNT Distribution Master * (DMS_WNT.ZIP) *** For example, you may have downloaded the file "slc208_906_wnt.zip" from the downloads page of our website at: http://www.cbl.com/selcdl.html It will contain the following, where %S% indicates the selcopy release number, and %B% indicates the build level for that release: readme.wnt General info on SELCOPY/WNT for Microsoft Windows. (This file.) s%S%_%B%.exe The SELCOPY main executable. e.g. s208_906 You will create a copy of this file later called selcopy. snf%S%.txt Selcopy New Features for the %S% Release. i.e. Release Notes showing changes and corrections implemented. Please read this file and at least check any "Important Changes". slccall.c Sample C source code which you can modify to add your own CALL rtns, which can then be compiled and linked, to create the "libselc.dll" shared dynamic link library. The shared library, libselc.dll, does not need to exist unless the CALL stmt is used. See "slccall.c" for info on how to add your own CALL routines, using the libselc.dll dynamic link library. slccall.h C Header file for the slccall.c source. selcopy.nmx Original skeleton for "selcopy.nam" file. Copy this to create the "selcopy.nam" file which you then tailor for your installation. The "selcopy.nam" file is essential for execution of selcopy. It contains the software keys to enable the product. selcopy.msg Editable text file of SELCOPY Error messages used at run time. It is release independent. The "selcopy.msg" file is not essential, but if not found on the path, error messages are reported only by number, without any text. slc%S%_%B%ca.dll (Dynamic Link Library.) The DLL supplied is just a primitive sample which is loaded dynamically at execution time, but only if a CALL stmt is used. The DLL is optional. It need not be present on your system unless you use the CALL statement in your control cards. slc%S%_%B%_odb.dll (Dynamic Link Library.) e.g. "s208_917_odb.dll" The DLL supplied is the ODBC interface which is loaded dynamically at execution time, but only if database I/O is used. The DLL is optional. It need not be present on your system unless you process a database (e.g. DB2 or Oracle) using the ODBC interface. * SELCOPY/WNT Install * *** ################# Minimum Op Sys reqd: Any 32-bit MS Windows System. ################# Please move or copy the unzipped files to a directory on your system such as "C:\slc\208", where the 208 represents the selcopy release number. All files in this directory can then be made read-only as a precaution. < set SLC=C:\slc < set S=208 < set B=906 ; This is the Build Level < attrib +r %SLC%\%S%\* Then copy the 4 files needed for operational use of selcopy to the C:\slc directory. < cd %SLC% < copy %S%\selcopy.nmx selcopy.nam < copy %S%\slc%S%_%B%.exe selcopy.exe < copy %S%\slc%S%_%B%ca.dll libselc.dll < copy %S%\slc%S%_%B%_odb.dll selcodb.dll < copy %S%\selcopy.msg selcopy.msg All selcopy's operational files now exist in the %SLC% directory, but 1 file still requires modification. The local configuration file, "selcopy.nam", is a release independent file for use by selcopy at your site. Please edit "selcopy.nam" to set your "SITE" info and preferred options. You will need a date range and a 16 digit hex password as supplied by CBL. If you do not already have this, please contact CBL: Voice: +44 (1656) 652222 Fax: +44 (1656) 652227 Email: support@cbl.com Ideally, your system configuration should now be updated to add the %SLC% dir to the PATH environment variable. Alternatively, copy the 4 operational files to a directory that is already on your path. < copy %SLC%\* ~\your\existing\dir\which\is\already\on\path Having saved your changes, try verifying the Release and Build Level. < selcopy -v -------- Your install is now finished. -------- You are ready to run. Thank you. * SELCOPY/WNT Test Drive 1 * *** Supply all ctl stmts at the console when selcopy asks for them. Just invoke selcopy with no arguments and no input redirection. < selcopy The selcopy program will respond with the following: SELCOPY/WNT n.nn at Your Installation Name - Locn yyyy/mm/dd hh:mm Enter Selcopy Ctl Cards... (Use /* to end.) You should then enter your selcopy control cards at the keyboard, using the enter key to terminate each line. Multiple selcopy statements may be entered using selcopy's default separator char, "!". Special chars such as ">", "<" and "|" will not be interpreted by the shell because the data is read directly by selcopy. To read this file, "readme.wnt", from the current dir, and display on the terminal all the commands used for this install, and at the same time write them to the file "z.z", your response lines would be: read readme.wnt * You have to key this in and hit enter. if p 1 = '>' * and this. t log s=22 * and this. (Log each rec (stopaft=22) to screen.) t wr z.z * and this. (Write all recs to the file "z.z".) end * The "end" statement to terminate control stmts. * Could use /* or ^D to do the same thing as "end". To read the executable binary file, "C:\nt4\system32\xcopy.exe" and display the 1st 5 recs in TYPE=B (both char and hex) on the terminal and 55 recs on selcopy's print file, treating the input data as fixed length 64 byte recs, your response lines would be: rd c:\nt4\system32\xcopy.exe l=64 pr ty=b s=55 * Print output goes to .\SELC.LST by default. log ty=b s=5 ! e * "e" is abbrev for "end". (Same as "/*" in pos 1.) * SELCOPY/WNT Test Drive 2 * *** Supply all ctl stmts on the command line when invoking selcopy. The first "!" in the arg string tells selcopy that ctl stmts follow, where stmts are separated by further "!" chars. The following command duplicates the example in Test Drive 1, but without the comments: < selcopy !rd readme.wnt !if p 1 = ">" !t log s=22 !t wr z.z !e Because '>' gets interpreted by the shell as a redirection symbol, it is necessary to use ">" instead. Alternatively, hex notation could have been used: < selcopy !rd readme.wnt !if p 1 = x'3e' !t log s=22 !t wr z.z !e * SELCOPY/WNT Test Drive 3 * *** Supply all ctl stmts from a file. Say we created a new file, "%TMP%\x", containing the following: * Sample selcopy control cards for Test Drive 3. read .\selcopy.msg lrecl=40 * Fixed Length, 40. (RECFM=F) log type=m stopaft=4 * To check LF or CRLF. if p any = 'RECOG' then p @ = 'recog' * Selective changes. then print ty=m s=7 wr %TMP%/selcopy.msg.frigged eol=no * Note that selcopy accepts "/" for "\". We can then run selcopy, redirecting its control card input from that file, using one of the following 2 commands: < selcopy -ctl %TMP%\x < selcopy < %TMP%\x Alternatively, we could set up a file called "test3.cmd", which creates the temp file on the fly and uses it to run selcopy: @rem "test3.cmd" - Selcopy control stmts for Test Drive 3. @echo off set T=%TMP%\x echo >%T% * Sample selcopy control cards for Test Drive 3. >>%T% read .\selcopy.msg lrecl=40 * RECFM=F - Fixed Length, 40. >>%T% log type=m stopaft=4 * To check LF or CRLF. >>%T% if p any = 'RECOG' >>%T% then p @ = 'recog' * Selective changes. >>%T% then print ty=m s=7 >>%T% wr %TMP%/selcopy.msg.frigged eol=no * Selcopy accepts "/" for "\". selcopy -ctl=%T% To run this, we then simply issue the command "test3". < test3 Selcopy's listing file will be SELC.LST on the current directory, unless the environment variable SLCLST was set, which takes precedence. Use of the command line option -lst=fileid would however take precedence over both SLCLST and SELC.LST defaults. The output file will of course be on the %TMP%\selcopy.msg.frigged file. No end-of-line characters have been written at the end of each 40-byte input record, but the output file will still be readable because the 40-byte records written would still have the EOL chars that were read off the input file as data. < type SELC.LST < type %TMP%\selcopy.msg.frigged * SELCOPY/WNT Test Drive 4 * *** Supply all ctl stmts from an existing file, but also pass some args. Consider an existing file, "localEOL", which is an ascii text file on the ctl directory of your current directory, consisting of the following 3 lines only: * This is a comment line in the selcopy ctl card file, "localEOL". read %1 * Read the 1st file, arg 1 off the command line. write %2 * Write the 2nd file, arg 2. Suppose you have a file, "unix.da" which is an ascii file, but has LF as linend, instead of CRLF, and you wish to create a copy in local OS2 or DOS format, then the following command will fix it: < selcopy -ctl=ctl\localEOL 'unix.da' '%TMP%\PcFormat.da' selcopy will equate %1 to 'unix.da' and %2 to '%TMP%\PcFormat.da' and then obey the control stmts in localEOL which reads %1 and writes %2, defaulting to the EOL string for the local system. (CRLF for PC's.) Normal file names for selcopy/wnt are treated as mixed case and kept intact. However, if a filename is passed as an EQU string, then it is not known at that time as an fname and consequently, if not in quotes, is uppercased. To overcome this, we must put each fname in quotes for selcopy. Any text input file read by selcopy, by default, may have any combination of the following linend delimiters: LF, CRLF, or CR, (for Unix, DOS or OS2), but text output files, by default, are written according to the preferred convention of the host operating system, which for Windows, OS2 and DOS is CRLF. The EOL parameter may however be used to override this. e.g. read %1 !write %2 eol=crlf or even: read %1 !write %2 eol=x'0d0a' or any other hex combination you choose (of any length). * SELCOPY/WNT Test Drive 5 * *** Supply all ctl stmts as used for SELCOPY on the IBM M/f. This of course is only suitable for users porting from an IBM mainframe to a unix box. Select a mainframe SELCOPY job which processes files which you have copied to your PC m/c. Adjust the file names, and run it. It should work, even with Packed Decimal processing. Please read the main documentation for info on subtle differences that you may encounter, e.g. Looking for a blank as X'40' instead of X'20'. (It is better to look for ' '.) * Change History * *** L=007 2009/06/14 -djh- Intro selcodb.dll for database access. L=006 2007/09/22 -djh- Say that default DLL is libselc.dll, not slccall.dll. L=005 2006/11/12 -djh- Say that slccall.dll is optional. L=004 2006/01/11 -jge- %B% set for Build Level to apply to COPY statements. L=003 2006/01/09 -jge- Forward-slashes changed to back-slashes as appropriate. L=002 2005/06/21 -djh- Minor cosmetics. L=001 2000/08/07 -djh- Started, using OS2 install as a base. --- End ---