× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Greg,
Just in case you are not aware of this there are many more block commands than discussed in this thread. In LPEX, press ESC then key "?seu" and press Enter. Review all the actions with the word "block" in them. I do lots of copying into RDi where the source was not originally a block selection.

I'm curious if you have considered using the array section of RPG source to store your CSV headings (commas and all)? I find arrays, at the moment, the best place to store large strings of text that I need to use in my programs. I use the array section mostly for large dynamic query statements. I end up using a FOR loop to populate a varying character string, trimming off trailing blanks. If you stored the CSV headings in the array area (with the commas as defaulted by Excel) you could easily use %SCANRPL() to scan over the string to replace the comma with whatever delimiter you wanted.

For me the easiest way to get a CSV heading from Excel is to save the workbook tab as a CSV document type instead. I can then open in RDi easily be dragging and dropping the file name on to RDi.

By the way me favorite block command is blockMarkWord. I mapped that to a key board short cut and use it to highlight an entire token, use CTRL+C and then cursor over other token that I want to replace pressing my CTRL+B and then Ctrl-V to completely replace the token.

Thanks, Matt


-----Original Message-----
From: WDSCI-L [mailto:wdsci-l-bounces@xxxxxxxxxxxx] On Behalf Of Greg Wilburn
Sent: Thursday, June 18, 2015 11:33 AM
To: 'Rational Developer for IBM i / Websphere Development Studio Client for System i & iSeries'
Subject: Re: [WDSCI-L] Next release - Paste Overlay

Maybe I'll do the RFE... My single biggest gripe with RDi is how differently it behaves compared to other Windows applications and SEU. ALT-Z (paste overlay) should perform exactly the same regardless of the source of the copied information, period.

I did copy/paste overlays all the time in SEU - it just all had to fit on the screen. For anyone writing text/csv files to the IFS or creating XLS files on the IFS with HSSFCGI, this is a common occurrence. Here is a prime example of creating a CSV file for export to an accounting system where the column headings have to match exactly... This is my subroutine for writing column headers... data lines are written the same. dlm=',' in this case. Inside RDi the "+dlm+" is "lined up" nice and neat. It completely eliminates typo's and human errors when the software company provides specs that you can just copy/paste into the source code.

begsr colhdr;

Data =
'OrderType' + dlm +
'OrderNumber' + dlm +
'CashAccount' + dlm +
'CustAccRef' + dlm +
'OrderWarehouse' + dlm +
'OrderDate' + dlm +
'OrderRequestedDate' + dlm +
'OrderPromisedDate' + dlm +
'PaymentInFull' + dlm +
'PaymentValue' + dlm +
'PaymentRef' + dlm +
'PaymentMethod' + dlm +
'CustomerOrderNumber' + dlm +
'OrderProcessing' + dlm +
'ExchangeRate' + dlm +
'DelPostalName' + dlm +
'DelAddressLine1' + dlm +
'DelAddressLine2' + dlm +
'DelAddressLine3' + dlm +
'DelAddressLine4' + dlm +
'DelCity' + dlm +
'DelCounty' + dlm +
'DelPostcode' + dlm +
'DelCountryCode' + dlm +
'DelContact' + dlm +
'DelTelephone' + dlm +
'DelFax' + dlm +
'DelEmail' + dlm +
'DelTaxNumber' + dlm +
'DelTaxCode' + dlm +
'InvPostalName' + dlm +
'InvAddressLine1' + dlm +
'InvAddressLine2' + dlm +
'InvAddressLine3' + dlm +
'InvAddressLine4' + dlm +
'InvCity' + dlm +
'InvCounty' + dlm +
'InvPostCode' + dlm +
'InvCountry' + dlm +
'LineRequestedDate' + dlm +
'LinePromisedDate' + dlm +
'LineType' + dlm +
'ProductCode' + dlm +
'ProductDescription' + dlm +
'Warehouse' + dlm +
'Quantity' + dlm +
'UnitPrice' + dlm +
'TaxCode' + dlm +
'TaxAmount' + dlm +
'DiscountPercent' + dlm +
'DiscountValue' + dlm +
'NominalCode' + dlm +
'CostCentre' + dlm +
'Department' + dlm +
'ShowOnPickingList' + dlm +
'ShowOnCustomerDocs' + dlm +
'AnalysisCodeName4' + dlm +
'AnalysisCodeValue4' + dlm +
'AnalysisCodeName5' + dlm +
'AnalysisCodeValue5';

len = %len(%trimr(data));
rc = writeline(fd: %addr(data): len);

endsr;


-----Original Message-----
From: WDSCI-L [mailto:wdsci-l-bounces@xxxxxxxxxxxx] On Behalf Of MichaelQuigley@xxxxxxxxxx
Sent: Thursday, June 18, 2015 11:18 AM
To: wdsci-l@xxxxxxxxxxxx
Subject: Re: [WDSCI-L] Next release - Paste Overlay

"WDSCI-L" <wdsci-l-bounces@xxxxxxxxxxxx> wrote on 06/18/2015 08:35:53 AM:
----- Message from Greg Wilburn <gwilburn@xxxxxxxxxxxxxxxxxxxxxxx>
on Wed, 17 Jun 2015 19:18:31 +0000 -----

To:

"'Rational Developer for IBM i / Websphere Development Studio Client
for System i & iSeries'" <wdsci-l@xxxxxxxxxxxx>

Subject:

Re: [WDSCI-L] Next release - Paste Overlay

I actually need to paste-overlay a block of text. This works when
it's copied from within the LPEX editor using ALT-R, but will not work
from a text editor.

I transposed my column headers into a single column in Excel, pasted
that into Notepad++. Tried to copy and paste-overlay in the source
editor (ALT-Z)... could not get that to work

So I pasted with CTRL-V at the bottom of my source, pressed CTRL-F5 to
clear the messages, copied it again with ALT-R and paste-overlay with
ALT-Z. Whew! Surely there's a better way.


Yea, Alt+Z is designed to copy the marked block within LPEX to the current position and there won't be a marked block since your source is MS-Excel or Notepad++. The best I can suggest would be to get the desired text into the clipboard by whatever means works for you. (Ctrl+C from MS-Excel should work if it's all in a single column.)

Then highlight the target block in LPEX and press Ctrl+V to paste in your text. This will overlay whatever you've highlighted--albeit in a single stream. You may have to add or remove a few spaces after the pasted data if you don't select the exact size to be overlaid. I believe it also requires your LPEX Block preferences to be set to 'stream'. I guess you could try 'rectangle' and see what kind of results you would get.

Not a perfect solution, but the best available that I can think of at this time. I've only done this in my code to paste in comment data thus helping document what the code is doing. I haven't seen what the benefit of overlaying text from a spreadsheet, etc. would be. In my mind, insert the new data and format what you need around it. But I'm sure it fits your needs better to simply overlay the text you're bringing in.

If you can clearly state your case, it's a candidate for an RFE. But there's never a guarantee that an RFE will become part of the product.
I've had RFE's marked as 'Uncommitted Candidates for years. IBM agrees it would be useful, but they've got to pick and choose what they implement with the resources available.
--
This is the Rational Developer for IBM i / Websphere Development Studio Client for System i & iSeries (WDSCI-L) mailing list To post a message email: WDSCI-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/wdsci-l
or email: WDSCI-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at http://archive.midrange.com/wdsci-l.
--
This is the Rational Developer for IBM i / Websphere Development Studio Client for System i & iSeries (WDSCI-L) mailing list To post a message email: WDSCI-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/wdsci-l
or email: WDSCI-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at http://archive.midrange.com/wdsci-l.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.