Create File with header
Hi all,
We have requirement to send data to FTP server,
am able to send data to FTP server, but the problem is am not able to send file with Header,
Eg:
oreder numer netvalue discount Grossamount
90000909 2323.34 343.33 4545.000
90000909 2323.34 343.33 4545.000
90000909 2323.34 343.33 4545.000
i have to send the file in the above format.
plz guide me hoe to create file with above format?
REgards,
DS kumar
Hi,
Use the following code to create header.
DEFINE add_field_header.
clear &1.
&1-field = &2.
append &1.
END-OF-DEFINITION.
add_field_header heading 'oreder numer'.
add_field_header heading 'netvalue'.
add_field_header heading 'discount'.
add_field_header heading 'Grossamount'.
In GUI_DOWNLOAD pass heading to Fieldnames parameter.
Regards,
Ni3
Similar Messages
-
Generate target/out file with header record as Record Count ?
Hi Kareem, Please try the below approach. Pipeline 1: Load actual data(without header with record count) from source to target. Let say your file name is intermediate1.dat Pipeline 2: Take the target from pipeline 1 as source and create the header with count of source file using an aggregator. The filename of target for pipeline 2 will be your final file(header and detail data). Pipeline 3: Take the target of pipeline 1 again and do 1-to-1 load to the target file of second pipeline. In session properties, dont forget to tick the check box append if exists for the third pipeline target. There may be other simple approaches also. If you have no time in hand try the above approach. Let me know if you find any issues. Thanks,Deeshan.
Generate target/out file with header record as Record Count ? Out file:---------------------------Record Count :2000 Coulmn1, Column2...Data, data........
-
Hello everybody,
It's my first time using Java Card ^_^,I want to create a file and fill the fill with binary data.but i don't know how to create file with APDU commands,so I need help here.
I think that there must be a Manual of the JavaCard's OS in this world,can someone tell me where to download it??
Thanks.
the fllowing is my card:
Samsung S1
Model:TiEx-32J
EEPROM size:32k
Platform Version:OP 2.0.1
Card Manager Status:OP_READY
KMC:40~4F/No derivation
Message was edited by:
AllenHuangIf you look around the forum for a bit, you will see that there is no notion of file systems on JavaCards (lexdabear posted this information less than two hours ago :-)). To store files, you will have to write an applet to hold byte arrays of the required size and handle receiving and sending of these.
As for documentation, you should have a look at the GP (General Platform) specification at http://www.globalplatform.org/, which defines communication between smart cards and other devices, as well as Sun's own JavaCard pages (http://java.sun.com/products/javacard/), which contain several useful resources on JavaCards.
Message was edited by:
Lillesand -
How do I import binary data files (with header info) into DIAdem?
We have lots of data acquired by nCode datagate. Files are binary data with header info. How do I import this into DIAdem? Typical (short) file attached. Also of interest, can I stream data from Sony PC208/SIR1000 recorders?
Attachments:
Propshft.dac 4 KBI have successfully imported your file into DIAdem using the nCode file filter included with DIAdem. You might have to make that file filter known to DIAdem by following these steps (this assumes you have version 8 of DIAdem):
1. Go to the 'Window' menu in DIAdem and select 'Close all'
2. Go to the 'Settings' menu and select 'GPI-DLL Registration'
3. Click the 'Add' button in the window and select the 'GfSnCode' DLL in the 'DIAdem/AddInfo' directory
4. The program will prompt you to restart.
5. After you have restarted DIAdem, go to the DATA icon, select 'File - Open' from the DATA menu and in the dialog that appears, choose 'nSoft Data File Format' in the 'Files of type:' field.
6. Select your data file and load
That's it.
With regards to your Sony reco
rder data, I would need to get my hands on an actual data file to try it out. In general, DIAdem can import ANY binary file format by creating a header in the 'File - Import via header' section in DATA. If you have lots of data files from the SONY recorder, a DLL can be created for that specific file format with the free DLL toolkit included with DIAdem.
Leave me a message here if you have any additional questions.
Otmar
Otmar D. Foehner
Business Development Manager
DIAdem and Test Data Management
National Instruments
Austin, TX - USA
"For an optimist the glass is half full, for a pessimist it's half empty, and for an engineer is twice bigger than necessary." -
How to create files with read/write privileges for everyone?
I have two iMacs 7,1 (one with Snow Leopard and the other with Mountain Lion) in a local area wireless network.
I have shared the "documents" folder in the Snow Leopard iMac in order to have files available to the other iMac. The folder has read/write privileges for everyone.
When I create a new file in the shared "Documents" folder (for example a new Open office document, or a Keynote presentation) this file is by default "read/write" for the Administrator but only "read" for all the other users, so when I try to open it from the other iMac, I am informed that the file is "read only".
I can obviously change the privileges of the file in the information window, but I have to do on a file per file basis and this takes too long.
Is it possible to change settings in order to create files which are always "read/write" for everyone?
And, secondly, since I have several existing files whose privileges I should manually change one by one, is it possible to make global changes of their privileges?
Thanks in advance
Best regardscouple of different changes - 1st, if you want to share folders, doing your whole documents folder is not the best way. Since both your computers can handle AidDrop, that's what I would recommend - http://osxdaily.com/2011/11/14/how-to-use-airdrop-in-mac-os-x/ - as it create an instant Ad-Hoc network between the two computers and then let's it done.
A second possibility that may not be what you're looking for, is to use google drive or some similay cloud sharing app to sync the documents back and forth. both of these solutions will transfer the files well, but the airdrop may be simplest -
[File] Problem while creating files with long pathnames
Hello everybody
I'm trying to create File objects corresponding to physical files. These files have very long pathnames because they are located in directories tree with large depth. So, my pathname conatins a lot of directories plus the name of the file itself.
It seems, that there is a limitation in the length of the pathname that I pass to the File constructor because files with small pathnames are OK bu the ones with very large pathnames cannot be created.
I tried the different File constructors (File(String pathname) and File(File parent, String childname)) but it still does not work. Even if the second constructor is a little bit better as it succeeds on files where the first constructor failed. But still, it's not enough.
Please Help!
Thank you
HugoRESOLVED!
The problem was from the OS itself (Windows XP) which accepts at most 255 characters long path names. -
How to handle text files with Header lines
Hi,
Eventhough the number of header lines is specified, when I do Reverse to get columns, its considering only header line.
I have file format like
ffserver started.
192.168.11.30 - - [Fri Apr 20 19:28:01 2007] "GET /robots.txt HTTP/1.1" 404 150
192.168.11.30 - - [Fri Apr 20 19:28:02 2007] "GET /V23WASTINGPETROL HTTP/1.1" 200 310
first line is header line and there are spaces within a field value, and the field separator also is space.
regards,
Vivekin this scenario of urs ,ur file has multiple delimiters like -- and spaces.
in this case u need to convert the file in a file with single delimiter .
this can be done by writing a code in java in ODI procedures.
once you have the same delimiter all over the file.
u can extract multiple headers using typical Procedure -
Transfer file clean up: What is best practice when creating files with timestamps?
Created an SSIS package to create files that will be sent which are created with a time stamp. What is the best procedure of clean up for the files? I'd like to keep at least a day of files for verification purposes.
Run http://filepropertiestask.codeplex.com task to get the file creation date and if older delete it or a Script Task that uses the .Net FileInfo
CreratedDate method to find it Then you can use
Precedence Constraints to either skip the file deletion or not.
Arthur
MyBlog
Twitter -
NFS4: Allow client to create files with arbitrary uid and/or gid
Hello.
I've got a ZFS, which is supposed to be used for storing backups of client machines. I've set:
--($ ~)-- zfs get sharenfs data/backup/winnb000546
NAME PROPERTY VALUE SOURCE
data/backup/winnb000546 sharenfs ro,root=winnb000546:10.0.4.5,rw=winnb000546:10.0.4.5 localOn winnb000546, I can then mount and access this directory. "root" can also create files (eg. "sudo touch $mountpoint/file") and this file is then owned by root:root (0:0).
But this directory is supposed to hold a backup of the client machine; we don't use NIS or LDAP and thus /etc/passwd and /etc/group don't match. As winnb000546 is a Linux system (Arch Linux, to be exact), it would be somewhat hard to set it up so, that passwd/group completely match anyway.
Now, as said, it's supposed to be for backup and thus I need to retain the ownership information exactly as it was on the client system. But it doesn't work...
--($ /mnt/server/data/backup/winnb000546)-- sudo touch file
--($ /mnt/server/data/backup/winnb000546)-- sudo chgrp hal file
chgrp: changing group of `file': Invalid argument
--($ /net/winds07-bge0.win.ch.da.rtr/data/backup/winnb000546/oink/UIDs/nfs3)-- getent group hal
hal:x:82:askwarIt failed, because the Solaris server doesn't have a group with gid 82.
What do I need to do on the Solaris 10 server, so that it allows the client to create files on the NFSv4 export with arbitrary gid and/or uid values (ie. even with values it knows nothing about)?
Regards,
AlexanderMount it as NFSv3
-
Subsembly create file with apdu
I am using subsembly sc api with APDU commands... i have problem with creating file:
CardCommandAPDU aSelectAPDU = new CardCommandAPDU(0x00, 0xE0, 0x00, 0x00, 3750);
I read in manual to create file, and it only said that i have to use
E0, for other arguments it didnt say nothing... so what do i put for
p1, p2 and cla nad send data?
I used just size and i got this back:
SW1:6B
SW2:00
It means that p1 or p2 is invalid! So what should i do? helpHi boss-tech,
It appears that this question can better be answered by someone on one of the newsgroups for Windows Mobile or Windows CE. In order to get a quicker and more accurate response, please consider reposting this question to one of the following newsgroups:
Windows Mobile API:
microsoft.public.pocketpc.developer
microsoft.public.smartphone.developer
Windows CE API:
microsoft.public.windowsce.embedded
General programming (not VisualStudio related):
microsoft.public.windowsce.app.development
Native compilers:
microsoft.public.windowsce.embedded.vc
ActiveSync:
microsoft.public.pocketpc.activesync
Best regards,
Guang-Ming Bian - MSFT
Please remember to mark the replies as answers if they help and unmark them if they provide no help -
Currently when I create a file on our Solaris 7 server it creates it with this:
-rw-r--r-- 1 jones abcd 0 Jul 25 14:46 datafilePlease advise how I can change it so everytime I create a file it will be with these permissions:
-rw-rw-r-- 1 jones abcd 0 Jul 25 14:46 datafileActually, what you need to set your umask to, depends on the rest of the system.
First check in /etc/default/login for the system wide UMASK setting. This is the one that applies to you. You should start calculating from there :)
See also:
====================
The three
octal digits refer to read/write/execute permissions for
owner, group, and other, respectively (see chmod(1),
chmod(2), and umask(2)). The value of each specified digit
is subtracted from the corresponding ``digit'' specified by
the system for the creation of a file (see creat(2)). For
example, umask 022 removes write permission for group and
other (files normally created with mode 777 become mode 755;
files created with mode 666 become mode 644).
====================
Message was edited by:
Cailin_Coilleach -
I'd like to create a file with just a specific property: enable to read but not to write.
How can i manage?
Thank for your help.I work under windows 2000.
Is it possible for my application to modify a file "fic.txt" of six lignes only and give the file the read only mode.My problem is: the java application create the file with read only mode and doesn't want to write on it?
If i 'm not clear sorry , here is my source code:
public void Ecrire_Fichier(String parametre,String commentaire)
try
boolean bool ;
File output = new File(this.get_Nom_Repertoire(),this.get_Nom_Fichier()) ;
output.createNewFile() ;
output.setReadOnly() ;
if (!output.isFile())
System.out.println("La cr�ation " + output.getPath() + " a �chou�.") ;
return ;
if (this.NombreLigne_Fichier()>=6)
bool = false ;
else
bool = true ;
BufferedWriter out = new BufferedWriter(new FileWriter(output.getPath(),bool)) ;
out.write(parametre) ;
out.write(" : ") ;
out.write(commentaire) ;
out.newLine() ;
out.close() ;
catch (IOException e)
System.out.println("Erreur d'ecriture du fichier" + e) ;
} -
hi,
i have to upload file which has header in the first line.
and from second line the actual data will be there which is to be uploaded.
now the problem is hove to move this file data to internal table with header,
can any one has code plz send me.hi,
try this Fm...
DATA l_count TYPE sy-tabix.
CONSTANTS: lc_begin_col TYPE i VALUE '1',
lc_begin_row TYPE i VALUE '2',
lc_end_col TYPE i VALUE '2',
lc_end_row TYPE i VALUE '3000'.
* Begin of CALK912848 - Carlos Werberich - 16Sep08
CLEAR p_i_excel_data. REFRESH p_i_excel_data.
* End of CALK912848 - Carlos Werberich - 16Sep08
* Function module to read excel file and convert it into internal table
CALL FUNCTION 'KCD_EXCEL_OLE_TO_INT_CONVERT'
EXPORTING
filename = p_p_file
i_begin_col = lc_begin_col
i_begin_row = lc_begin_row
i_end_col = lc_end_col
i_end_row = lc_end_row
TABLES
intern = i_data
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
* Error in file upload
IF sy-subrc NE 0 .
MESSAGE text-006 TYPE 'E'.
EXIT.
ENDIF.
IF i_data[] IS INITIAL .
MESSAGE text-007 TYPE 'E'.
EXIT.
ELSE.
SORT i_data BY row col .
* Loop to fill data in Internal Table
LOOP AT i_data .
MOVE i_data-col TO l_count .
ASSIGN COMPONENT l_count OF STRUCTURE p_i_excel_data TO .
AT END OF row .
* Append data into internal table
APPEND p_i_excel_data.
CLEAR p_i_excel_data.
ENDAT .
ENDLOOP .
ENDIF -
Cannot create file with Non-latin characters- I/O
I'm trying to create a file w/ Greek (or any other non-latin) characters ... for use in a RegEx demo.
I can't seem to create the characters. I'm thinking I'm doing something wrong w/ IO.
The code follows. Any insight would be appreciated. - Thanks
import java.util.regex.*;
import java.io.*;
public class GreekChars{
public static void main(String [ ] args ) throws Exception{
int c;
createInputFile();
// String input = new BufferedReader(new FileReader("GreekChars.txt")).readLine();
// System.out.println(input);
FileReader fr = new FileReader("GreekChars.txt");
while( (c = fr.read()) != -1)
System.out.println( (char)c );
public static void createInputFile() throws Exception {
PrintStream ps = new PrintStream(new FileOutputStream("GreekChars.txt"));
ps.println("\u03A9\u0398\u03A0\u03A3"); // omega,theta,pi,sigma
System.out.println("\u03A9\u0398\u03A0\u03A3"); // omega,theta,pi,sigma
ps.flush();
ps.close();
FileWriter fw = new FileWriter("GreekChars.txt");
fw.write("\u03A9\u0398\u03A0\u03A3",0,4);
fw.flush();
fw.close();
// using a printstream to create file ... and BufferedReader to read
C:> java GreekChars
// using a Filewriter to create files .. and FileReader to read
C:> java GreekChars
*/Construct your file writer using a unicode format. If
you don't then the file is written using the platform
"default" format -probably ascii.
example:
FileWriter fw = new FileWriter("GreekChars.txt",
"UTF-8");I don't know what version of FileWriter you are using, but not that I know of take two string parameters. You should try checking the API before trying to help someone, instead of just making things up.
To the OP:
The proper way to produce a file in UTF-8 format would be this:
OutputStreamWriter writer = new OutputStreamWriter(new FileOutputStream("filename"), "UTF-8");Then to read the file, you would use:
InputStreamReader reader = new InputStreamReader(new FileInputStream("filename"), "UTF-8"); -
File-Adapter create Files with length 0
Hello Guys,
the XI get messages from the Backend via RFC and when the File-Adapter writes the Message sometimes with length 0
Can you help meHi Anton,
As Sudhir mentioned, there could be a problem of correct data. The best solution is :
Inside your RFC code just validate the code for empty values. e.g
IF NOT ITAB_RFC[] IS INITIAL.
**ITAB_RFC internal table data.
ENDIF.
and after validating this, if still you are getting some file with "0" length, then check File Content Conv in your CC.
Regards,
Sarvesh
Maybe you are looking for
-
Error in executing interface Oracle to Oracle
hello i am designing an interface to load data from 2 oracle database. i am having the error below while i excute the interface: in seq :Insert flow into I$ table i get this error ORA-02019: connection description for remote database not found. i hav
-
E71 update firmware 400.21.013 didn't fix the came...
I already update the firmware to 400.21.013 with hope this will fix the camera problem with purple tint and quality more better. After update i'm really disappointed because the purple tint is there and the picture quality still worst. E71-1 (26), RM
-
My phone cant sync on my itunes, looking for mobile device software
my phone sync doesnt work.it say my apple mobile device not started. help please. thanks sam
-
Firewire 800 enough for burn using dual burners? And what drive to buy?
I have a Mac Pro with a SuperDrive. (I think it's a Pioneer). Tomorrow I'll open the lid and check if the connectors are SATA or IDE. Being either one, I now wonder if I can continue to burn from my external FW800 disc, using the "multiple burner opt
-
Can't publish changes - buttons disabled
Dear all, I can not publish changes to my sitethrough iWeb. The buttons are disabled to publish and I have no ideawhat to do... I have to update my website! I have 2 mac computers athome, but just one of them is with all the site that I've donebefore