How can I append some data to an array via a case structure?
Basically i want to do the following thing:
do
if control=0
else
Data=Data append data1
end if
}while(run=1)
We try to avoid local variable since the size of Data is pretty big. I am pretty sure i can add a shift register in a loop structure.But is it possible to add a shift register in a case structure?
Thank you!
The best you will be able to do is going to be a variation on what CC suggested regarding replacing array sub-sets.
If you do not know how big it will end up then over-allocate but still use the replace array subset.
The delays you are seeing are due to the memory buffers groing and additional memory need allocated as the array grows. The Replace array subset function operates inplace and re-uses the buffer it is passed. There is no clear KB regarding which array operations operate inplace and which do not.
http://forums.ni.com/ni/board/message?board.id=170&message.id=74847&requireLogin=False
Under Tools >>> Advanced >>> Show buffer allocations will show you where buffers are being allocated (LV 7.1).
If you post a zip or llb of you code I am sure someone will have more to add.
Ben
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction
Similar Messages
-
How can I delete some data so I can back my iPhone up to the icloud
I want to back my iPhone up to the icloud. How can I delete some data
DO NOT start iTunes. Connect your phone to a computer and then access the photo folder, should be the only folder that will appear when you access your phone through the file explorer. You are looking for the DCIM folder. Open it and then either copy the photos to a folder on your computer if you want to save them. Then you can delete them from your phone.
Or you can simply go into Pictures, Open the folder you want to empty out, Tap Select, Tap the pictures (Sorry but you have to touch each one) and then tap the trash can.
And remember that if anyone has messaged you a picture it will be in Messages and also taking up room. -
How can we append data in existing flat file
how can we append data to a existing flat file (Text file).
just fill the itab from data which suppose to append to text file.than read text file from GUI_UPLOAD and loop on itab and with the use of read statements you may append the data.
-
In Firefox 4 how can I cause the date on downloaded files to be the current date? (Some are and some are not. In FF3 the dates were ALWAYS the current ones.)
== This happened ==
Every time Firefox opened
== I upgraded to Firefox 4 (beta)Firefox 3.6.* and earlier set the downloaded file's modification time to the current time. In Firefox 4.0 the behavior has been changed, if a server returns a timestamp telling when the file was last modified (Last-Modified header), it is used instead.
You can revert to the previous behaviour by using the [https://addons.mozilla.org/en-US/firefox/addon/93121/ Download Timestamp] add-on. -
Hallo My system runs slow. how can i reorganize the date, that the pc runs faster? In the window world i hade to delete some fils. how it work in the apple world?
See these:
Switching from Windows to Mac OS X,
Basic Tutorials on using a Mac,
Mac OS X keyboard shortcuts,
Anatomy of a Mac,
MacTips,
Switching to Mac Superguide, and
Switching to the Mac: The Missing Manual, Mountain Lion Edition.
Additionally, *Texas Mac Man* recommends:
Quick Assist,
Welcome to the Switch To A Mac Guides,
Take Control E-books, and
A guide for switching to a Mac.
Once you get familiar with the Mac, see:
Mac Maintenance Quick Assist,
Mac OS X speed FAQ,
Speeding up Macs,
How to Speed up Macs, ,
Macintosh OS X Routine Maintenance,
Essential Mac Maintenance: Get set up,
Essential Mac Maintenance: Rev up your routines,
Maintaining OS X,
Five Mac maintenance myths and
Myths of required versus not required maintenance for Mac OS X for information. -
How can i append a field directly to xtract structure.
(with out going to communication structure) while doing xtraction, if i hv a requirement to append a field directly to xtract structure. how can i append that field.
hai satish,
Follow these steps:
go to rsa6 --> select your data source --> double click on the it --> double click on extract structure --> Click on append structure.
enter ur Enhancing Field names,
go back to rsa6 in change mode---> remove hide check for newly added field..
now go to se37 ---> EXIT_SAPLRSAP_001(for transaction data )
Ur having some Include program Modify according to Ur fields.
Thanks,
kiran. -
How can I load my data faster? Is there a SQL solution instead of PL/SQL?
11.2.0.2
Solaris 10 sparc
I need to backfill invoices from a customer. The raw data has 3.1 million records. I have used pl/sql to load these invoices into our system (dev), however, our issue is the amount of time it's taking to run the load - effectively running at approx 4 hours. (Raw data has been loaded into a staging table)
My research keeps coming back to one concept: sql is faster than pl/sql. Where I'm stuck is the need to programmatically load the data. The invoice table has a sequence on it (primary key = invoice_id)...the invoice_header and invoice_address tables use the invoice_id as a foreign key. So my script takes advantage of knowing the primary key and uses that on the subsequent inserts to the subordinate invoice_header and invoice_address tables, respectively.
My script is below. What I'm asking is if there are other ideas on the quickest way to load this data...what am I not considering? I have to load the data in dev, qa, then production so the sequences and such change between the environments. I've dummied down the code to protect the customer; syntax and correctness of the code posted here (on the forum) is moot...it's only posted to give the framework for what I currently have.
Any advice would be greatly appreciated; how can I load the data faster knowing that I need to know sequence values for inserts into other tables?
DECLARE
v_inv_id invoice.invoice_id%TYPE;
v_inv_addr_id invoice_address.invoice_address_id%TYPE;
errString invoice_errors.sqlerrmsg%TYPE;
v_guid VARCHAR2 (128);
v_str VARCHAR2 (256);
v_err_loc NUMBER;
v_count NUMBER := 0;
l_start_time NUMBER;
TYPE rec IS RECORD
BILLING_TYPE VARCHAR2 (256),
CURRENCY VARCHAR2 (256),
BILLING_DOCUMENT VARCHAR2 (256),
DROP_SHIP_IND VARCHAR2 (256),
TO_PO_NUMBER VARCHAR2 (256),
TO_PURCHASE_ORDER VARCHAR2 (256),
DUE_DATE DATE,
BILL_DATE DATE,
TAX_AMT VARCHAR2 (256),
PAYER_CUSTOMER VARCHAR2 (256),
TO_ACCT_NO VARCHAR2 (256),
BILL_TO_ACCT_NO VARCHAR2 (256),
NET_AMOUNT VARCHAR2 (256),
NET_AMOUNT_CURRENCY VARCHAR2 (256),
ORDER_DT DATE,
TO_CUSTOMER VARCHAR2 (256),
TO_NAME VARCHAR2 (256),
FRANCHISES VARCHAR2 (4000),
UPDT_DT DATE
TYPE tab IS TABLE OF rec
INDEX BY BINARY_INTEGER;
pltab tab;
CURSOR c
IS
SELECT billing_type,
currency,
billing_document,
drop_ship_ind,
to_po_number,
to_purchase_order,
due_date,
bill_date,
tax_amt,
payer_customer,
to_acct_no,
bill_to_acct_no,
net_amount,
net_amount_currency,
order_dt,
to_customer,
to_name,
franchises,
updt_dt
FROM BACKFILL_INVOICES;
BEGIN
l_start_time := DBMS_UTILITY.get_time;
OPEN c;
LOOP
FETCH c
BULK COLLECT INTO pltab
LIMIT 1000;
v_err_loc := 1;
FOR i IN 1 .. pltab.COUNT
LOOP
BEGIN
v_inv_id := SEQ_INVOICE_ID.NEXTVAL;
v_guid := 'import' || TO_CHAR (CURRENT_TIMESTAMP, 'hhmissff');
v_str := str_parser (pltab (i).FRANCHISES); --function to string parse - this could be done in advance, yes.
v_err_loc := 2;
v_count := v_count + 1;
INSERT INTO invoice nologging
VALUES (v_inv_id,
pltab (i).BILL_DATE,
v_guid,
'111111',
'NONE',
TO_TIMESTAMP (pltab (i).BILL_DATE),
TO_TIMESTAMP (pltab (i).UPDT_DT),
'READ',
'PAPER',
pltab (i).payer_customer,
v_str,
'111111');
v_err_loc := 3;
INSERT INTO invoice_header nologging
VALUES (v_inv_id,
TRIM (LEADING 0 FROM pltab (i).billing_document), --invoice_num
NULL,
pltab (i).BILL_DATE, --invoice_date
pltab (i).TO_PO_NUMBER,
NULL,
pltab (i).net_amount,
NULL,
pltab (i).tax_amt,
NULL,
NULL,
pltab (i).due_date,
NULL,
NULL,
NULL,
NULL,
NULL,
TO_TIMESTAMP (SYSDATE),
TO_TIMESTAMP (SYSDATE),
PLTAB (I).NET_AMOUNT_CURRENCY,
(SELECT i.bc_value
FROM invsvc_owner.billing_codes i
WHERE i.bc_name = PLTAB (I).BILLING_TYPE),
PLTAB (I).BILL_DATE);
v_err_loc := 4;
INSERT INTO invoice_address nologging
VALUES (invsvc_owner.SEQ_INVOICE_ADDRESS_ID.NEXTVAL,
v_inv_id,
'BLAH INITIAL',
pltab (i).BILL_DATE,
NULL,
pltab (i).to_acct_no,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
SYSTIMESTAMP,
NULL);
v_err_loc := 5;
INSERT INTO invoice_address nologging
VALUES ( SEQ_INVOICE_ADDRESS_ID.NEXTVAL,
v_inv_id,
'BLAH',
pltab (i).BILL_DATE,
NULL,
pltab (i).TO_ACCT_NO,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
SYSTIMESTAMP,
NULL);
v_err_loc := 6;
INSERT INTO invoice_address nologging
VALUES ( SEQ_INVOICE_ADDRESS_ID.NEXTVAL,
v_inv_id,
'BLAH2',
pltab (i).BILL_DATE,
NULL,
pltab (i).TO_CUSTOMER,
pltab (i).to_name,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
SYSTIMESTAMP,
NULL);
v_err_loc := 7;
INSERT INTO invoice_address nologging
VALUES ( SEQ_INVOICE_ADDRESS_ID.NEXTVAL,
v_inv_id,
'BLAH3',
pltab (i).BILL_DATE,
NULL,
'SOME PROPRIETARY DATA',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
SYSTIMESTAMP,
NULL);
v_err_loc := 8;
INSERT
INTO invoice_event nologging (id,
eid,
root_eid,
invoice_number,
event_type,
event_email_address,
event_ts)
VALUES ( SEQ_INVOICE_EVENT_ID.NEXTVAL,
'111111',
'222222',
TRIM (LEADING 0 FROM pltab (i).billing_document),
'READ',
'some_user@some_company.com',
SYSTIMESTAMP);
v_err_loc := 9;
INSERT INTO backfill_invoice_mapping
VALUES (v_inv_id,
v_guid,
pltab (i).billing_document,
pltab (i).payer_customer,
pltab (i).net_amount);
IF v_count = 10000
THEN
COMMIT;
END IF;
EXCEPTION
WHEN OTHERS
THEN
errString := SQLERRM;
INSERT INTO backfill_invoice_errors
VALUES (
pltab (i).billing_document,
pltab (i).payer_customer,
errString || ' ' || v_err_loc
COMMIT;
END;
END LOOP;
v_err_loc := 10;
INSERT INTO backfill_invoice_timing
VALUES (
ROUND ( (DBMS_UTILITY.get_time - l_start_time) / 100,
2)
|| ' seconds.',
(SELECT COUNT (1)
FROM backfill_invoice_mapping),
(SELECT COUNT (1)
FROM backfill_invoice_errors),
SYSDATE
COMMIT;
EXIT WHEN c%NOTFOUND;
END LOOP;
COMMIT;
EXCEPTION
WHEN OTHERS
THEN
errString := SQLERRM;
INSERT INTO backfill_invoice_errors
VALUES (NULL, NULL, errString || ' ' || v_err_loc);
COMMIT;
END;Hello
You could use insert all in your case and make use of sequence.NEXTVAL and sequence.CURRVAL like so (excuse any typos - I can't test without table definitions). I've done the first 2 tables, so it's just a matter of adding the rest in...
INSERT ALL
INTO invoice nologging
VALUES ( SEQ_INVOICE_ID.NEXTVAL,
BILL_DATE,
my_guid,
'111111',
'NONE',
CAST(BILL_DATE AS TIMESTAMP),
CAST(UPDT_DT AS TIMESTAMP),
'READ',
'PAPER',
payer_customer,
parsed_francises,
'111111'
INTO invoice_header
VALUES ( SEQ_INVOICE_ID.CURRVAL,
TRIM (LEADING 0 FROM billing_document), --invoice_num
NULL,
BILL_DATE, --invoice_date
TO_PO_NUMBER,
NULL,
net_amount,
NULL,
tax_amt,
NULL,
NULL,
due_date,
NULL,
NULL,
NULL,
NULL,
NULL,
SYSTIMESTAMP,
SYSTIMESTAMP,
NET_AMOUNT_CURRENCY,
bc_value,
BILL_DATE)
SELECT
src.billing_type,
src.currency,
src.billing_document,
src.drop_ship_ind,
src.to_po_number,
src.to_purchase_order,
src.due_date,
src.bill_date,
src.tax_amt,
src.payer_customer,
src.to_acct_no,
src.bill_to_acct_no,
src.net_amount,
src.net_amount_currency,
src.order_dt,
src.to_customer,
src.to_name,
src.franchises,
src.updt_dt,
str_parser (src.FRANCHISES) parsed_franchises,
'import' || TO_CHAR (CURRENT_TIMESTAMP, 'hhmissff') my_guid,
i.bc_value
FROM BACKFILL_INVOICES src,
invsvc_owner.billing_codes i
WHERE i.bc_name = src.BILLING_TYPE;Some things to note
1. Don't commit in a loop - you only add to the run time and load on the box ultimately reducing scalability and removing transactional integrity. Commit once at the end of the job.
2. Make sure you specify the list of columns you are inserting into as well as the values or columns you are selecting. This is good practice as it protects your code from compilation issues in the event of new columns being added to tables. Also it makes it very clear what you are inserting where.
3. If you use WHEN OTHERS THEN... to log something, make sure you either rollback or raise the exception. What you have done in your code is say - I don't care what the problem is, just commit whatever has been done. This is not good practice.
HTH
David
Edited by: Bravid on Oct 13, 2011 4:35 PM -
How can i append the variable to filename in import statement?
how can i append variable(substitution variable) to file name in import command for maxL?
example : For suppose there is a file like "dataload.txt" and a variable like cur_month(august).How can i rename the file like daload_august in import statement.
Edited by: 788996 on Aug 22, 2010 11:18 PMAre you saying you want to use an OS level environment variable in a MaxL statement to substitute for an entire file name? I am going to illustrate Windows, but do it your own way in *nix if you want.
YourCallingCode.cmd
REM Note the \\ and then the \\, you had \\ and \
SET curmon=c:\\ABC\\datafile_21_AUG.txt
REM Call MaxL with a paramenter
startMaxL.cmd DoItForTheCurrentMonth.msh %curmon%DoItForTheCurrentMonth.msh
login blah blah for blah ;
import database appname.dbname data from local text data_file $curmon using server rules_file "rulefile"
on error abort ;The trick is to change whatever's in % and % and replace it with a $ in the MaxL script.
I gave a presentation last year on MaxL at ODTUG Kaleidoscope. If you go to http://www.odtug.com, then Tech Resources, then Essbase, then search on my name, you'll find "Master Essbase with MaxL Automation". More than you could ever want to know about MaxL, variables (parameter, environment, and explicitly declared), scripting, etc., etc., are all there for the taking. If you're not already a member, you'll have to join, but an associate membership is free. You can then download my presentation and all of the others. It is a treasure chest of technical tips and knowledge.
Yes, I am a fan a member of the Hyperion SIG, so I am ever so slightly biased. Regardless, it is good information, for free.
Regards,
Cameron Lackpour
Edited by: CL on Aug 24, 2010 5:33 AM
If you want to substitute part of the data file name, you can do that too:
set curmon=21_AUG
Your MaxL statement would look like:
import database appname.dbname data from local text data_file "c:\\ABC\\datafile_$curmon.txt" using server rules_file "rulefile"
on error abort ; -
How can we give the Data Format (File Type ) in Runtime
Hi all,
How can we give the Data Format (File Type ) in Runtime for the following method,
cl_gui_frontend_services=>gui_download.
Thanks in advance
SriThere is a filetype parameter which you can set
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
* BIN_FILESIZE =
filename =
* FILETYPE = 'ASC'
* APPEND = SPACE
* WRITE_FIELD_SEPARATOR = SPACE
* HEADER = '00'
* TRUNC_TRAILING_BLANKS = SPACE
* WRITE_LF = 'X'
* COL_SELECT = SPACE
* COL_SELECT_MASK = SPACE
* DAT_MODE = SPACE
* CONFIRM_OVERWRITE = SPACE
* NO_AUTH_CHECK = SPACE
* CODEPAGE = SPACE
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* WRITE_BOM = SPACE
* TRUNC_TRAILING_BLANKS_EOL = 'X'
* IMPORTING
* FILELENGTH =
changing
data_tab =
* EXCEPTIONS
* FILE_WRITE_ERROR = 1
* NO_BATCH = 2
* GUI_REFUSE_FILETRANSFER = 3
* INVALID_TYPE = 4
* NO_AUTHORITY = 5
* UNKNOWN_ERROR = 6
* HEADER_NOT_ALLOWED = 7
* SEPARATOR_NOT_ALLOWED = 8
* FILESIZE_NOT_ALLOWED = 9
* HEADER_TOO_LONG = 10
* DP_ERROR_CREATE = 11
* DP_ERROR_SEND = 12
* DP_ERROR_WRITE = 13
* UNKNOWN_DP_ERROR = 14
* ACCESS_DENIED = 15
* DP_OUT_OF_MEMORY = 16
* DISK_FULL = 17
* DP_TIMEOUT = 18
* FILE_NOT_FOUND = 19
* DATAPROVIDER_EXCEPTION = 20
* CONTROL_FLUSH_ERROR = 21
* NOT_SUPPORTED_BY_GUI = 22
* ERROR_NO_GUI = 23
* others = 24 -
I use a translation stage for the experiment.For each user in the lab the stage position (to start an experiment) is different.I defined one end of the stage as zero. I want to save the position , date and time of the stage with respect to zero.I want all these in one file, nd everytime I run it it should save to the same file, like this:
2/12/03 16:04 13567
2/13/03 10:15 35678
So I will track the position from day to day.If naybody helps, I appreciate it.Thanks.evolution wrote in message news:<[email protected]>...
> How can I save my data and the date,the time into the same file when
> I run this VI at different times?
>
> I use a translation stage for the experiment.For each user in the lab
> the stage position (to start an experiment) is different.I defined one
> end of the stage as zero. I want to save the position , date and time
> of the stage with respect to zero.I want all these in one file, nd
> everytime I run it it should save to the same file, like this:
> 2/12/03 16:04 13567
> 2/13/03 10:15 35678
>
> So I will track the position from day to day.If naybody helps, I
> appreciate it.Thanks.
Hi,
I know the function "write to spreadsheet file.vi"
can append the data
to file. You can use the "concatenate strings" to display the date,
time as well as data... Hope this help.
Regards,
celery -
How can i lookup a data source v5 in WSAD 5.1?
Hi all,
I'm using WSAD 5.1 to developer a web application based on J2EE 1.3 that have a simple java classes. My application uses a data source version 5 to have access the database. I?m using service locator pattern to lookup a JNDI but it dont work properly on stand alone java classes, only on EJB components.
How can i lookup a data source version 5 from my java class on WSAD 5.1?
Can anyone help?
Thanks,Oh I did not realize that you were talking about a stand-alone application. You cannot use the server datasources in your stand-alone application.
You can use the Oracle helper classes to construct a DataSource on the client side.
http://java.sun.com/j2se/1.4.2/docs/api/javax/sql/DataSource.html and driver specific documentation to achieve this. I will try to send a few links, if I find any.
In a stand-alone application, you can use some connection pooling mechanism on your own.
The ideal thing to do is to keep your data access in your middle tier (EJBs) and call the EJB's. This way you can reuse things in multiple client tiers and use the container provided datasource and connection pooling mechanisms.
Hope this helps.
Vijay -
How can I get a date picker or wheel to show up in the form to make filling in a form with a lot of
how can I get a date picker or wheel to show up in the form to make filling in a form with a lot of dates more easy?
There is no built-in date picker available for forms created in Acrobat. There are some third-party solutions involving JavaScript (either a large collection of fields or a custom dialog) though. Also, text fields with date formatting will use a wheel type date picker on Android/iOS devices with Adobe Reader.
-
How can i restore my data synchronised from a serv...
I use Nokia C3-00, And in My country synchronisation with server is not available except i perform phone switch or with a PC...But in thesame country of mine there is a server people use to synchronise...And when i tried it on my phone with the settings given to me...I synchronised my contacts,notes and calender...and the phone said 'synchonisation sucessfull' but after i restored my phone coz it had an error..and restoring it deleted my data(contacts,notes etc)...Now my question is, how can i restore my data(contacts,notes) that i synchronised ? Coz i checked d phone...i did not see an option to restore d data.....And if i can't, i'm sorry but nokia put that 'sync with server' feature just for fun ...
TSNA - My system crashed 1/2 way through opening up Parallels. I use Parallels for Quicken & Quickbooks only. My system locked up & I had to power down to get any response on the screen. When it started back up I got a screen that said Restore from Time Machine, Safe Startup (or some such words) and one other choice. NONE of which would do anything. - No response to any clicking, entering, up down etc. I called over my Apple friend and he could not get it going,. Ended up having to Reload O/S from the startup disks and reformat my hard drive. Reformatted because I wanted to get rid of Parallels which has painfully slowed down my entire system. I never keep it open unless I am working with Quickbooks or Quicken. Therefore I had decided to start using Boot Camp anyway. So I would have had to reformat my hard drive to do that regardless of this freeze up of my system.
This whole thing has taken days to get my documents off Time Capsule. Time Machine would then not restore to my "new" or reformatted hard drive, so all the files on the Time Capsule were hidden. Total nightmare !
Because now I can't get iPhoto APP back on my system as it is not available and have to use the new PHOTO which I hear is not good. -
How can i save the data in a jpanel form to a .txt document
how can i save the data in a jpanel form to a text file using parse function,this should happen when i click a save button .
please help me..each time when i fill the form and click save button ,all the data in the form should be written to a text file and each time when i repeat it should append to the old data in the text file.the elements in the form should be seperated by pipe delimeter.
thanks for your patience.. -
How can i save the data from the Oracle database to my local directory
How can i save the data from the Oracle database to my local directory instead Of saving the data file to the Directory created on the Oracle Server ?
I require to design the Procedure which will pull the data from various tables and needs to store the data in the Client's local directory.Since SQL*PLUS runs on the client, you can use SQL*PLUS to spool data to your local drive.
You could also use the database to write a a specified drive where all users have access to (mapped network drive, e.g.). I wouldn't recommend doing it that way, but it is sometimes useful when the files are created in some nightly batch run.
Maybe you are looking for
-
I have both iPhone and iPad that will not send emails when I am connected via wi if. Have tried three wi if networks. I get a messag that says the sender address (my address) was rejected by the server. Any ideas on what I need to do? Rusty
-
HOW DO I MOVE SONGS FROM ONE COMPUTER TO ANOTHER??
I have an Ipod Nano and I have downloaded some songs from Itunes to my home computer and now I am trying to move the songs to a new location (another computer - Work). How can I do this? I want to be able to download songs from my Itunes list from ei
-
Over four hours later, OS X download bar is showing negative time remaining of 2,147,483,648 hours remaining. This is under a status message saying 'Preparing to install'. The blue progress bar was full when the download began. If this is someone a
-
Javaws.exe error in xi3.0 urgent
Hi masters, Iam trying to open sxmb_ifr from abap stack the IR /ID and SLD /RWB screen opens.when i select IR/IR iam getting javaws.exe error.Pls suggest me .Iam facing this problem since one and half year.But cant able to troubleshoot. Regards, Wins
-
Complete Newbie with Organizing Question
Please understand that I'm a complete Neophyte at Mac, and iPhoto. Please respond accordingly. I'm a Windows guy who has succumbed to the intrigue and mystery of the Mac. I've got the Intel Dual Core iMac with 250GB HDD and 1 GB RAM. I just got it le