Problem in reading file contents in to inernal table
i have a problem with the archive file
actually i have created archive files in SAP file system i stored the archive file in a external repository.
now i like to access one of the archive file i want to read the contents of the file in to a internal table.
the starting of the file contains some unique document number i need to able to capture that document number.
i am able to read the contents from archive file but the contents are unknown charecters.
i used open data set to read the contents of the file , but i cannot resolve these unknown charecters.
Call transactions
- SARA Archive Administration
- AOBJ to find the read program (if exists) associated to the archive object
More information on [Archive Administration|http://help.sap.com/saphelp_smehp1/helpdata/en/8d/3e4d70462a11d189000000e8323d3a/frameset.htm] and [Archive Development Kit|http://help.sap.com/saphelp_smehp1/helpdata/en/2a/fa0391493111d182b70000e829fbfe/frameset.htm]
Regards,
Raymond
Similar Messages
-
Problem of reading the content of this .txt files
currently i have a problem of reading the content of this file castle.txt
#Server Ready.
Lee Siaw Kang 50256808:08:382004/03/15Abdul Rahman 60296008:13:242004/03/15Kenneth Lee 60299308:13:532004/03/15Ho Kid Peng 31337508:17:442004/03/15Tonny Sherbern 50271108:19:132004/03/15Frederick Foh 50257908:20:212004/03/15Jason Kho 61702908:21:312004/03/15Lois Lee Liarn Huee 61897408:22:522004/03/15Victor Palau Udih 31337308:23:202004/03/15Michelle Sim 61899008:27:412004/03/15Alan Hong 50262708:30:312004/03/15Frederick Foh 50257908:33:412004/03/15Douglas Aseng 50255808:36:442004/03/15Atika Abang 31347508:36:592004/03/15David Dzrandinuraidi 61239608:38:012004/03/15Sentia Brangking 61896808:39:502004/03/15Dinah Samuel 61704608:40:582004/03/15Dr. Anderson Tiong 61702508:42:102004/03
it is something like this ...i want to break it into readable format ...i have tried vector with is the following code.
import java.util.*;
import java.io.*;
public class parseCastle {
public static Vector parseInfo(String str) {
int recordSize = 59;
Vector v = new Vector();
for (int i=0; i<str.length(); i+=recordSize) {
String str1 = str.substring(i, i+recordSize);
Vector vi = new Vector();
vi.addElement(str1.substring(0, 35));
vi.addElement(str1.substring(35, 41));
vi.addElement(str1.substring(41, 49));
vi.addElement(str1.substring(49, 59));
v.addElement(vi);
return v;
//constructor
parseCastle(){
try
FileInputStream fin = new FileInputStream("castle.txt");
File fprop = new File("castle.txt");
byte[] data = new byte[(int)fprop.length()];
int total = fin.read(data);
if (total != data.length) {
System.err.println("Error loading file");
return;
//System.out.println(data.length);
Vector v = parseInfo(new String(data));
for (int i=0; i<v.size(); i++) {
Vector vi = (Vector)v.elementAt(i);
for (Enumeration e = vi.elements(); e.hasMoreElements();)
System.out.println(e.nextElement());
System.out.println();
//*** Alternative ***
//for (int k=0; k<vi.size(); k++)
// System.out.println(vi.elementAt(k));
catch (IOException e)
System.out.println("Error: "+e);
e.printStackTrace();
But it gave me error. like it exceeds array boundary...can someone expert help me outYou should be aware that these kind of effort always involves certain amount of risk because the proper record format is not hundred percent guaranteed. So, make sure to use properly formatted file, or genuine database instead.
import java.io.*;
import java.util.regex.*;
public class ParseCastle2{
public static void main(String[] args) throws Exception{
String line, data;
BufferedReader br = new BufferedReader(new FileReader("castle.txt"));
br.readLine(); //discard #Server Ready line
line = br.readLine();
Pattern pat = Pattern.compile("([ .A-Za-z]+)([/0-9:]+)");
Matcher mat = pat.matcher(line);
Pattern subPat = Pattern.compile("(\\d+):(\\d\\d:\\d\\d)(.+)");
while (mat.find()){
System.out.println(mat.group()); // if name only, use group(1) ... beware trailing space
data = mat.group(2);
Matcher subMat = subPat.matcher(data);
while (subMat.find()){
System.out.println(" cdID = " + subMat.group(1));
System.out.println(" Time = " + subMat.group(2));
System.out.println(" Date = " + subMat.group(3)); -
Reading file content into internal table
Hi All,
I'm facing problem reading pdf file content into an internal table. I need to read this file from communication server (neither presentation nor application server). I have tried gui_upload , it is working fine but it does not work in batch jobs. Open dataset in binary mode is also not helping much. Could anyone help ?
Thanks a lot"open dataset <filepath> for input in binary mode" should work.... what does it say when you try this?
Thanks
Muktar -
How to add do not read file content option inside File Adapter (Synch Read)
Hi,
Is there any way, that I can skip reading the file content inside file adapter with operation as Synchronous Read ( I just want to read the file name and directory and if the file name matches with the input variables then I have to delete the files, for this i am using FA with synch read operation, everything is fine like deletion, but it is reading the file content and storing it in DB, i dont want this) .This will solve your problem.
http://docs.oracle.com/cd/E23943_01/integration.1111/e10231/adptr_file.htm#CHDHIEBI
HTH.
Puneet. -
Hi,
I have a file with these contents
�One�
Hello Man. h
�Two�
This is the body of the message, which can go on for as long as possible.
which can go on for as long as possible. This is the body of the message, which can go on for as long as possible. This is the body of the message, which can go on for as long as possible.
MessengerI am using this code to read the contents of the file
try
DataInputStream msgFile = new DataInputStream(new FileInputStream(fileName));
String str = "";
while((str=msgFile.readLine())!= null)
if(str.equalsIgnoreCase("�One�") )
String one = msgFile.readLine().trim();
if(str.equalsIgnoreCase("�To�") )
String two = msgFile.readLine().trim();
} When I try to print String "two", I get only
This is the body of the message, which can go on for as long as possible. as I am using readLine() method
Is there a way I can solve this problem to read until the end of the file?
Mathewtry something like this
BufferedReader in = new BufferedReader(new FileReader(fileName));
data = in.readLine();
while (data != null) {
// Here is your line, do what ever you want to do
data = in.readLine();
} -
Problem while reading file using UTL_FILE.get_line
Hi All,
I am having the following txt file with the following data.
1|2010-09-25T02:00:24+09:00
2|ProductCode|SerialNumber|OpcoID|IssueDate|AcceptDate|FinishingUsageCounter.FoldZ|FinishingUsageCounter.FoldLetterZ|FinishingUsageCounter.FoldLetterC|FinishingUsageCounter.FoldCenter|FinishingUsageCounter.Punch2|FinishingUsageCounter.Punch3|FinishingUsageCounter.Punch4|FinishingUsageCounter.StapleSingle|FinishingUsageCounter.StapleDual|FinishingUsageCounter.StapleQuad|FinishingUsageCounter.BindBook|FinishingUsageCounter.CoilPunch|FinishingUsageCounter.Trimming|FinishingUsageCounter.SquareFold|FAXUsageCounter.SendCount|FAXUsageCounter.SendImpressions|FAXUsageCounter.ReceivedCount0|FAXUsageCounter.ReceivedCount1|FAXUsageCounter.ReceivedCount2|FAXUsageCounter.ReceivedCount3|FAXUsageCounter.ReceivedCount4|FAXUsageCounter.ReceivedCount5|FAXUsageCounter.ReceivedImpressions0|FAXUsageCounter.ReceivedImpressions1|FAXUsageCounter.ReceivedImpressions2|FAXUsageCounter.ReceivedImpressions3|FAXUsageCounter.ReceivedImpressions4|FAXUsageCounter.ReceivedImpressions5|FAXUsageCounter.PrintImpressions0|FAXUsageCounter.PrintImpressions1|FAXUsageCounter.PrintImpressions2|FAXUsageCounter.PrintImpressions3|FAXUsageCounter.PrintImpressions4|FAXUsageCounter.PrintImpressions5|FAXUsageCounter.StoreForPollingPrintImpressions|FAXUsageCounter.PrintSheets0|FAXUsageCounter.PrintSheets1|FAXUsageCounter.PrintSheets2|FAXUsageCounter.PrintSheets3|FAXUsageCounter.PrintSheets4|FAXUsageCounter.PrintSheets5|FAXUsageCounter.StoreForPollingPrintSheets|FAXUsageCounter.PrintDuplexSheets0|FAXUsageCounter.PrintDuplexSheets1|FAXUsageCounter.PrintDuplexSheets2|FAXUsageCounter.PrintDuplexSheets3|FAXUsageCounter.PrintDuplexSheets4|FAXUsageCounter.PrintDuplexSheets5|FAXUsageCounter.StoreForPollingPrintDuplexSheets|FAXUsageCounter.PrintReverseSheets0|FAXUsageCounter.PrintReverseSheets1|FAXUsageCounter.PrintReverseSheets2|FAXUsageCounter.PrintReverseSheets3|FAXUsageCounter.PrintReverseSheets4|FAXUsageCounter.PrintReverseSheets5|FAXUsageCounter.StoreForPollingPrintReverseSheets|FAXUsageCounter.PrintLargeSheets0|FAXUsageCounter.PrintLargeSheets1|FAXUsageCounter.PrintLargeSheets2|FAXUsageCounter.PrintLargeSheets3|FAXUsageCounter.PrintLargeSheets4|FAXUsageCounter.PrintLargeSheets5|IFAXUsageCounter.SendCount|IFAXUsageCounter.SendImpressions|IFAXUsageCounter.ReceivedCount|IFAXUsageCounter.ReceivedImpressions|IFAXUsageCounter.PrintImpressions|IFAXUsageCounter.PrintSheets|IFAXUsageCounter.PrintDuplexSheets|IFAXUsageCounter.PrintReverseSheets|IFAXUsageCounter.PrintLargeSheets|DirectFAXUsageCounter.SendCount|DirectFAXUsageCounter.SendImpressions|ServerFAXUsageCounter.SendCount|ServerFAXUsageCounter.SendImpressions|ScanUsageCounter.BWImpressions|ScanUsageCounter.ColorImpressions|ScanUsageCounter.MailboxBWImpressions|ScanUsageCounter.MailboxColorImpressions|ScanUsageCounter.FileBWImpressions|ScanUsageCounter.FileColorImpressions|ScanUsageCounter.EMailBWImpressions|ScanUsageCounter.EMailColorImpressions|ScanUsageCounter.MediaBWImpressions|ScanUsageCounter.MediaColorImpressions|PrintUsageCounter.BWImpressions|PrintUsageCounter.ColorImpressions|PrintUsageCounter.BW2upImpressions|PrintUsageCounter.Color2upImpressions|PrintUsageCounter.BWNupImpressions|PrintUsageCounter.ColorNupImpressions|PrintUsageCounter.BWSheets|PrintUsageCounter.ColorSheets|PrintUsageCounter.BWDuplexSheets|PrintUsageCounter.ColorDuplexSheets|PrintUsageCounter.BWReverseSheets|PrintUsageCounter.ColorReverseSheets|PrintUsageCounter.BWLargeSheets|PrintUsageCounter.ColorLargeSheets|DiagPrintUsageCounter.BWImpressions|DiagPrintUsageCounter.ColorImpressions|DiagPrintUsageCounter.BWSheets|DiagPrintUsageCounter.ColorSheets|DiagPrintUsageCounter.BWLargeSheets|DiagPrintUsageCounter.ColorLargeSheets|CopyUsageCounter.BWImpressions|CopyUsageCounter.ColorImpressions|CopyUsageCounter.BW2upImpressions|CopyUsageCounter.Color2upImpressions|CopyUsageCounter.BWNupImpressions|CopyUsageCounter.ColorNupImpressions|CopyUsageCounter.BWSheets|CopyUsageCounter.ColorSheets|CopyUsageCounter.BWDuplexSheets|CopyUsageCounter.ColorDuplexSheets|CopyUsageCounter.BWReverseSheets|CopyUsageCounter.ColorReverseSheets|CopyUsageCounter.BWLargeSheets|CopyUsageCounter.ColorLargeSheets|ReportUsageCounter.BWImpressions|ReportUsageCounter.ColorImpressions|ReportUsageCounter.BWSheets|ReportUsageCounter.ColorSheets|ReportUsageCounter.BWDuplexSheets|ReportUsageCounter.ColorDuplexSheets|ReportUsageCounter.BWReverseSheets|ReportUsageCounter.ColorReverseSheets|ReportUsageCounter.BWLargeSheets|ReportUsageCounter.ColorLargeSheets|LargeSizeUsageCounter.BWImpressions|LargeSizeUsageCounter.ColorImpressions|PaperSizeUsageCounter.A4|PaperSizeUsageCounter.UNSPECIFIED|FAXUsageCounter.SendCount0|FAXUsageCounter.SendCount1|FAXUsageCounter.SendCount2|FAXUsageCounter.SendCount3|FAXUsageCounter.SendCount4|FAXUsageCounter.SendCount5|FAXUsageCounter.SendImpressions0|FAXUsageCounter.SendImpressions1|FAXUsageCounter.SendImpressions2|FAXUsageCounter.SendImpressions3|FAXUsageCounter.SendImpressions4|FAXUsageCounter.SendImpressions5|FAXUsageCounter.PrintBW2upImpressions|FAXUsageCounter.BW1ImpressionJob|FAXUsageCounter.BW2ImpressionsJob|FAXUsageCounter.BW3ImpressionsJob|FAXUsageCounter.BW4ImpressionsJob|FAXUsageCounter.BW5ImpressionsJob|FAXUsageCounter.BW6ImpressionsJob|FAXUsageCounter.BW7ImpressionsJob|FAXUsageCounter.BW8ImpressionsJob|FAXUsageCounter.BW9ImpressionsJob|FAXUsageCounter.BW10To19ImpressionsJob|FAXUsageCounter.BW20To29ImpressionsJob|FAXUsageCounter.BW30To49ImpressionsJob|FAXUsageCounter.BW50To74ImpressionsJob|FAXUsageCounter.BW75To99ImpressionsJob|FAXUsageCounter.BW100To249ImpressionsJob|FAXUsageCounter.BWOver250ImpressionsJob|FAXUsageCounter.TotalTimeSent0|FAXUsageCounter.TotalTimeSent1|FAXUsageCounter.TotalTimeSent2|FAXUsageCounter.TotalTimeSent3|FAXUsageCounter.TotalTimeSent4|FAXUsageCounter.TotalTimeSent5|FAXUsageCounter.TotalTimeReceived0|FAXUsageCounter.TotalTimeReceived1|FAXUsageCounter.TotalTimeReceived2|FAXUsageCounter.TotalTimeReceived3|FAXUsageCounter.TotalTimeReceived4|FAXUsageCounter.TotalTimeReceived5|IFAXUsageCounter.Print2upImpressions|IFAXUsageCounter.BW1ImpressionJob|IFAXUsageCounter.BW2ImpressionsJob|IFAXUsageCounter.BW3ImpressionsJob|IFAXUsageCounter.BW4ImpressionsJob|IFAXUsageCounter.BW5ImpressionsJob|IFAXUsageCounter.BW6ImpressionsJob|IFAXUsageCounter.BW7ImpressionsJob|IFAXUsageCounter.BW8ImpressionsJob|IFAXUsageCounter.BW9ImpressionsJob|IFAXUsageCounter.BW10To19ImpressionsJob|IFAXUsageCounter.BW20To29ImpressionsJob|IFAXUsageCounter.BW30To49ImpressionsJob|IFAXUsageCounter.BW50To74ImpressionsJob|IFAXUsageCounter.BW75To99ImpressionsJob|IFAXUsageCounter.BW100To249ImpressionsJob|IFAXUsageCounter.BWOver250ImpressionsJob|DirectFAXUsageCounter.SendCount0|DirectFAXUsageCounter.SendCount1|DirectFAXUsageCounter.SendCount2|DirectFAXUsageCounter.SendCount3|DirectFAXUsageCounter.SendCount4|DirectFAXUsageCounter.SendCount5|DirectFAXUsageCounter.SendImpressions0|DirectFAXUsageCounter.SendImpressions1|DirectFAXUsageCounter.SendImpressions2|DirectFAXUsageCounter.SendImpressions3|DirectFAXUsageCounter.SendImpressions4|DirectFAXUsageCounter.SendImpressions5|PrintUsageCounter.BW2upSimplexImpressions|PrintUsageCounter.Color2upSimplexImpressions|PrintUsageCounter.BW2upDuplexImpressions|PrintUsageCounter.Color2upDuplexImpressions|PrintUsageCounter.BW4upSimplexImpressions|PrintUsageCounter.Color4upSimplexImpressions|PrintUsageCounter.BW4upDuplexImpressions|PrintUsageCounter.Color4upDuplexImpressions|PrintUsageCounter.BWNupSimplexImpressions|PrintUsageCounter.ColorNupSimplexImpressions|PrintUsageCounter.BWNupDuplexImpressions|PrintUsageCounter.ColorNupDuplexImpressions|PrintUsageCounter.BW1ImpressionJob|PrintUsageCounter.BW2ImpressionsJob|PrintUsageCounter.BW3ImpressionsJob|PrintUsageCounter.BW4ImpressionsJob|PrintUsageCounter.BW5ImpressionsJob|PrintUsageCounter.BW6ImpressionsJob|PrintUsageCounter.BW7ImpressionsJob|PrintUsageCounter.BW8ImpressionsJob|PrintUsageCounter.BW9ImpressionsJob|PrintUsageCounter.BW10To19ImpressionsJob|PrintUsageCounter.BW20To29ImpressionsJob|PrintUsageCounter.BW30To49ImpressionsJob|PrintUsageCounter.BW50To74ImpressionsJob|PrintUsageCounter.BW75To99ImpressionsJob|PrintUsageCounter.BW100To249ImpressionsJob|PrintUsageCounter.BWOver250ImpressionsJob|PrintUsageCounter.Color1ImpressionJob|PrintUsageCounter.Color2ImpressionsJob|PrintUsageCounter.Color3ImpressionsJob|PrintUsageCounter.Color4ImpressionsJob|PrintUsageCounter.Color5ImpressionsJob|PrintUsageCounter.Color6ImpressionsJob|PrintUsageCounter.Color7ImpressionsJob|PrintUsageCounter.Color8ImpressionsJob|PrintUsageCounter.Color9ImpressionsJob|PrintUsageCounter.Color10To19ImpressionsJob|PrintUsageCounter.Color20To29ImpressionsJob|PrintUsageCounter.Color30To49ImpressionsJob|PrintUsageCounter.Color50To74ImpressionsJob|PrintUsageCounter.Color75To99ImpressionsJob|PrintUsageCounter.Color100To249ImpressionsJob|PrintUsageCounter.ColorOver250ImpressionsJob|CopyUsageCounter.BW2upSimplexImpressions|CopyUsageCounter.Color2upSimplexImpressions|CopyUsageCounter.BW2upDuplexImpressions|CopyUsageCounter.Color2upDuplexImpressions|CopyUsageCounter.BW4upSimplexImpressions|CopyUsageCounter.Color4upSimplexImpressions|CopyUsageCounter.BW4upDuplexImpressions|CopyUsageCounter.Color4upDuplexImpressions|CopyUsageCounter.BWNupSimplexImpressions|CopyUsageCounter.ColorNupSimplexImpressions|CopyUsageCounter.BWNupDuplexImpressions|CopyUsageCounter.ColorNupDuplexImpressions|CopyUsageCounter.BWSimplexToDuplexSheets|CopyUsageCounter.ColorSimplexToDuplexSheets|CopyUsageCounter.BWDuplexToDuplexSheets|CopyUsageCounter.ColorDuplexToDuplexSheets|CopyUsageCounter.BWSimplexToSimplexSheets|CopyUsageCounter.ColorSimplexToSimplexSheets|CopyUsageCounter.BWDuplexToSimplexSheets|CopyUsageCounter.ColorDuplexToSimplexSheets|CopyUsageCounter.BW1ImpressionJob|CopyUsageCounter.BW2ImpressionsJob|CopyUsageCounter.BW3ImpressionsJob|CopyUsageCounter.BW4ImpressionsJob|CopyUsageCounter.BW5ImpressionsJob|CopyUsageCounter.BW6ImpressionsJob|CopyUsageCounter.BW7ImpressionsJob|CopyUsageCounter.BW8ImpressionsJob|CopyUsageCounter.BW9ImpressionsJob|CopyUsageCounter.BW10To19ImpressionsJob|CopyUsageCounter.BW20To29ImpressionsJob|CopyUsageCounter.BW30To49ImpressionsJob|CopyUsageCounter.BW50To74ImpressionsJob|CopyUsageCounter.BW75To99ImpressionsJob|CopyUsageCounter.BW100To249ImpressionsJob|CopyUsageCounter.BWOver250ImpressionsJob|CopyUsageCounter.Color1ImpressionJob|CopyUsageCounter.Color2ImpressionsJob|CopyUsageCounter.Color3ImpressionsJob|CopyUsageCounter.Color4ImpressionsJob|CopyUsageCounter.Color5ImpressionsJob|CopyUsageCounter.Color6ImpressionsJob|CopyUsageCounter.Color7ImpressionsJob|CopyUsageCounter.Color8ImpressionsJob|CopyUsageCounter.Color9ImpressionsJob|CopyUsageCounter.Color10To19ImpressionsJob|CopyUsageCounter.Color20To29ImpressionsJob|CopyUsageCounter.Color30To49ImpressionsJob|CopyUsageCounter.Color50To74ImpressionsJob|CopyUsageCounter.Color75To99ImpressionsJob|CopyUsageCounter.Color100To249ImpressionsJob|CopyUsageCounter.ColorOver250ImpressionsJob|CopyUsageCounter.BW1OriginalJob|CopyUsageCounter.BW2OriginalsJob|CopyUsageCounter.BW3OriginalsJob|CopyUsageCounter.BW4OriginalsJob|CopyUsageCounter.BW5OriginalsJob|CopyUsageCounter.BW6OriginalsJob|CopyUsageCounter.BW7OriginalsJob|CopyUsageCounter.BW8OriginalsJob|CopyUsageCounter.BW9OriginalsJob|CopyUsageCounter.BW10To19OriginalsJob|CopyUsageCounter.BW20To29OriginalsJob|CopyUsageCounter.BW30To49OriginalsJob|CopyUsageCounter.BW50To74OriginalsJob|CopyUsageCounter.BW75To99OriginalsJob|CopyUsageCounter.BW100To249OriginalsJob|CopyUsageCounter.BWOver250OriginalsJob|CopyUsageCounter.Color1OriginalJob|CopyUsageCounter.Color2OriginalsJob|CopyUsageCounter.Color3OriginalsJob|CopyUsageCounter.Color4OriginalsJob|CopyUsageCounter.Color5OriginalsJob|CopyUsageCounter.Color6OriginalsJob|CopyUsageCounter.Color7OriginalsJob|CopyUsageCounter.Color8OriginalsJob|CopyUsageCounter.Color9OriginalsJob|CopyUsageCounter.Color10To19OriginalsJob|CopyUsageCounter.Color20To29OriginalsJob|CopyUsageCounter.Color30To49OriginalsJob|CopyUsageCounter.Color50To74OriginalsJob|CopyUsageCounter.Color75To99OriginalsJob|CopyUsageCounter.Color100To249OriginalsJob|CopyUsageCounter.ColorOver250OriginalsJob|PaperSizeUsageCounter.A3|PaperTrayUsageCounter.Tray1PrintedSheets|PaperTrayUsageCounter.Tray2PrintedSheets|PaperTrayUsageCounter.Tray3PrintedSheets|PaperTrayUsageCounter.Tray4PrintedSheets|PaperTrayUsageCounter.Tray5PrintedSheets|PaperTrayUsageCounter.Tray6PrintedSheets|PaperTrayUsageCounter.Tray7PrintedSheets|PaperTrayUsageCounter.Tray8PrintedSheets|PaperTrayUsageCounter.Tray1PrintedImpressions|PaperTrayUsageCounter.Tray2PrintedImpressions|PaperTrayUsageCounter.Tray3PrintedImpressions|PaperTrayUsageCounter.Tray4PrintedImpressions|PaperTrayUsageCounter.Tray5PrintedImpressions|PaperTrayUsageCounter.Tray6PrintedImpressions|PaperTrayUsageCounter.Tray7PrintedImpressions|PaperTrayUsageCounter.Tray8PrintedImpressions|StoredDocumentUsageCounter.UnprintedDeletedImpressions|UptimeUsageCounter.WarmUpTime|UptimeUsageCounter.IOTRunTime|UptimeUsageCounter.IITRunTime|UptimeUsageCounter.LowPowerTime|UptimeUsageCounter.SleepTime|UptimeUsageCounter.StandbyTime|UptimeUsageCounter.PowerOffTime
3|ABCDEF|110139|ABC|2010-09-24T12:32:00+09:00|2010-09-24T12:32:28+09:00|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||0|0|0|0|0|0|0|0|0|0|0|0|0|309|159|158|16|0|0|151|129|0|0|4709|2105|1971|704|2|0|2760|1407|1877|769|0|0|47|86|0|0|0|0|0|0|305|21|1|0|0|0|204|18|101|3|0|0|1|1|60|0|51|0|9|0|0|0|0|0|77|92|4309|0|0|5|0|0|0|0|0|19|0|0|0|0|0|1|0|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0|355|0|0|0|0|0|319|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|21|10|1950|694|0|0|2|0|0|0|2|0|422|292|60|38|24|18|18|26|8|60|34|20|3|0|0|0|233|138|36|30|10|20|9|11|7|27|17|6|2|1|0|0|1|0|0|0|0|0|0|0|0|0|0|0|5|1|96|2|103|15|0|0|84|7|0|4|1|0|0|0|0|0|1|0|0|0|1|0|13|4|0|0|0|0|0|0|0|0|0|0|0|0|0|0|80|12|0|3|1|0|0|0|0|1|0|0|1|0|0|0|14|3|0|0|0|0|0|0|0|0|0|0|0|0|0|0|135|3631|658|11|135|9|0|0|0|5901|1114|11|169|9|0|0|0|0|66|513|29|5715|102714|11941|28
3|ABCDEF|110139|ABC|2010-09-24T13:34:00+09:00|2010-09-24T13:34:16+09:00|0|0|0|0|0|0|0|0|0|0|0|0|0|0|5|19|0|6|0|0|0|0|0|4|0|0|0|0|0|4|0|0|0|0|0|0|4|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|309|159|158|16|0|0|151|129|0|0|4709|2105|1971|704|2|0|2760|1407|1877|769|0|0|47|86|0|0|0|0|0|0|305|21|1|0|0|0|204|18|101|3|0|0|1|1|60|0|51|0|9|0|0|0|0|0|77|92|4309|0|0|5|0|0|0|0|0|19|0|0|0|0|0|1|0|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0|355|0|0|0|0|0|319|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|21|10|1950|694|0|0|2|0|0|0|2|0|422|292|60|38|24|18|18|26|8|60|34|20|3|0|0|0|233|138|36|30|10|20|9|11|7|27|17|6|2|1|0|0|1|0|0|0|0|0|0|0|0|0|0|0|5|1|96|2|103|15|0|0|84|7|0|4|1|0|0|0|0|0|1|0|0|0|1|0|13|4|0|0|0|0|0|0|0|0|0|0|0|0|0|0|80|12|0|3|1|0|0|0|0|1|0|0|1|0|0|0|14|3|0|0|0|0|0|0|0|0|0|0|0|0|0|0|135|3631|658|11|135|9|0|0|0|5901|1114|11|169|9|0|0|0|0|66|513|29|5730|102741|11960|28
4|2010-09-25T02:00:24+09:00|2
Following is the code i am using to read the file contents.
DECLARE
v_file_in UTL_FILE.file_type;
v_str VARCHAR2 (32767);
po_error_txt VARCHAR2 (2000) := 0;
po_success boolean;
BEGIN
v_file_in := UTL_FILE.fopen ('GB_EPINDIR', 'USAGECOUNTER20100925020020.txt', 'R');
LOOP
BEGIN
UTL_FILE.get_line (v_file_in, v_str,32767);
dbms_output.put_line(v_str);
EXCEPTION
WHEN NO_DATA_FOUND THEN
EXIT;
WHEN OTHERS THEN
po_error_txt := SUBSTR (SQLERRM, 1, 500);
po_success := FALSE;
EXIT;
END;
END LOOP;
END;
When loop comes on 2|ProductCode|Serial................... its through the error.
Please help me to resolve this problem.
Thanks & Regards
Uzair Hasan Nizami
Edited by: Uzair Hasan Nizami on Oct 5, 2010 1:44 PMUzair Hasan Nizami wrote:
See You have changed the second line. I mean you have split the line in two parts.No, I did not. Used exactly as you posted. To prove I added line number display:
SQL> DECLARE
2 v_file_in UTL_FILE.file_type;
3 v_str VARCHAR2 (32767);
4 po_error_txt VARCHAR2 (2000) := 0;
5 po_success boolean;
6 v_line_num number := 0;
7 BEGIN
8 v_file_in := UTL_FILE.fopen ('GB_EPINDIR', 'USAGECOUNTER20100925020020.txt', 'R',32767);
9 LOOP
10 BEGIN
11 v_line_num := v_line_num + 1;
12 UTL_FILE.get_line (v_file_in, v_str,32767);
13 dbms_output.put_line('============= Line ' || v_line_num || ' =================');
14 dbms_output.put_line(v_str);
15 EXCEPTION
16 WHEN NO_DATA_FOUND THEN
17 EXIT;
18 WHEN OTHERS THEN
19 po_error_txt := SUBSTR (SQLERRM, 1, 500);
20 po_success := FALSE;
21 dbms_output.put_line(po_error_txt);
22 EXIT;
23 END;
24 END LOOP;
25 IF UTL_FILE.IS_OPEN(v_file_in) THEN UTL_FILE.FCLOSE(v_file_in); END IF;
26 END;
27 /
============= Line 1 =================
1|2010-09-25T02:00:24+09:00
============= Line 2 =================
2|ProductCode|SerialNumber|OpcoID|IssueDate|AcceptDate|FinishingUsageCounter.Fol
dZ|FinishingUsageCounter.FoldLetterZ|FinishingUsageCounter.FoldLetterC|Finishing
UsageCounter.FoldCenter|FinishingUsageCounter.Punch2|FinishingUsageCounter.Punch
3|FinishingUsageCounter.Punch4|FinishingUsageCounter.StapleSingle|FinishingUsage
Counter.StapleDual|FinishingUsageCounter.StapleQuad|FinishingUsageCounter.BindBo
ok|FinishingUsageCounter.CoilPunch|FinishingUsageCounter.Trimming|FinishingUsage
Counter.SquareFold|FAXUsageCounter.SendCount|FAXUsageCounter.SendImpressions|FAX
UsageCounter.ReceivedCount0|FAXUsageCounter.ReceivedCount1|FAXUsageCounter.Recei
vedCount2|FAXUsageCounter.ReceivedCount3|FAXUsageCounter.ReceivedCount4|FAXUsage
Counter.ReceivedCount5|FAXUsageCounter.ReceivedImpressions0|FAXUsageCounter.Rece
ivedImpressions1|FAXUsageCounter.ReceivedImpressions2|FAXUsageCounter.ReceivedIm
pressions3|FAXUsageCounter.ReceivedImpressions4|FAXUsageCounter.ReceivedImpressi
ons5|FAXUsageCounter.PrintImpressions0|FAXUsageCounter.PrintImpressions1|FAXUsag
eCounter.PrintImpressions2|FAXUsageCounter.PrintImpressions3|FAXUsageCounter.Pri
ntImpressions4|FAXUsageCounter.PrintImpressions5|FAXUsageCounter.StoreForPolling
PrintImpressions|FAXUsageCounter.PrintSheets0|FAXUsageCounter.PrintSheets1|FAXUs
ageCounter.PrintSheets2|FAXUsageCounter.PrintSheets3|FAXUsageCounter.PrintSheets
4|FAXUsageCounter.PrintSheets5|FAXUsageCounter.StoreForPollingPrintSheets|FAXUsa
geCounter.PrintDuplexSheets0|FAXUsageCounter.PrintDuplexSheets1|FAXUsageCounter.
PrintDuplexSheets2|FAXUsageCounter.PrintDuplexSheets3|FAXUsageCounter.PrintDuple
xSheets4|FAXUsageCounter.PrintDuplexSheets5|FAXUsageCounter.StoreForPollingPrint
DuplexSheets|FAXUsageCounter.PrintReverseSheets0|FAXUsageCounter.PrintReverseShe
ets1|FAXUsageCounter.PrintReverseSheets2|FAXUsageCounter.PrintReverseSheets3|FAX
UsageCounter.PrintReverseSheets4|FAXUsageCounter.PrintReverseSheets5|FAXUsageCou
nter.StoreForPollingPrintReverseSheets|FAXUsageCounter.PrintLargeSheets0|FAXUsag
eCounter.PrintLargeSheets1|FAXUsageCounter.PrintLargeSheets2|FAXUsageCounter.Pri
ntLargeSheets3|FAXUsageCounter.PrintLargeSheets4|FAXUsageCounter.PrintLargeSheet
s5|IFAXUsageCounter.SendCount|IFAXUsageCounter.SendImpressions|IFAXUsageCounter.
ReceivedCount|IFAXUsageCounter.ReceivedImpressions|IFAXUsageCounter.PrintImpress
ions|IFAXUsageCounter.PrintSheets|IFAXUsageCounter.PrintDuplexSheets|IFAXUsageCo
unter.PrintReverseSheets|IFAXUsageCounter.PrintLargeSheets|DirectFAXUsageCounter
.SendCount|DirectFAXUsageCounter.SendImpressions|ServerFAXUsageCounter.SendCount
|ServerFAXUsageCounter.SendImpressions|ScanUsageCounter.BWImpressions|ScanUsageC
ounter.ColorImpressions|ScanUsageCounter.MailboxBWImpressions|ScanUsageCounter.M
ailboxColorImpressions|ScanUsageCounter.FileBWImpressions|ScanUsageCounter.FileC
olorImpressions|ScanUsageCounter.EMailBWImpressions|ScanUsageCounter.EMailColorI
mpressions|ScanUsageCounter.MediaBWImpressions|ScanUsageCounter.MediaColorImpres
sions|PrintUsageCounter.BWImpressions|PrintUsageCounter.ColorImpressions|PrintUs
ageCounter.BW2upImpressions|PrintUsageCounter.Color2upImpressions|PrintUsageCoun
ter.BWNupImpressions|PrintUsageCounter.ColorNupImpressions|PrintUsageCounter.BWS
heets|PrintUsageCounter.ColorSheets|PrintUsageCounter.BWDuplexSheets|PrintUsageC
ounter.ColorDuplexSheets|PrintUsageCounter.BWReverseSheets|PrintUsageCounter.Col
orReverseSheets|PrintUsageCounter.BWLargeSheets|PrintUsageCounter.ColorLargeShee
ts|DiagPrintUsageCounter.BWImpressions|DiagPrintUsageCounter.ColorImpressions|Di
agPrintUsageCounter.BWSheets|DiagPrintUsageCounter.ColorSheets|DiagPrintUsageCou
nter.BWLargeSheets|DiagPrintUsageCounter.ColorLargeSheets|CopyUsageCounter.BWImp
ressions|CopyUsageCounter.ColorImpressions|CopyUsageCounter.BW2upImpressions|Cop
yUsageCounter.Color2upImpressions|CopyUsageCounter.BWNupImpressions|CopyUsageCou
nter.ColorNupImpressions|CopyUsageCounter.BWSheets|CopyUsageCounter.ColorSheets|
CopyUsageCounter.BWDuplexSheets|CopyUsageCounter.ColorDuplexSheets|CopyUsageCoun
ter.BWReverseSheets|CopyUsageCounter.ColorReverseSheets|CopyUsageCounter.BWLarge
Sheets|CopyUsageCounter.ColorLargeSheets|ReportUsageCounter.BWImpressions|Report
UsageCounter.ColorImpressions|ReportUsageCounter.BWSheets|ReportUsageCounter.Col
orSheets|ReportUsageCounter.BWDuplexSheets|ReportUsageCounter.ColorDuplexSheets|
ReportUsageCounter.BWReverseSheets|ReportUsageCounter.ColorReverseSheets|ReportU
sageCounter.BWLargeSheets|ReportUsageCounter.ColorLargeSheets|LargeSizeUsageCoun
ter.BWImpressions|LargeSizeUsageCounter.ColorImpressions|PaperSizeUsageCounter.A
4|PaperSizeUsageCounter.UNSPECIFIED|FAXUsageCounter.SendCount0|FAXUsageCounter.S
endCount1|FAXUsageCounter.SendCount2|FAXUsageCounter.SendCount3|FAXUsageCounter.
SendCount4|FAXUsageCounter.SendCount5|FAXUsageCounter.SendImpressions0|FAXUsageC
ounter.SendImpressions1|FAXUsageCounter.SendImpressions2|FAXUsageCounter.SendImp
ressions3|FAXUsageCounter.SendImpressions4|FAXUsageCounter.SendImpressions5|FAXU
sageCounter.PrintBW2upImpressions|FAXUsageCounter.BW1ImpressionJob|FAXUsageCount
er.BW2ImpressionsJob|FAXUsageCounter.BW3ImpressionsJob|FAXUsageCounter.BW4Impres
sionsJob|FAXUsageCounter.BW5ImpressionsJob|FAXUsageCounter.BW6ImpressionsJob|FAX
UsageCounter.BW7ImpressionsJob|FAXUsageCounter.BW8ImpressionsJob|FAXUsageCounter
.BW9ImpressionsJob|FAXUsageCounter.BW10To19ImpressionsJob|FAXUsageCounter.BW20To
29ImpressionsJob|FAXUsageCounter.BW30To49ImpressionsJob|FAXUsageCounter.BW50To74
ImpressionsJob|FAXUsageCounter.BW75To99ImpressionsJob|FAXUsageCounter.BW100To249
ImpressionsJob|FAXUsageCounter.BWOver250ImpressionsJob|FAXUsageCounter.TotalTime
Sent0|FAXUsageCounter.TotalTimeSent1|FAXUsageCounter.TotalTimeSent2|FAXUsageCoun
ter.TotalTimeSent3|FAXUsageCounter.TotalTimeSent4|FAXUsageCounter.TotalTimeSent5
|FAXUsageCounter.TotalTimeReceived0|FAXUsageCounter.TotalTimeReceived1|FAXUsageC
ounter.TotalTimeReceived2|FAXUsageCounter.TotalTimeReceived3|FAXUsageCounter.Tot
alTimeReceived4|FAXUsageCounter.TotalTimeReceived5|IFAXUsageCounter.Print2upImpr
essions|IFAXUsageCounter.BW1ImpressionJob|IFAXUsageCounter.BW2ImpressionsJob|IFA
XUsageCounter.BW3ImpressionsJob|IFAXUsageCounter.BW4ImpressionsJob|IFAXUsageCoun
ter.BW5ImpressionsJob|IFAXUsageCounter.BW6ImpressionsJob|IFAXUsageCounter.BW7Imp
ressionsJob|IFAXUsageCounter.BW8ImpressionsJob|IFAXUsageCounter.BW9ImpressionsJo
b|IFAXUsageCounter.BW10To19ImpressionsJob|IFAXUsageCounter.BW20To29ImpressionsJo
b|IFAXUsageCounter.BW30To49ImpressionsJob|IFAXUsageCounter.BW50To74ImpressionsJo
b|IFAXUsageCounter.BW75To99ImpressionsJob|IFAXUsageCounter.BW100To249Impressions
Job|IFAXUsageCounter.BWOver250ImpressionsJob|DirectFAXUsageCounter.SendCount0|Di
rectFAXUsageCounter.SendCount1|DirectFAXUsageCounter.SendCount2|DirectFAXUsageCo
unter.SendCount3|DirectFAXUsageCounter.SendCount4|DirectFAXUsageCounter.SendCoun
t5|DirectFAXUsageCounter.SendImpressions0|DirectFAXUsageCounter.SendImpressions1
|DirectFAXUsageCounter.SendImpressions2|DirectFAXUsageCounter.SendImpressions3|D
irectFAXUsageCounter.SendImpressions4|DirectFAXUsageCounter.SendImpressions5|Pri
ntUsageCounter.BW2upSimplexImpressions|PrintUsageCounter.Color2upSimplexImpressi
ons|PrintUsageCounter.BW2upDuplexImpressions|PrintUsageCounter.Color2upDuplexImp
ressions|PrintUsageCounter.BW4upSimplexImpressions|PrintUsageCounter.Color4upSim
plexImpressions|PrintUsageCounter.BW4upDuplexImpressions|PrintUsageCounter.Color
4upDuplexImpressions|PrintUsageCounter.BWNupSimplexImpressions|PrintUsageCounter
.ColorNupSimplexImpressions|PrintUsageCounter.BWNupDuplexImpressions|PrintUsageC
ounter.ColorNupDuplexImpressions|PrintUsageCounter.BW1ImpressionJob|PrintUsageCo
unter.BW2ImpressionsJob|PrintUsageCounter.BW3ImpressionsJob|PrintUsageCounter.BW
4ImpressionsJob|PrintUsageCounter.BW5ImpressionsJob|PrintUsageCounter.BW6Impress
ionsJob|PrintUsageCounter.BW7ImpressionsJob|PrintUsageCounter.BW8ImpressionsJob|
PrintUsageCounter.BW9ImpressionsJob|PrintUsageCounter.BW10To19ImpressionsJob|Pri
ntUsageCounter.BW20To29ImpressionsJob|PrintUsageCounter.BW30To49ImpressionsJob|P
rintUsageCounter.BW50To74ImpressionsJob|PrintUsageCounter.BW75To99ImpressionsJob
|PrintUsageCounter.BW100To249ImpressionsJob|PrintUsageCounter.BWOver250Impressio
nsJob|PrintUsageCounter.Color1ImpressionJob|PrintUsageCounter.Color2ImpressionsJ
ob|PrintUsageCounter.Color3ImpressionsJob|PrintUsageCounter.Color4ImpressionsJob
|PrintUsageCounter.Color5ImpressionsJob|PrintUsageCounter.Color6ImpressionsJob|P
rintUsageCounter.Color7ImpressionsJob|PrintUsageCounter.Color8ImpressionsJob|Pri
ntUsageCounter.Color9ImpressionsJob|PrintUsageCounter.Color10To19ImpressionsJob|
PrintUsageCounter.Color20To29ImpressionsJob|PrintUsageCounter.Color30To49Impress
ionsJob|PrintUsageCounter.Color50To74ImpressionsJob|PrintUsageCounter.Color75To9
9ImpressionsJob|PrintUsageCounter.Color100To249ImpressionsJob|PrintUsageCounter.
ColorOver250ImpressionsJob|CopyUsageCounter.BW2upSimplexImpressions|CopyUsageCou
nter.Color2upSimplexImpressions|CopyUsageCounter.BW2upDuplexImpressions|CopyUsag
eCounter.Color2upDuplexImpressions|CopyUsageCounter.BW4upSimplexImpressions|Copy
UsageCounter.Color4upSimplexImpressions|CopyUsageCounter.BW4upDuplexImpressions|
CopyUsageCounter.Color4upDuplexImpressions|CopyUsageCounter.BWNupSimplexImpressi
ons|CopyUsageCounter.ColorNupSimplexImpressions|CopyUsageCounter.BWNupDuplexImpr
essions|CopyUsageCounter.ColorNupDuplexImpressions|CopyUsageCounter.BWSimplexToD
uplexSheets|CopyUsageCounter.ColorSimplexToDuplexSheets|CopyUsageCounter.BWDuple
xToDuplexSheets|CopyUsageCounter.ColorDuplexToDuplexSheets|CopyUsageCounter.BWSi
mplexToSimplexSheets|CopyUsageCounter.ColorSimplexToSimplexSheets|CopyUsageCount
er.BWDuplexToSimplexSheets|CopyUsageCounter.ColorDuplexToSimplexSheets|CopyUsage
Counter.BW1ImpressionJob|CopyUsageCounter.BW2ImpressionsJob|CopyUsageCounter.BW3
ImpressionsJob|CopyUsageCounter.BW4ImpressionsJob|CopyUsageCounter.BW5Impression
sJob|CopyUsageCounter.BW6ImpressionsJob|CopyUsageCounter.BW7ImpressionsJob|CopyU
sageCounter.BW8ImpressionsJob|CopyUsageCounter.BW9ImpressionsJob|CopyUsageCounte
r.BW10To19ImpressionsJob|CopyUsageCounter.BW20To29ImpressionsJob|CopyUsageCounte
r.BW30To49ImpressionsJob|CopyUsageCounter.BW50To74ImpressionsJob|CopyUsageCounte
r.BW75To99ImpressionsJob|CopyUsageCounter.BW100To249ImpressionsJob|CopyUsageCoun
ter.BWOver250ImpressionsJob|CopyUsageCounter.Color1ImpressionJob|CopyUsageCounte
r.Color2ImpressionsJob|CopyUsageCounter.Color3ImpressionsJob|CopyUsageCounter.Co
lor4ImpressionsJob|CopyUsageCounter.Color5ImpressionsJob|CopyUsageCounter.Color6
ImpressionsJob|CopyUsageCounter.Color7ImpressionsJob|CopyUsageCounter.Color8Impr
essionsJob|CopyUsageCounter.Color9ImpressionsJob|CopyUsageCounter.Color10To19Imp
ressionsJob|CopyUsageCounter.Color20To29ImpressionsJob|CopyUsageCounter.Color30T
o49ImpressionsJob|CopyUsageCounter.Color50To74ImpressionsJob|CopyUsageCounter.Co
lor75To99ImpressionsJob|CopyUsageCounter.Color100To249ImpressionsJob|CopyUsageCo
unter.ColorOver250ImpressionsJob|CopyUsageCounter.BW1OriginalJob|CopyUsageCounte
r.BW2OriginalsJob|CopyUsageCounter.BW3OriginalsJob|CopyUsageCounter.BW4Originals
Job|CopyUsageCounter.BW5OriginalsJob|CopyUsageCounter.BW6OriginalsJob|CopyUsageC
ounter.BW7OriginalsJob|CopyUsageCounter.BW8OriginalsJob|CopyUsageCounter.BW9Orig
inalsJob|CopyUsageCounter.BW10To19OriginalsJob|CopyUsageCounter.BW20To29Original
sJob|CopyUsageCounter.BW30To49OriginalsJob|CopyUsageCounter.BW50To74OriginalsJob
|CopyUsageCounter.BW75To99OriginalsJob|CopyUsageCounter.BW100To249OriginalsJob|C
opyUsageCounter.BWOver250OriginalsJob|CopyUsageCounter.Color1OriginalJob|CopyUsa
geCounter.Color2OriginalsJob|CopyUsageCounter.Color3OriginalsJob|CopyUsageCounte
r.Color4OriginalsJob|CopyUsageCounter.Color5OriginalsJob|CopyUsageCounter.Color6
OriginalsJob|CopyUsageCounter.Color7OriginalsJob|CopyUsageCounter.Color8Original
sJob|CopyUsageCounter.Color9OriginalsJob|CopyUsageCounter.Color10To19OriginalsJo
b|CopyUsageCounter.Color20To29OriginalsJob|CopyUsageCounter.Color30To49Originals
Job|CopyUsageCounter.Color50To74OriginalsJob|CopyUsageCounter.Color75To99Origina
lsJob|CopyUsageCounter.Color100To249OriginalsJob|CopyUsageCounter.ColorOver250Or
iginalsJob|PaperSizeUsageCounter.A3|PaperTrayUsageCounter.Tray1PrintedSheets|Pap
erTrayUsageCounter.Tray2PrintedSheets|PaperTrayUsageCounter.Tray3PrintedSheets|P
aperTrayUsageCounter.Tray4PrintedSheets|PaperTrayUsageCounter.Tray5PrintedSheets
|PaperTrayUsageCounter.Tray6PrintedSheets|PaperTrayUsageCounter.Tray7PrintedShee
ts|PaperTrayUsageCounter.Tray8PrintedSheets|PaperTrayUsageCounter.Tray1PrintedIm
pressions|PaperTrayUsageCounter.Tray2PrintedImpressions|PaperTrayUsageCounter.Tr
ay3PrintedImpressions|PaperTrayUsageCounter.Tray4PrintedImpressions|PaperTrayUsa
geCounter.Tray5PrintedImpressions|PaperTrayUsageCounter.Tray6PrintedImpressions|
PaperTrayUsageCounter.Tray7PrintedImpressions|PaperTrayUsageCounter.Tray8Printed
Impressions|StoredDocumentUsageCounter.UnprintedDeletedImpressions|UptimeUsageCo
unter.WarmUpTime|UptimeUsageCounter.IOTRunTime|UptimeUsageCounter.IITRunTime|Upt
imeUsageCounter.LowPowerTime|UptimeUsageCounter.SleepTime|UptimeUsageCounter.Sta
ndbyTime|UptimeUsageCounter.PowerOffTime
============= Line 3 =================
3|ABCDEF|110139|ABC|2010-09-24T12:32:00+09:00|2010-09-24T12:32:28+09:00|||||||||
||||||||||||||||||||||||||||||||||||||||||||||||||||||0|0|0|0|0|0|0|0|0|0|0|0|0|
309|159|158|16|0|0|151|129|0|0|4709|2105|1971|704|2|0|2760|1407|1877|769|0|0|47|
86|0|0|0|0|0|0|305|21|1|0|0|0|204|18|101|3|0|0|1|1|60|0|51|0|9|0|0|0|0|0|77|92|4
309|0|0|5|0|0|0|0|0|19|0|0|0|0|0|1|0|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0|355|0|0|0|0|0
|319|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|21|10|195
0|694|0|0|2|0|0|0|2|0|422|292|60|38|24|18|18|26|8|60|34|20|3|0|0|0|233|138|36|30
|10|20|9|11|7|27|17|6|2|1|0|0|1|0|0|0|0|0|0|0|0|0|0|0|5|1|96|2|103|15|0|0|84|7|0
|4|1|0|0|0|0|0|1|0|0|0|1|0|13|4|0|0|0|0|0|0|0|0|0|0|0|0|0|0|80|12|0|3|1|0|0|0|0|
1|0|0|1|0|0|0|14|3|0|0|0|0|0|0|0|0|0|0|0|0|0|0|135|3631|658|11|135|9|0|0|0|5901|
1114|11|169|9|0|0|0|0|66|513|29|5715|102714|11941|28
============= Line 4 =================
3|ABCDEF|110139|ABC|2010-09-24T13:34:00+09:00|2010-09-24T13:34:16+09:00|0|0|0|0|
0|0|0|0|0|0|0|0|0|0|5|19|0|6|0|0|0|0|0|4|0|0|0|0|0|4|0|0|0|0|0|0|4|0|0|0|0|0|0|0
|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|309|159|158|16|0|
0|151|129|0|0|4709|2105|1971|704|2|0|2760|1407|1877|769|0|0|47|86|0|0|0|0|0|0|30
5|21|1|0|0|0|204|18|101|3|0|0|1|1|60|0|51|0|9|0|0|0|0|0|77|92|4309|0|0|5|0|0|0|0
|0|19|0|0|0|0|0|1|0|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0|355|0|0|0|0|0|319|0|0|0|0|0|0|
0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|21|10|1950|694|0|0|2|0|0|0
|2|0|422|292|60|38|24|18|18|26|8|60|34|20|3|0|0|0|233|138|36|30|10|20|9|11|7|27|
17|6|2|1|0|0|1|0|0|0|0|0|0|0|0|0|0|0|5|1|96|2|103|15|0|0|84|7|0|4|1|0|0|0|0|0|1|
0|0|0|1|0|13|4|0|0|0|0|0|0|0|0|0|0|0|0|0|0|80|12|0|3|1|0|0|0|0|1|0|0|1|0|0|0|14|
3|0|0|0|0|0|0|0|0|0|0|0|0|0|0|135|3631|658|11|135|9|0|0|0|5901|1114|11|169|9|0|0
|0|0|66|513|29|5730|102741|11960|28
============= Line 5 =================
4|2010-09-25T02:00:24+09:00|2
PL/SQL procedure successfully completed.
SQL> Error you are getting is not file related. It simply tells line you read from file is too big to be displayed by DBMS_OUTPUT.PUT_LINE, which tells me you are on some older Oracle version. My test was conducted on 10.2.0.4.0. Try issuing SET SERVEROUTPUT ON SIZE 1000000 befor running your code.
SY. -
Problem with Sender File Content conversion
Hi everybody,
I have a flat file with the following structure:
PR1xxxx
CL1.1xxx
ALxxx
PTxxx
PTxxx
PTxxx
CL1.2xxx
ALxxx
PTxxx
PTxxx
Cl1.3xxx
PR2xxx
CL2.1
Alxxx
PTxxx
Ptxxx
CL2.2xxx
ALxxx
PR3xxx
I need to send an IDOC (ORDERS05) per CL and I also need that the PR goes together with the CL.
Something like that:
IDOC 1
PR1xxx
CL1.1xxx
ALxxx
PTxxx
PTxxx
PTxxx
IDOC 2
PR1xxx
CL1.2xxx
ALxxx
PTxxx
PTxxx
IODC 3
PR2xxx
CL2.1xxx
The problem is that I am not able to attach the PR with each CL because the PR is written once at the beginning.
I have tested all the posibilities in the content conversion area but I don`t find the way to achiveve that.
Maybe, Have I to do something in the mapping program?
Nested substructures are possible in the File Content Conversion?
Any idea?
Thanks for everythingWe can handle this in mapping as follows
Crate an Intermediate structure Identical to your input structure. Just you need to add an sub element (Lets say "T" to your CL node.
This sub element will be used to remember CL node belongs to which PR node.
Map your Input structure to Intermediate structure.
While mapping PR Node of input to PR Node of Intermediate structure use a user defined function as follows
Integer ii;
GlobalContainer g;
g=container.getGlobalContainer();
Object o= g.getParameter("_&HLID");
if (o==null) ii=new Integer(0);
else
ii =(Integer)o;
ii =new Integer(ii.intValue()+1);
g.setParameter("_&HLID",ii);
Use another user defined function to retrieve the value of this _&HLID and put it to T as follows:
GlobalContainer g;
g=container.getGlobalContainer();
Object o= g.getParameter("_&HLID");return o.toString();
For all other fields just do a 1:1 mapping.
Then
Map your intermediate structure to destination structure (IDOC)
Here the only catch is:
For populating the value of PR for each CL
Pass both the element T and the element of PR from which you want to pick the value to a user-defined function (raise the context of both elements to the top node).
In array a we have the value of T
In array b we have the value of element of PR
int j=0;
for(int k=0;k<b.length;k++){
for (int i=0;i<a.length;i++)
if (a<i>.equals(new Integer(j+1).toString())){
System.out.println(b[j]);
j=j+1;
Hope this takes care of your problem.
If you don't get anything please get back to me.
Abinash -
Hi,
Here i read file then i want to put it's contents in textarea . I used FileInputStream and bufferedInputstream for reading file but the content not appear in the textarea . why this ?
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import javax.swing.*;
public class FileChooserTest extends JFrame {
private JButton button;
private JPanel panel;
private JFileChooser fileChooser;
private File file = null;
private JTextArea area;
private FileInputStream fileInputStream = null;
private BufferedInputStream bufferedInputStream = null;
public FileChooserTest() {
fileChooser = new JFileChooser();
area = new JTextArea(50, 60);
panel = new JPanel(new FlowLayout());
button = new JButton("open");
panel.add(button);
panel.add(area);
getContentPane().add(panel, BorderLayout.CENTER);
fileChooser.setSelectedFile(new File(".txt"));
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
int returnValue = fileChooser.showOpenDialog(FileChooserTest.this);
if (returnValue == JFileChooser.APPROVE_OPTION) {
file = fileChooser.getSelectedFile();
try {
fileInputStream = new FileInputStream(file);
bufferedInputStream = new BufferedInputStream(fileInputStream);
try {
while (bufferedInputStream.available() != 0) {
area.setText(String.valueOf(bufferedInputStream.read()));
} catch (IOException ex) {
ex.printStackTrace();
} catch (FileNotFoundException ex) {
ex.printStackTrace();
public static void main(String[] args) {
FileChooserTest fileChooserTest = new FileChooserTest();
fileChooserTest.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
fileChooserTest.setSize(new Dimension(600, 300));
fileChooserTest.setLocationRelativeTo(null);
fileChooserTest.setVisible(true);
}Thanks in advanceI changed all error in the code but also the text not appear on the textarea . why ?
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import javax.swing.*;
public class FileChooserTest extends JFrame {
private JButton button;
private JPanel panel;
private JFileChooser fileChooser;
private File file = null;
private JTextArea area;
private FileInputStream fileInputStream = null;
private BufferedInputStream bufferedInputStream = null;
private ByteArrayInputStream byteArrayInputStream = null;
private byte[] bufferRead;
public FileChooserTest() {
fileChooser = new JFileChooser();
area = new JTextArea(50, 60);
panel = new JPanel(new FlowLayout());
button = new JButton("open");
panel.add(button);
panel.add(area);
getContentPane().add(panel, BorderLayout.CENTER);
fileChooser.setSelectedFile(new File(".txt"));
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
int returnValue = fileChooser.showOpenDialog(FileChooserTest.this);
if (returnValue == JFileChooser.APPROVE_OPTION) {
file = fileChooser.getSelectedFile();
int i = 0;
try {
fileInputStream = new FileInputStream(file);
bufferedInputStream = new BufferedInputStream(fileInputStream);
StringBuilder stringBuilder = new StringBuilder();
bufferRead = new byte[(int) file.length()];
try {
while ((i = bufferedInputStream.available()) > 0) {
bufferRead[i] = new Byte((byte) i);
byteArrayInputStream = new ByteArrayInputStream(bufferRead, 0, (int) file.length());
stringBuilder.append(byteArrayInputStream);
area.setText(stringBuilder.toString());
} catch (IOException ex) {
ex.printStackTrace();
} catch (FileNotFoundException ex) {
ex.printStackTrace();
public static void main(String[] args) {
FileChooserTest fileChooserTest = new FileChooserTest();
fileChooserTest.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
fileChooserTest.setSize(new Dimension(600, 300));
fileChooserTest.setLocationRelativeTo(null);
fileChooserTest.setVisible(true);
}please help me in this . i tried but i can not .
Thnaks
Edited by: beshoyatefw on May 6, 2010 3:42 PM -
Reading file content using Javascript
Hi Friends,
is it possibel to read the contents of the child window opened from a javascript.for example am opening a window using Window.open function in javascript, after opening the window can i read the contents ?If so how can anyone help in this.
Thanks
VishyBelow is the code of my normal java program which works fine.
try {
// File destFile = new File("./SourceFiles/savedFile.txt");
File destFile = new File("./SourceFiles/", "savedFile.txt");
BufferedWriter writer = new BufferedWriter(new FileWriter(destFile));
writer.write("TESTing File Save");
writer.flush();
System.out.println("SAVED!!");
} catch ( IOException e ) {
e.printStackTrace();
Structure of this project is
Samples
|SaveSample
|SaveSample.java
|SourceFiles
|savedFile.txt
I have implemented similar code in my servlet too. But this doesnt save the content to the HTML file.
protected void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
action = request.getParameter("action");
try {
File destFile = new File("./SourceFiles/", "savedFile.html");
BufferedWriter writer = new BufferedWriter(new FileWriter(destFile));
writer.write(action);
writer.flush();
System.out.println("SAVED!!");
} catch ( IOException e ) {
e.printStackTrace();
Im getting FileNotFound Exception
java.io.FileNotFoundException: .\SourceFiles\savedFile.html (The system cannot find the path specified)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileWriter.<init>(Unknown Source)
at savepackage.SaveContent.doPost(SaveContent.java:81)
Edited by: 849224 on Apr 5, 2011 4:17 AM -
WebDynpro: How to read file content?
Hi,
My business scenario requires:
1, The file name is passed in through inbound plug parameter
2, I need to read the file content and then attach it to my CRM transaction
Please share with me how to read the file content.
The following approaches do not fit my scenario:
1, UI element: FileUpload
The reason is obvious: there is only file name parameter instead of any UI interface
2, Function Module: GUI_UPLOAD
The reason is that dump will happen in WebDynpro environment
Thanks & Best Regards,
DavidHI,
Refer these links -
Get content document in WD abap
Excel File to Internal Table -
Read file content and keep binary copy
Hi All, I don't know what the best way of doing this is, but my requirement is to read the content of a file using File Adapter and post a document with this datda in SAP, but also to keep a binary copy of the file attached to the posted document.
So my question is, Is there a way within the file adapter to read the content of the file using the Content Conversion mechanism and at the same type keep a binary copy of the read file.
Thanks,
PabloHi,
I know we can send it via proxy but your question was something different or my be I misunderstood it.. here is your question again..
>
Pablo Lopez wrote:
> Hi All, I don't know what the best way of doing this is, but my requirement is to read the content of a file using File Adapter and post a document with this datda in SAP, but also to keep a binary copy of the file attached to the posted document.
> So my question is, Is there a way within the file adapter to read the content of the file using the Content Conversion mechanism and at the same type keep a binary copy of the read file.
>
> Thanks,
> Pablo
What I understood from your question that, there is a file which you want to read/pick via file adapter and at the same time you also want to attach same file along with the content and then post it to R3.
If my assumption is correct then it is not possible. Yeh If there is some workaround then that is different story.
Regards,
Sarvesh -
Problem with reading files from folders - please help
Hi!
I have 2 folders (folder1 and folder2) on 2 different locations. Now i will say few things about my program.
First folder is input folder. Different applications generate XML files and put them inside folder1.
Then i have my application which i use to manipulate with those folders. Basically, i have 2 threads. One is checking if there are files in folder1 and other thread is moving manipulated files from folder1 to folder2.
I face this problem. XML files are much faster generated then manipulated. Example: for every 3 incoming files into folder1 i have 1 manipulated and stored file into folder2. This way i face problem that some older files are never manipulated, they are stuck in folder1 basically forever.
Could someone help me to solve this problem? I do not know how to select files form folder1 ordered by "date modified time".
Tnx for your time and help!Do not crosspost! I'll lock this thread.
-
Problem in reading net content from java on unix environment
Friends,
I was trying to write sample java program which can able to connect to web and read the content.
But facing some proble. Kindly help me
package com.validate.email;
import java.net.*;
import java.io.*;
public class ReadWSDL {
public static void main(String args[]){
String nextLine;
URL url = null;
URLConnection urlConn = null;
InputStreamReader inStream = null;
BufferedReader buff = null;
try{
System.setProperty("http.proxyHost","proxy.resources.company.com");
System.setProperty("http.proxyPort", "80");
// Create the URL obect that points
// at the default file index.html
url = new URL("http://ws.cdyne.com/emailverify/Emailvernotestemail.asmx?wsdl" );
urlConn = url.openConnection();
inStream = new InputStreamReader(
urlConn.getInputStream());
buff= new BufferedReader(inStream);
// Read and print the lines from index.html
while (true){
nextLine =buff.readLine();
if (nextLine !=null){
System.out.println(nextLine);
else{
break;
} catch(MalformedURLException e){
System.out.println("Please check the URL:" +
e.toString() );
} catch(IOException e1){
System.out.println("Can't read from the Internet: "+
e1.toString() );
Error
Can't read from the Internet: java.net.UnknownHostException: www.tpisoft.commy_forum wrote:
The same code is working in Windows, where I get the proxy from Browser.How?
But on Unix machine it is not working. And I am using the proxy which is DNS/hostname of the unix machine.Don't you mean the DNS/hostname of the proxy? -
Problem in Sender File content conversion
Hi all,
my sender file structure is as follows:
records
header
f1 minlength=1 MaxLenth=1
f2 minlength=5 MaxLenth=5
f3 minlength=7 MaxLenth=7
detail
f1 minlength=1 MaxLenth=1
f2 minlength=5 MaxLenth=5
f3 minlength=18 MaxLenth=18
now i need to use these fixed field legth file and perform fcc.
under fcc of communication channel
documentname=MT_details
rcs header,,detail,
header.fieldNames header.f1,header.f2,header.f3
header.fixedFieldLengts 1,5,7
detail.fieldNames detail.f1,detail.f2,detail.f3
here I Am not using any key field
when i test the scenario with test file
A E123 X12345
T T123 Textlineitem12345
My problem is the file is not getting picked from the specified path.
Please correct my configuration.
Thanks,Check the FOLDER permission of the path.
There may be some permissions missing to access that folder .
Check with your BASIS or UNIX team.
Edited by: Naresh Nelapatla on Feb 27, 2012 7:17 PM -
Problem with Sender File Content Conversion Communication Channel
Hi All,
I am using XI 3.0--SP 16.
I have configured a Sender communication channel with File Content Converison which takes up a Fixed length text file and converts to XML.
My scenario is that I have some 'n' files, out of which one file has error in content conversion.
In a normal scenario I would expect other files to get processed, but they are not.
I can correct the error or even discard the error file. But I am unable to understand why XI is not processing the rest of the good files.
Thanks in advance.
Regards.,
SudharshanHi,
@Renjith
The QOS is EO, thats why I am wondering why it is not picking the rest of the good ones
Regards,
Sudharshan
Maybe you are looking for
-
How can I add a new iTunes account without losing all my music on my iPhone?
Currently, all of my family's purchases are through my wife's iTunes account. As such, both of our iPhones are synced with iTunes through that account. I would like to add an account just for me, but I also don't want to lose all of the music we've
-
TV on the E71 (using WLAN)
Hi everyone... I am looking for a good 'streaming' TV application on the E71.can anyone recommend one ? I have tried the following :- FreeBeTv but it installed on the E71 then complained of not having an 'sccess point' set up and didn't run, so I had
-
Manual duplex for LaserJet 1300 in Windows 8.1
Hello. I'm using HP LaserJet 1300 under windows 8.1. I can't print pdf file on both sides of the page. When I choose this option it just prints the whole document. This printer is also used for windows XP and windows 7 and manual both side printing w
-
Which drive for Photoshop?
I have 3 hard drives one for OS, one for Photoshop and one for back up. I inadvertently allowed my CS4 upgrade to load onto the OS drive, CS3 is on the Photoshop drive. If I load Photoshop from the dock I get a message saying 'This application has be
-
Changing project window on the fly ? - possible ?
Hi gentlemen, Quick question, I created an HD project with dimensions of 1440x180, and have all my overlay logos on 2 different timelines, in the position I want them. I now have new video, but it's only 720x480, and when I put it on the timeline, of