Using .CSV files on iseries / as400 DB2

In order to convert a .CSV file in the IFS to an AS/400 (DB2) use the ‘Copy from Import File’ command:

 

CPYFRMIMPF     FROMSTMF(‘Full path and file name with extension’)

Note:    You may need to use WRKLNK (Work with object Link) command to find the path filename and extension.

                                                TOFILE(Library/Filename)     

Note:     *LIBL is assumed by the system.

                                                MBROPT(*REPLACE)                                 

Note:     Valid values *ADD  *REPLACE  *UPDADD

                                                RCDDLM(*CRLF)                    

Note:     Carriage Return Line Feed works for .CSV files. There are other possible values.              

                                                FROMRCD(2)                                       

Note:     This parameter allows you to bypass headers. It may be set to any number.

                                                RPLNULLVAL(*FLDDFT)                             

Note:    This parameter allows you to replace null values with field default values. It should always be used when converting .CSV into DB2 files.

 

In order to convert an AS/400 (DB2) to a .CSV file in the IFS use the ‘Copy to Import File’ command:

 

CPYTOIMPF        FROMFILE(Library/Filename)     

Note:     *LIBL is assumed by the system.                         

TOSTMF(‘Full path and file name with extension’)

Note:     You may need to use WRKLNK (Work with object Link) command to find the path filename and extension.

MBROPT(*ADD)

Note:     Valid values       *ADD  *REPLACE

RCDDLM(*CRLF)

Note:     Carriage Return Line Feed works for .CSV files. There are other possible values.

DTAFMT(*DLM)

Note:    Because we intend to separate each field with a ‘;’ this parameter setting is required. There are other possible values.

STRDLM(*NONE)

RMVBLANK(*TRAILING)

Note:     To prevent transfer of non-significant blanks.

FLDDLM(‘;’)          

Note:    This the delimiter to ‘;’ rather than the default :,: this was a requirement from K + S for SAP data transfers.

Dead Sea Minerals Skin Care from 3in1Skincare.com

Dead Sea Minerals Lotion
Dead Sea Minerals Lotion

These 3in1 Dead Sea skin care products provide a total solution that retards the aging process. It prevents dry skin, winter skin, and other skin problems, and even reduces or eliminates the symptoms and discomfort of serious skin diseases llike dermatitis, psoriasis, and eczema.

The anti-bacterial, deep cleaning Hand Soap is unscented and hypoallergenic. Use it as often as you like. It has a high pH factor of 5.5, which makes it non-irritating.

The Hand Lotion soothes and replenishes essential oils and vitamins. It leaves your hands clean and without any scent or residue. Use it after washing hands with Hand Soap.

The 3in1 Body Lotion enters the pores of your skin and immediately banishes dryness. It makes your skin soft, youthful, and healthy.

The Foot Balm makes your feet feel good again. The Dead Sea minerals, vitamins, and essential oils prevent dryness, cracking skin, and calluses. The skin on your feet becomes smooth and rejuvenated. Your feet feel invigorated due to the improved blood circulation.

The Shower Gel makes your shower a pleasurable, sensual experience. It’s scented with natural citrus oil to enhance the experience. Dead Sea minerals, vitamins, and essential oils replenish the skin. Hypoallergenic and non-irritating.

BASH SHELL VI COMMANDS

Inserting Text


i Insert before cursor
I Insert before line
a Append after cursor
A Append after line
o Open a new line after current line
O Open a new line before current line
r Replace one character
R Replace many characters

Motion


h Move left
j Move down
k Move up
l Move right
w Move to next word
W Move to next blank delimited word
b Move to the beginning of the word
B Move to the beginning of blank delimted word
e Move to the end of the word
E Move to the end of Blank delimited word
( Move a sentence back
) Move a sentence forward
{ Move a paragraph back
} Move a paragraph forward
0 Move to the begining of the line
$ Move to the end of the line
1G Move to the first line of the file
G Move to the last line of the file
nG Move to nth line of the file
:n Move to nth line of the file
fc Move forward to c
Fc Move back to c
H Move to top of screen
M Move to middle of screen
L Move to botton of screen
% Move to associated ( ), { }, [ ]

Deleting Text


Almost all deletion commands are performed by typing d followed by a motion. For example, dw deletes a word. A few other deletes are:
x Delete character to the right of cursor
X Delete character to the left of cursor
D Delete to the end of the line
dd Delete current line
:d Delete current line

Yanking Text


Like deletion, almost all yank commands are performed by typing y followed by a motion. For example, y$ yanks to the end of the line. Two other yank commands are:
yy Yank the current line
:y Yank the current line

Changing text


The change command is a deletion command that leaves the editor in insert mode. It is performed by typing c followed by a motion. For wxample cw changes a word. A few other change commands are:
C Change to the end of the line
cc Change the whole line

Putting text


p Put after the position or after the line
P Put before the poition or before the line

Buffers


Named buffers may be specified before any deletion, change, yank or put command. The general prefix has the form “c where c is any lowercase character. for example, “adw deletes a word into buffer a. It may thereafter be put back into text with an appropriate “ap.

Markers


Named markers may be set on any line in a file. Any lower case letter may be a marker name. Markers may also be used as limits for ranges.
mc Set marker c on this line
`c Go to beginning of marker c line.
c Go to first non-blank character of marker c line.

Search for strings


/string Search forward for string
?string Search back for string
n Search for next instance of string
N Search for previous instance of string

Replace


The search and replace
function is accomplished with the :s command. It is commonly used in combination with ranges or the :g command (below).
:s/pattern/string/flags Replace pattern with string according to flags.
g Flag – Replace all occurences of pattern
c Flag – Confirm replaces.
& Repeat last :s command

Regular Expressions


. (dot) Any single character except newline
* zero or more occurances of any character
[…] Any single character specified in the set
[^…] Any single character not specified in the set
^ Anchor – beginning of the line
$ Anchor – end of line
\< Anchor – begining of word
\> Anchor – end of word
\(…\) Grouping – usually used to group conditions
\n Contents of nth grouping
[A-Z] The SET from Capital A to Capital Z
[a-z] The SET from lowercase a to lowercase z
[0-9] The SET from 0 to 9 (All numerals)
[./=+] The SET containing . (dot), / (slash), =, and +
[-A-F] The SET from Capital A to Capital F and the dash (dashes must be specified first)
[0-9 A-Z] The SET containing all capital letters and digits and a space
[A-Z][a-zA-Z] In the first position, the SET from Capital A to Capital ZIn the second character position, the SET containing all letters
/Hello/ Matches if the line contains the value Hello
/^TEST$/ Matches if the line contains TEST by itself
/^[a-zA-Z]/ Matches if the line starts with any letter
/^[a-z].*/ Matches if the first character of the line is a-z and there is at least one more of any character following it
/2134$/ Matches if line ends with 2134
/\(21|35\)/ Matches is the line contains 21 or 35Note the use of ( ) with the pipe symbol to specify the ‘or’ condition
/[0-9]*/ Matches if there are zero or more numbers in the line
/^[^#]/ Matches if the first character is not a # in the line
Notes:1. Regular expressions are case sensitive2. Regular expressions are to be used where pattern is specified

Counts


Nearly every command may be preceded by a number that specifies how many times it is to be performed. For example, 5dw will delete 5 words and 3fe will move the
cursor forward to the 3rd occurence of the letter e. Even insertions may be repeated conveniently with thismethod, say to insert the same line 100 times.

Ranges


Ranges may precede most “colon” commands and cause them to be executed on a line or lines. For example :3,7d would delete lines 3-7. Ranges are commonly combined with the :s command to perform a replacement on several lines, as with :.,$s/pattern/string/g to make a replacement from the current line to the end of the file.
:n,m Range – Lines nm
:. Range – Current line
:$ Range – Last line
:’c Range – Marker c
:% Range – All lines in file
:g/pattern/ Range – All lines that contain pattern

Files


:w file Write to file
:r file Read file in after line
:n Go to next file
:p Go to previos file
:e file Edit file
!!program Replace line with output from program

Other


~ Toggle upp and lower case
J Join lines
. Repeat last text-changing command
u Undo last change
U Undo all changes to line

DOS Commands that work on Windows XP

MS-DOS and command line overview

Below is a listing of each of the MS-DOS commands currently listed on Computer Hope and a brief explanation of what each of the commands do. The below commands are all MS-DOS commands, which means not all the below commands will work in your version of MS-DOS and/or Windows command line. Clicking on the command will open the help page for that command with full details about it.

Command Description

Aansi.sys  ||  NSI.SYS Defines functions that change display graphics, control cursor movement, and reassign keys.
append  ||   Causes MS-DOS to look in other directories when editing a file or running a command.
arp  ||   Displays, adds, and removes arp information from network devices.
assign  ||   Assign a drive letter to an alternate letter.
assoc  ||   View the file associations.
at  ||   Schedule a time to execute commands or programs.
atmadm  ||   Lists connections and addresses seen by Windows ATM call manager.
attrib  ||   Display and change file attributes.
batch  ||   Recovery console command that executes a series of commands in a file.
bootcfg  ||   Recovery console command that allows a user to view, modify, and rebuild the boot.ini
break  ||   Enable / disable CTRL + C feature.
cacls  ||   View and modify file ACL’s.
call  ||   Calls a batch file from another batch file.
cd  ||   Changes directories.
chcp  ||   Supplement the International keyboard and character set information.
chdir  ||   Changes directories.
chdsk  ||   Check the hard disk drive running FAT for errors.
chkntfs  ||   Check the hard disk drive running NTFS for errors.
choice  ||   Specify a listing of multiple options within a batch file.
cls  ||   Clears the screen.
cmd  ||   Opens the command interpreter.
color  ||   Easily change the foreground and background color of the MS-DOS window.
command  ||   Opens the command interpreter.
comp  ||   Compares files.
compact  ||   Compresses and uncompress files.
control  ||   Open Control Panel icons from the MS-DOS prompt.
convert  ||   Convert FAT to NTFS.
copy  ||   Copy one or more files to an alternate location.
ctty  ||   Change the computers input/output devices.
date  ||   View or change the systems date.
debug  ||    Debug utility to create assembly programs to modify hardware settings.
defrag  ||    Re-arrange the hard disk drive to help with loading programs.
del  ||   Deletes one or more files.
delete  ||   Recovery console command that deletes a file.
deltree  ||   Deletes one or more files and/or directories.
dir  ||   List the contents of one or more directory.
disable Recovery console command that disables Windows system services or drivers.
diskcomp Compare a disk with another disk.
diskcopy Copy the contents of one disk and place them on another disk.
doskey Command to view and execute commands that have been run in the past.
dosshell A GUI to help with early MS-DOS users.
drivparm Enables overwrite of original device drivers.
echo Displays messages and enables and disables echo.
edit View and edit files.
edlin View and edit files.
emm386 Load extended Memory Manager.
ename Recovery console command to enable a disable service or driver.
endlocal Stops the localization of the environment changes enabled by the setlocal command.
erase Erase files from computer.
exit Exit from the command interpreter.
expand Expand a Microsoft Windows file back to it’s original format.
extract Extract files from the Microsoft Windows cabinets.
fasthelp Displays a listing of MS-DOS commands and information about them.
fc Compare files.
fdisk Utility used to create partitions on the hard disk drive.
find Search for text within a file.
findstr Searches for a string of text within a file.
fixboot Writes a new boot sector.
fixmbr Writes a new boot record to a disk drive.
for Boolean used in batch files.
format Command to erase and prepare a disk drive.
ftp Command to connect and operate on a FTP server.
ftype Displays or modifies file types used in file extension associations.
goto Moves a batch file to a specific label or location.
graftabl Show extended characters in graphics mode.
help Display a listing of commands and brief explanation.
if Allows for batch files to perform conditional processing.
ifshlp.sys 32-bit file manager.
ipconfig Network command to view network adapter settings and assigned values.
keyb Change layout of keyboard.
label Change the label of a disk drive.
lh Load a device driver in to high memory.
listsvc Recovery console command that displays the services and drivers.
loadfix Load a program above the first 64k.
loadhigh Load a device driver in to high memory.
lock Lock the hard disk drive.
logoff Logoff the currently profile using the computer.
logon Recovery console command to list installations and enable administrator login.
map Displays the device name of a drive.
md Command to create a new directory.
mem Display memory on system.
mkdir Command to create a new directory.
mode Modify the port or display settings.
more Display one page at a time.
move Move one or more files from one directory to another directory.
msav Early Microsoft Virus scanner.
msd Diagnostics utility.
msdex Utility used to load and provide access to the CD-ROM.
nbtstat Displays protocol statistics and current TCP/IP connections using NBT
net Update, fix, or view the network or network settings
netsh Configure dynamic and static network information from MS-DOS.
netstat Display the TCP/IP network protocol statistics and information.
nlsfunc Load country specific information.
nslookup Look up an IP address of a domain or host on a network.
path View and modify the computers path location.
pathping View and locate locations of network latency.
pause Command used in batch files to stop the processing of a command.
ping Test / send information to another network computer or network device.
popd Changes to the directory or network path stored by the pushd command.
power Conserve power with computer portables. 
print Prints data to a printer port.
prompt View and change the MS-DOS prompt.
pushd Stores a directory or network path in memory so it can be returned to at any time.
qbasic Open the QBasic.
rd Removes an empty directory.
ren Renames a file or directory.
rename Renames a file or directory.
rmdir Removes an empty directory.
route View and configure windows network route tables.
runas Enables a user to execute a program on another computer.
scandisk Run the scandisk utility.
scanreg Scan registry and recover registry from errors.
set Change one variable or string to another. 
setlocal Enables local environments to be changed without affecting anything else. 
setver Change MS-DOS version to trick older MS-DOS programs.
share Installs support for file sharing and locking capabilities. 
shift Changes the position of replaceable parameters in a batch program. 
shutdown Shutdown the computer from the MS-DOS prompt.
smartdrv Create a disk cache in conventional memory or extended memory.
sort Sorts the input and displays the output to the screen.
start Start a separate window in Windows from the MS-DOS prompt.
subst Substitute a folder on your computer for another drive letter. 
switches Remove add functions from MS-DOS.
sys Transfer system files to disk drive.
telnet Telnet to another computer / device from the prompt.
time View or modify the system time.
title Change the title of their MS-DOS window.
tracert Visually view a network packets route across a network.
tree View a visual tree of the hard disk drive.
type Display the contents of a file.
undelete Undelete a file that has been deleted.
unformat Unformat a hard disk drive.
unlock Unlock a disk drive.
ver Display the version information.
verify Enables or disables the feature to determine if files have been written properly. 
vol Displays the volume information about the designated drive. 
xcopy Copy multiple files, directories, and/or drives from one location to another.

Aansi.sysNSI.SYS Defines functions that change display graphics, control cursor movement, and reassign keys.

Windows 2000 and XP xcopy syntax

XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/V] [/W] [/C] [/I] [/Q] [/F] [/L] [/H] [/R] [/T] [/U]
[/K] [/N] [/O] [/X] [/Y] [/-Y] [/Z] [/EXCLUDE:file1[+file2][+file3]…]

source Specifies the file(s) to copy.

The switch /Y may be preset in the COPYCMD environment variable.
This may be overridden with /-Y on the command line.