The easiest way to populate your tables from flat files is to write some SQRs to do so. You can easily tell the SQR how your flat file is laid out (eg. is it space delimited, got a seperator) and the turn that into some values to use in a select statement to populate tables.
It is generally quite quick too, I have seen tables of ~ 500,000 rows updated in about 30 minutes, depending on the server and the database you are using.
Hey u can use import manager for this purpuse, this is tool being proviede by people tool, in which u can perform insertion into table from flat file, remeber flatfiles sould be in structured data format(no delimation) u can map all feld of table with start postion of field value and simply run the import manager a report will be printed indicating that whether import is successfull or not, in case if u have any confusion u can mail on alokksingh@yahoo.com
Assume that I have a string: 'PO - BOX 12345 - 999'. I want to start from the right, moving left, acquire the first hyphen. Once I do this, I want to set the portions to the right and left of the hyphen to different variables. How exactly do I do this. As I said I am beginner and not well versed in SQR. I am using the code below, which does look for a hyphen however it assumes that only one hyphen can exist in the string. Please help.
begin-procedure Check_Vendor_Information !!!Looking for the hyphen right here.
let #start_remit_char = 0
let $chk_vendor_setid = 'KMCTL'
get $chk_vendor_id from APSEND_HDR_REC_ARRAY(0) vendorcode
get $chk_vendor_loc from APSEND_HDR_REC_ARRAY(0) vendorloccode
let $chk_vendor_loc = rtrim($chk_vendor_loc,' ')
find '-' in $chk_vendor_loc 0 #hyphenloc
!display $chk_vendor_loc
if #hyphenloc = -1
!*******System Test Fix ... Fix format E. Pasha 11/28/01 ***************************************************
!let $eError_Message = ' No hyphen found in VendorLocCode on APSEND file'
let $eError_Message = ' No hyphen found in Vendor Loc Code on APSEND file'
let $eError_Message = $eValidation_Error||$eError_Message
!*************************************************************************************************************
do WRITE_ERROR_REPORT
let $Is_reject_flg = 'Y'
else
!*******System Test Fix ... get correct position for starting remit location extraction E. Pasha 11/27/01 ****
let #start_remit_char = #hyphenloc + 2 !get position after hyphen
let $chk_remit_addr_seq_num = substr($chk_vendor_loc,#start_remit_char,3)
let $chk_vendor_loc = substr($chk_vendor_loc,1,#hyphenloc)
!**************************************************************************************************************
end-if
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.