REMOVE CHARACTER FROM TXT FILE
Hi to all,
I create a txt file with cobol, and now I need to remove the last character of each line with pl/sql. For example:
12 *
23 *
45 *
I need to remove *
Somebody can help me?
thank you very much
Silvia
996940 wrote:
I generate a file with cobol, it is very old program and i cannot modify this program, but now I must remove last character in every row and I think to make it con pl/sql
Silviavery bad idea..
What OS you are in..?
Use a shell script or a batch script..
Similar Messages
-
Hello guys,
I need some help. I have to remove some content of Tolerance "column" (see attach). The string which I wish to remove is "+/- 0s" and replace it with an empty string. I need to remove this for each row where "+/- 0s" appears.
Thanks
Solved!
Go to Solution.
Attachments:
sample.txt 3 KBHi Samoth,
I dont know if I understood your requirement properly, but please check the attached snippet if it helps.
If this does not satisfy your requirement, then please give some more details.
Attachments:
Remove string from txt file.png 21 KB -
How to remove Unicode from XML file
I get following error when unmarshal xml:
[java] org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x15) was found in the element content of the document.
Anyone know how to remove Unicode from xml file? Can I remove the unicode by rebuild the file?
ThanksThese sort of error usually occur when you're using a different character encoding to read the file than the one you wrote it with. Perhaps if you were to post the problem section of the file and/or the code that created it in the first place.
-
How to get string (specified by line and column) from txt file with labview
Hi everyone
How to get string (specified by line and column) from txt file with labview
thx
Solved!
Go to Solution.As far as I know, a text file has no columns. Please be more specific. Do you mean something like the 5th word on line 4, where words are separated by a space, and lines are separated by a newline character? You could the Read from Spreadsheet String function and set the delimiter to a space. This will produce a 2D array of strings. Then use index array and give the line number and column number.
- tbob
Inventor of the WORM Global -
How to read data from txt file respectively
Hi,
I am triying to form an equation between two known points. I want to do this with the attached VI, the most critical point is that I will read the x1, y1, x2 and y2 coordinates from the same .txt file. They will be written in a .txt file and I will send them to the appropriate channel (x1, y1, x2 and y2) respectively. How can I get data in a rule from a .txt file?
Could anyone please help me with this issue,
Best regards.
Attachments:
read from txt file.vi 8 KBDear RavensFan,
Thank you very much for your helps, I am bit new to labview so I usually can not find the appropriate functions easily. And a new problem has rised in my application. I should write the A, B and C numbers in the respective series to the file 2.txt. I am able to write them in a straight forward case but I want to write the next triples (A B C) in the next row. Like this;
A1 B1 C1
A2 B2 C2
A3 B3 C3
So how can I put new line constant and space constant to my VI?
Waiting for your valuable helps,
Best regards,
Attachments:
read_from_txt_fileMOD.vi 18 KB -
How to get Text from (.txt) file to display in the JTextArea ?
How to get Text from (.txt) file to display in the JTextArea ?
is there any code please tell me i am begginer and trying to get data from a text file to display in the JTextArea /... please help...public static void readText() {
try {
File testFile = new File(WorkingDirectory + "ctrlFile.txt");
if (testFile.exists()){
BufferedReader br = new BufferedReader(new FileReader("ctrlFile.txt"));
String s = br.readLine();
while (s != null) {
System.out.println(s);
s = br.readLine();
br.close();
catch (IOException ex){ex.printStackTrace();}
}rykk -
How to remove character from cube
Dear Friends,
How to remove character from info cube.
I have removed from info source and update rules.
but unable to remove from cube.
Regards
RamuHi,
If you are working in BI 7.0, then you can use remodelling to remove the characteristic from the cube without deleting the data.
But, if you are working in BW3.x, then definately you need to first delete the data, then delete the characteristic and then again activate the cube and load the data.
There is no other solution except the above one... -
Apostroph and euro sign not read corectly from txt file
apostroph and euro sign not read corectly from txt file.
my code is like this:
FileInputStream fis= new FileInputStream(x+".html");
BufferedReader br=new BufferedReader(new InputStreamReader(fis,"UTF-8"));
String Line="";
while ((Line = br.readLine()) != null) result+=Line;
br.close();
fis.close();
I use UTF-8 because the file contains also French characters.
What's the problem?
THANK YOU!apostroph and euro sign not read corectly from txt
file.
my code is like this:
FileInputStream fis= new FileInputStream(x+".html");
BufferedReader br=new BufferedReader(new
InputStreamReader(fis,"UTF-8"));
String Line="";
while ((Line = br.readLine()) != null) result+=Line;
br.close();
fis.close();
I use UTF-8 because the file contains also French
characters.
What's the problem?
THANK YOU!
This is from the FileInputStream API documentation:
FileInputStream is meant for reading streams of raw bytes such as image data. For reading streams of characters, consider using FileReader. -
Auto delete everything but specified folder contents from txt file
Hey Guys,
I am brand new to using Powershell (like 48 hours into using it for work) and I've run into a bit of an issue. I've only taken a programming concept classes so some of the stuff makes sense to me but a lot of it is new. Basically I've made a
script that automatically deletes any files over X amount of days. My next step is to have an exceptions text that will have a list of folders that should not have its contents deleted. This is what I have so far.
$Date= Get-Date
$Days = "7"
$Folder = "C:\publicftp\users"
$LastWrite = $Now.AddDays(-$Days)
#----- getting DO NOT DELETE listing from TXT ----#
$Exceptions = Get-Content "c:\exclude.txt"
$Files = Get-Childitem $Folder -Recurse -Exclude "c:\exclude.txt" | Where {$_.LastWriteTime -le "$LastWrite"}
foreach ($File in $Files)
if ($File -ne $NULL)
Remove-Item $File.FullName -Exclude $Exceptions | out-null
I've seen a lot of threads that show how to auto delete contents or how to exclude specific file types but I haven't seen an answer to my particular problem. Any help would be greatly appreciated! Thanks!Hi Rabbot,
The script below may be also helpful for you, and uses the -whatif parameter in Remove-Item cmdlet, which doesn’t actually remove anything but simply tells you what would happen if you did call Remove-Item.
$Exceptions = @()
Get-Content "c:\exclude.txt" | foreach{
$Exceptions += $_} #store the exception file to array
$Folder = "C:\publicftp\users"
$LastWrite = (get-date).adddays(-7) #over 7 days.
$Files = Get-Childitem $Folder -Recurse | Where {$_.LastWriteTime -le $LastWrite} #filter files which over 7 days.
Foreach ($file in $files){
if ($Exceptions -notcontains $file.fullname){ #if the file is not listed in the exception array.
Remove-Item $File.FullName -whatif} #use -whatif to test
I hope this helps. -
SQL Loader problem while loading records from txt file to database table.
I am getting following error while loading records from flat txt file into database table with the help of 'sqlldr' command. I have executed catldr.sql from RDBMS folder but it is still showing same error. I am setting DIRECT = TRUE while issuing sqlldr command. If I try with DIRECT = FALSE then it works fine. Database is Oracle 8i.
SQL*Loader-951: Error calling once/load initialization
ORA-24329: invalid character set identifier
F1 Please.Hello,
Direct path load, can only be used with SQL*Loader and Database have the same version.
Care to tell the database version and sql*loader version you are using.
-Sri -
Scenario to read from txt-file and create a sales order
Hi,
i have started creating a scenario to read from an txt-file and to create a sales order.
When i activate my scenario, i get the following message :
no scenario step (vBIU) associated for this step for the incoming system (SysId)
When i look into the detailed xml-file i see that all the records are read from the file, but there is no next step to be treated.
Has somebody any idea how this come ?
-<Msg MessageLog="true" msglogexcl="false" logmsg="0009" recording="true" BeginTimeStamp="20111202095144" MessageId="11120209514499820828C0A801674F24" xmlns="urn:com.sap.b1i.vplatform:entity">-<Header><msglog b1ifactive="true" always="false" step="Default message log"/>-<Resumption><starter ipo="/vP.0010000138.in_FEAN/com.sap.b1i.vplatform.runtime/INB_FI_EXST_ASYN_NAM/INB_FI_EXST_ASYN_NAM.ipo/proc"/></Resumption><IPO tid="11120205535899820808C0A801678C54" Id="INB_FI_EXST_ASYN_NAM"/><Sender Id="0010000138"/><Inbound file="ORDERS_TEST" ext="csv" path="C:\TEMP\In" pltype="txt" wrap="" deli=";"/></Header>-<Body><Payload Type="File exist" Role="T"/>-<Payload Role="S">-<io xmlns="urn:com.sap.b1i.bizprocessor:bizatoms" pltype="txt">
-<row>
<col>OH</col>
<col>0000087077</col>
<col>201110041205</col>
<col>220</col>
<col>9</col>
<col>201110191702</col>
<col>8710624300012</col>
<col>8714252008609</col>
<col>8710624300012</col>
<col>8714252008609</col>
<col>8710624300012</col>
<col>N</col>
<col>N</col>
<col>N</col>
</row>
-<row>
<col>OL</col>
<col>1</col>
<col>8711715844378</col>
<col>20</col>
</row>-<row>
<col>OL</col>
<col>2</col>
<col>8711715844392</col>
<col>60</col>
</rowrow>
<col>OL</col>
<col>16</col>
<col>8710251791092</col>
<col>280</col>
</row>
</io>
</Payload>
</Body>
</Msg>
This is my final atom :
<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:b1e="urn:com.sap.b1i.sim:b1event" xmlns:b1ie="urn:com.sap.b1i.sim:b1ievent" xmlns:bfa="urn:com.sap.b1i.bizprocessor:bizatoms" xmlns:jdbc="urn:com.sap.b1i.adapter:jdbcadapter" xmlns:rfc="urn:sap-com:document:sap:rfc:functions" xmlns:sim="urn:com.sap.b1i.sim:entity" xmlns:utils2="com.sap.b1i.bpc_tools.Utilities" xmlns:vpf="urn:com.sap.b1i.vplatform:entity" xmlns:xci="urn:com.sap.b1i.xcellerator:intdoc" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" bfa:force="" vpf:force="" jdbc:force="" rfc:force="" b1ie:force="" b1e:force="" xci:force="" sim:force="" utils2:force=""><xsl:output method="xml" encoding="UTF-8" indent="yes"></xsl:output><xsl:param name="atom"></xsl:param><xsl:param name="sessionid"></xsl:param><xsl:variable name="msg" select="/vpf:Msg/vpf:Body/vpf:Payload[./@Role='S']"></xsl:variable><xsl:variable name="vpSender" select="/vpf:Msg/vpf:Header/vpf:Sender/@Id"></xsl:variable><xsl:variable name="vpObject" select="/vpf:Msg/vpf:Header/vpf:Sender/@ObjId"></xsl:variable><xsl:variable name="vpReceiver" select="/vpf:Msg/vpf:Header/vpf:ReceiverList/vpf:Receiver[./@handover='P']/@Id"></xsl:variable><xsl:template match="/">
<Msg xmlns="urn:com.sap.b1i.vplatform:entity">
<xsl:copy-of select="/vpf:Msg/@*"></xsl:copy-of>
<xsl:copy-of select="/vpf:Msg/vpf:Header"></xsl:copy-of>
<Body>
<xsl:copy-of select="/vpf:Msg/vpf:Body/*"></xsl:copy-of>
<Payload Role="R" id="{$atom}">
<xsl:call-template name="transform"></xsl:call-template>
</Payload>
</Body>
</Msg>
</xsl:template><xsl:template name="transform">
<FinalAtomResult xmlns="">
<BOM>
<BO>
<AdmInfo>
<Object>17</Object>
<Version>2</Version>
</AdmInfo>
<Documents>
<row>
<DocDate>
<xsl:copy-of select="$msg/io/row[0]/col[2]/text()"></xsl:copy-of>
</DocDate>
<DocDueDate>
<xsl:copy-of select="$msg/io/row[0]/col[5]/text()"></xsl:copy-of>
</DocDueDate>
<CardCode>KD10251</CardCode>
<NumAtCard>
<xsl:copy-of select="$msg/io/row[0]/col[1]/text()"></xsl:copy-of>
</NumAtCard>
<U_PMX_JD_COMP>32</U_PMX_JD_COMP>
</row>
</Documents>
<Document_Lines>
<xsl:for-each select="$msg/io/row">
<row>
<BarCode>
<xsl:copy-of select="$msg/io/row[*]/col[2]/text()"></xsl:copy-of>
</BarCode>
<Quantity>
<xsl:copy-of select="$msg/io/row[*]/col[3]/text()"></xsl:copy-of>
</Quantity>
</row>
</xsl:for-each>
</Document_Lines>Mike,
you were right, you may not specify the extension of a file.
Another thing i detected is that the loop of my data start with the index 1 instead of 0 !!!
In this scenario, i have to read all the lines of the file and each time i should do a SQL-query,
so that i can use the result to build my sales document.
Do you know if it this is possible or have you any idea how to do this ?
thx,
Mario -
Acrobat 8 standard - Removing pictures from PDF files
I hope this is an easy one to answer but I'm having troubles removing pictures from a PDF file and I need some help, can anyone answer please?
If standard has the Object touchup tool, you can select them and then delete them. I suspect that this may have the same problem as the redact tool as mentioned by graffiti.
-
Text layers from .txt file for buisness cards
I have a template for a business card that I created for a company. So imagine I have a background layer which is the card itself, and above that a layer for each string of text on the card (name, title, phone, email). Up until now, I would manually enter all the information using the Type tool to edit each text layer. However, it has become very tedious and I know there has to be a much easier way to do this. I'm looking for a way to automate this process. So far I have created an Excel database of all the employees, and I export each employees information to a .txt file that looks like this:
John Doe
Job Title
123-456-7890
123-456-7890
[email protected]
Each line in the .txt file corresponds to a text layer on the .psd. I've tried following a tutorial from the web (kirupa.com - Photoshop Scripting) but he is creating them in batches which is not what I need to do. And quite frankly, it's a bit over my head. I know scripting must be the way, but unfortunately I don't know much about JaveScript or any other language for that matter.
I know it's a lot to ask for, but if anyone could show me how to write a simple script for this or point me in the right direction, it would be much appreciated. And I mean MUCH!Hey man, that was spot on! This does exactly what I was looking for, now scripting required. Thanks for the help, I really appreciate it.
-
Remove Namespace from XML File except Attribute
Hi XI Experts ,
1.I have referred to the code of xslt Generic XSLT Code to Remove ALL Namespaces from XML:
http://forums.sdn.sap.com/thread.jspa?threadID=1920630
But this removes the Attribute : id from the records .
My expected output is supposed to be :
<?xml version="1.0" encoding="GBK"?>
<body>
<head>
<nsrsbh>112001069711</nsrsbh>
<nsrmc>诺维信(中国)生物技术有限公司出口发票</nsrmc>
<dcrq>20120209</dcrq>
<sssq_q>20111201</sssq_q>
<sssq_z>20120207</sssq_z>
<records>4</records>
</head>
<data>
<record id="1">
<fpdm></fpdm>
</record>
</data>
</body
But after using this XSLT code it removes :id from <record_1 id=> and generated the below code :
The xml file now doesn't contain teh attribute :id
<?xml version="1.0" encoding="GBK"?>
<body>
<head>
<nsrsbh>112001069711</nsrsbh>
<nsrmc>诺维信(中国)生物技术有限公司出口发票</nsrmc>
<dcrq>20120209</dcrq>
<sssq_q>20111201</sssq_q>
<sssq_z>20120207</sssq_z>
<records>4</records>
</head>
<data>
<record>
1
<fpdm></fpdm>
</record>
</data>
</body>
Could you please provide your input
Plaese note : Here XI versin iS x1 3.0 SP7 . I have tried suing the Analyzer bean for the Encoing of Chinese : GBK Intsead of UTF-8 in the Namespace . But AF_Modules/XMLAnonymizerBean is not comptacible with XI 3.0 SP7
Hence i have used the following code to remove namespcae and add Encoding :GBK instead of UTF-8:
<?xml version="1.0" ?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output encoding="GBK"/>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>You could use exclude-result-prefixes.
For example:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:wt="http://www.example.com" exclude-result-prefixes="wt">
</xsl:stylesheet> -
Remove password from .pst file
Dear Support,
How to remove forgetten password from .pst file.
I use OS win7 professional and Ms office 2013. So please help me for removing forgetting pst password.
When I add pst file in new outlook. Then Pst file ask password.
please help me.
I will be thank ful to you.the goals of a password is to protect the contents from anyone who does not know the password.
As far as I know, there are no tools provided by Microsoft to remove, alter or read the password from a protected pst file. It might even violate local laws to do so.
https://support.office.com/en-ca/article/I-forgot-my-Personal-Folders-file-pst-password-cfaec399-0de7-4f8f-a81b-918b38867ed6
Some third parties might claim to have tools that remove, alter or read the pst password, but I should urge you to be prudent when testing/using such tools (or paying for them).
MCP/MCSA/MCTS/MCITP
Maybe you are looking for
-
How to print certain text on user selected documents?
Hi, This question is related to SD. I need to know whether is it posibble for us to create something like checkboxes for users to choose which document they want the text to be printed onto. Example #1: As per customer requests on LC, this text "Bank
-
Exchange rate as optional mode in MIRO Tcode
Dear All Expert, How can we kept exchange rate as optional mode in MIRO Tcode? Thanks & Regards Santosh Kadam
-
Hi all During capturing the excise invoice in J1IG it capture full excise amount , cess & Ecess for the partial Qty GRN also E.g if PO is for 100 qty & Excise duty is say 8000 Rs & GRN is made for 50 qty in this case while capturing excise invoice in
-
Payment release workflow thru F-53 Transaction help needed
Hi gurus, I am trying for payment release workflow using F-53 which is the client requirement. As there is no parking option in the transaction i created a custom event "parked" in the transaction .I tried using BTE. but i m not able to find the righ
-
Chapter ID and CENVAT mass maintenance prob( india scenario)
Dear Friends, Through Existing LSMW, I am able to create the CH ID & CENVAT Field. When i need to overwrite the same, the message given by system is SV 009 "an entry already exist with this messege". Pls. Suggest the solution. This is requred for Mas