How to create a csv file with NCS attributes?
Hi
i installed Cisco Prime NCS and trying to perform bulk update of device credentials with csv file.
How to create a csv file with all required attributes?
This is part of NCS online help talking about this topic:
Bulk Update Devices—To update the device credentials in a bulk, select Bulk Update Devices from the Select a command drop-down list. The Bulk Update Devices page appears.You can choose a CSV file.
Note The CSV file contains a list of devices to be updated, one device per line. Each line is a comma separated list of device attributes. The first line describes the attributes included. The IP address attribute is mandatory.
Bellow is test csv file i created but does not work:
10.64.160.31,v2c,2,10,snmpcomm,ssh,zeus,password,password,enablepwd,enablepwd,60
10.64.160.31,v2c,2,10,snmpcomm,ssh,zeus,password,password,enablepwd,enablepwd,60
The error i am getting while importing this file:
Missing mandatory field [ip_address] on header line:10.64.160.31,v2c,2,10,snmpcomm,ssh,zeus,password,password,enablepwd,enablepwd,60
Assistance appreciated.
It looks like the IP address field is incorrectly set.,
It should be as follows
{Device IP},{Device Subnet Mask}, etc etc
so a practical example of the aboove could be (i dont know if this is completely correct after the IP address / Subnet Mask)
10.64.160.31,255.255.255.0,v2c,2,10,snmpcomm,ssh,zeus,password,password,enablepwd,enablepwd,60
below is a link to the documentation
http://www.cisco.com/en/US/docs/wireless/ncs/1.0/configuration/guide/ctrlcfg.html#wp1840245
HTH
Darren
Similar Messages
-
How to create a CSV file in java
how to create a CSV file in java
this is the code that I have used in a hp project:
private static final String DELIMIT = ",";
StringBuffer buf = new StringBuffer();
public void addString(String str){
buf.append(toEscapedStringLiteral(str.replaceAll(" ","").trim())).append(DELIMIT);
public void sendFile( String strData ,
String strTitle,
String strContType,
HttpServletResponse res ) throws IOException {
byte[] _filedata=strData.getBytes();
res.setContentType( strContType );
res.setHeader( "Content-Disposition", "attachment;filename="+ strTitle );
DataOutputStream out = new DataOutputStream( res.getOutputStream() );
out.write( _filedata, 0, _filedata.length );
out.close();
public void addStringWhithReturn(String str){
buf.append(toEscapedStringLiteral(str.replaceAll(" ","").trim()));
buf.append( "\n" );
private String toEscapedStringLiteral( String charSeq ) {
if ( null == charSeq ) {
charSeq = "";
return "\"" + charSeq + "\"";
....hope its help
kou -
How to create a pdf file with CS5
Hello, I'm new to PhotoShop CS5 and haven't figured out yet (despite two hours of trying) how to create a pdf file with pictures and texts. Can someone please help me with this ? The "help" button in CS5 doesn't seem to cover this question. Nor do the FAQs.
Thank you very much.Save As... Photoshop PDF.
-
How to create a .exe file with eclipse 3.1
Hello every body. I want to know how create a .exe file with eclipse 3.1. A friend tell me it's possible but he forgot how ! So I ask my question ay you, how can I do that? I think it's like in Dev-C++, when he compiling the programme he create
a .exe file but in eclipse, i don't know how do that. Please help me, I have finish some programs but I don't know how create .exe file for give their at my friend.
Thank's.
P.S : I'm a young french so maybe there are some mistake on my post. I hope you understand it.There might be a plugin in eclipse to do this, but I don't know what it is.
The normal way to deploy a program is to create an executable jar file. This will be a .jar not a .exe.
Or you can try ggogle.
http://www.google.co.uk/search?q=java+exe -
How to create a .CSV file & place it in Application server
Hi All,
I have a requirement like .
1.Create a .CSV file by using report output data.
2.The .csv file should be placed in application server.
When user will execute the report,
automatically a .csv has to generate and that should be available at application server.
points will be rewarded.
Thanks,
AnilHi,
Whatever the final output internal table is there loop that
DATA : begin of i_final occurs 0,
field1(20),
field2(20),
end of i_final.
DATA : v_filepath (200) TYPE c Value '/data/sapdata/test.csv' .
DATA : begin of i_file_data occurs 0,
Rec(500),
end of i_file_data.
LOOP AT i_final.
CONCATENATE i_final-field1 i_final-field2 INTO i_file_data-rec SEPARATED BY ','.
APPEND i_file_data.
CLEAR i_file_data.
ENDLOOP.
OPEN DATASET v_filepath IN OUTPUT FOR TEXT MODE.
LOOP AT i_file_data.
TRANSFER i_file_data-rec TO v_filepath.
ENDLOOP.
CLOSE v_filepath.
To check the file goto Tcode->AL11>data/sapdata/test.csv. -
How to create a new file with existing file's resource fork?
Hello,
I would like to create a new file that has the resource fork of an existing file. I had though of making a copy of the existing file, seek to the beginning of the copy and write the new data, but for large files, that creates the whole file even when not needed. I currently create the new file with [NSFileManager createFileAtPath: contents: attributes:], but attributes do not include resource fork items, like custom icons, color label, etc.
[NSURL resourceValuesForKeys] gives a common subset of resource data, like icons and color label, but that's about it. Is there some way to get the resource fork or a copy of the file without getting the whole file?
ThanksWhat are you trying to do here? While resource forks might still be quasi-supported, you really shouldn't be thinking about them as such. Instead, think in terms of extended attributes. You can use the low-level xattr() functions to get some of that or you can use the new NSURL methods.
-
How to create a text file with data.
Hi,
I am writing java code for testing an application, some times test can failed in some cases, I want to display an error message in text file. To that I written the code as like,
BufferedWriter bout;
bout =new BufferedWriter(new FileWriter("test.txt"));
String str=Your input data is not match with pattern
bout.write(str);but here it is creating a text file test without any data in it.
Can any body help that to execute the program properly
Regards
Bunttysabre150 wrote:
JoachimSauer wrote:
You didn't close your BufferedWriter. Since it's buffered it probably didn't write anything to the underlying file.
Generally you must close every Writer/OutputStream that you no longer use or it won't be written reliably.It's not quite as simple as that. If you have a chain of Writers / OutputStreams then you only have to close() the outer most one since each is responsible for closing any Writer/OutputStream that it wraps. If you do decide to close them individually (a bad idea but people do do it) then you MUST close them starting from the outer most one and working to the most inner one or you will not guarantee to flush any buffered content.Of course. I might have used a misleading phrasing here. What I meant is "Every time you are done with a Writer, you must close it" and not "You must close *every* Writer that you used". Thanks for the clarification. -
How can I copy a file with all attributes
Is there a way within Java to copy a file, with all its file attributes?
I have seen a number of custom methods posted on these forums for copying the contents of a file to a new file with the same name in another location. The problem is that these methods don't copy the file attributes, particularly the creation date.
If there is no way to do this in Java, is there a way to have Java execute an operating system command, such as "COPY" or to access the O/S to change the file attributes?
Thanks for any help you can provide.This is how runtime executes a batch file.
try {
Process p = Runtime.getRuntime().exec("cmd /c start c:\\batfile.bat");
p.waitFor();
} catch (Exception e) {
System.out.println(e.toString());
} -
How to create a .java file with multiple classes
I have all the below classes declared in a file say ABC.java under
a common package called somepackage
Abstract class A
Void abstract metod1();
Void metod2();
Class B
void method3();
Void method4();
Class C
void method1();
Void method2();
In Client.Java
On compiling the Client.Java I get errors
Import somepackag.*;
Class Samp extents A
void Method1()
Public class Client
A a1 =new Samp(); //error undeclared class A
B b1 = new B1();//error undeclared class B
C c1 = new C1();//error undeclared class C
is it possible to have all the class declared in one file ( i dont need mutiple classes, as this file will be autogenerated , i need all classes in one file) and use the classes inside this in the some client app
regards
MPPeetzore wrote:
As long as you have only one public class and your .java file is named after it you shouldn't have any problem.I did exactly that, but still i get the same error "Cannot find symbol"
i have used the import command on top as import somepackage.*;
Edited by: mpjava on Jun 2, 2009 1:29 AM
Edited by: mpjava on Jun 2, 2009 1:30 AM -
Hi,
I've this table:
CREATE TABLE TAB_BW (
COD VARCHAR2 (2),
COD_ID VARCHAR2 (20),
DESCRIPTION VARCHAR2 (64),
AREA NUMBER);
with these data:
INSERT INTO TAB_BW ( COD, COD_ID, DESCRIPTION, AREA ) VALUES (
'00', '000099', 'MY HOME', 21.654);
INSERT INTO TAB_BW ( COD, COD_ID, DESCRIPTION, AREA ) VALUES (
'01', '001234', 'MY HOME, MY DOG', 2111.3232);
INSERT INTO TAB_BW ( COD, COD_ID, DESCRIPTION, AREA ) VALUES (
'11', '033333', 'OK, NO', 1222.22);
INSERT INTO TAB_BW ( COD, COD_ID, DESCRIPTION, AREA ) VALUES (
'03', '111111', 'NOW', 12);
INSERT INTO TAB_BW ( COD, COD_ID, DESCRIPTION, AREA ) VALUES (
'05', '000001', 'GOOD BYE', 1234567.34234);
Now I'd like to create a CSV file with these data
I created this pl/sql stored procedure:
CREATE OR REPLACE procedure BW is
file_a sys.utl_file.file_type;
file_l sys.utl_file.file_type;
DATA_ELAB varchar2(50);
MSG varchar2(200);
directory varchar2(50) := 'C:\EXTRACT';
file_name varchar2(50) := 'BW';
VAR_COD VARCHAR2(66);
VAR_COD_ID VARCHAR2(20);
VAR_DESCRIPTION VARCHAR2(64);
VAR_AREA VARCHAR2(64);
CURSOR CUR_IMM IS
SELECT COD,
COD_ID,
DESCRIPTION,
AREA
FROM TAB_BW;
PROCEDURE GET_DATA_DAY IS
begin
SELECT to_char(SYSDATE,'Day dd Month yyyy * hh24:mi:ss')
INTO DATA_ELAB
FROM DUAL;
end GET_DATA_DAY;
PROCEDURE OPEN_FILE IS
BEGIN
file_a :=
sys.utl_file.fopen(directory,file_name||'_'||TO_CHAR(SYSDATE,'DD_MM_YYYY')||'.
csv','w');
END OPEN_FILE;
PROCEDURE CLOSE_FILE IS
BEGIN
sys.utl_file.fclose(file_a);
END CLOSE_FILE;
PROCEDURE NOT_FOUND IS
BEGIN
sys.utl_file.put_line(file_l,('DATA NOT FOUND'));
END NOT_FOUND;
PROCEDURE WRITE_DATA IS
BEGIN
sys.utl_file.put_line(file_a,VAR_COD||','||VAR_COD_ID||','||VAR_DESCRIPTION||'
,'||VAR_AREA);
END WRITE_DATA;
BEGIN
OPEN_FILE;
GET_DATA_DAY;
OPEN CUR_IMM;
IF (CUR_IMM%NOTFOUND)
THEN
NOT_FOUND;
ELSE
LOOP
FETCH CUR_IMM INTO VAR_COD,
VAR_COD_ID,
VAR_DESCRIPTION,
VAR_AREA;
EXIT WHEN (CUR_IMM%NOTFOUND);
WRITE_DATA;
END LOOP;
END IF;
CLOSE CUR_IMM;
GET_DATA_DAY;
CLOSE_FILE;
END BW;
but when I open the file BW.csv
I get these output:
COD......COD_ID...........DESCRIPTION...........AREA
00.......000099...........MY HOME...............21.654
01.......001234...........MY HOME...............MY DOG...........2111.3232
11.......033333...........OK....................NO................1222.22
03.......111111...........NOW....................12
05.......000001...........GOOD BYE...............1234567.34234
I'd like to get this output when I open the file BW.csv:
COD......COD_ID...........DESCRIPTION...........AREA
00.......000099...........MY HOME...............21.654
01.......001234...........MY HOME, MY DOG.......2,111.3232
11.......033333...........OK, NO................1,222.22
03.......111111...........NOW....................12
05.......000001...........GOOD BYE...............1,234,567.34234
How Can I modify my procedure to get this output?
Thanks in advance!MY HOME and MY DOG
OK and NO
are in separated columns
I'd like to have it in same columnsEnclose the strings in double quotes
Something like
00.......000099..........."MY HOME"...............21.654Two more thing I just noticed:
- Some of your rows seems to have 5 columns instead of 4
- Excel is going to convert your Id to Numbers; 000 will be displayed as 99
By the way your format is just a fixed-length format but not a CSV-format.
CSV (comma separated values) would be something like
"COD";"COD_ID";"DESCRIPTION";"AREA"
"00";"000099";"MY HOME",21.654 -
How to create a PS file out of Freehand MX?
I am new to these forums, and wonder if anyone can help
clarify a question:
How to create a PS file with fonts embedded, out of Freehand
MX?
I am very late in making the transition to OSX /Freehand MX /
CS1 (better late than never).
Up until recently I have been using Freehand 8/9 under OS 9.2
to create a Postscript file, selecting 'Embed All Fonts' in the
save to file dialog box. Then distilling the PS file through
Acrobat Distiller 5 with press ready settings. All works fine and
no problems with the printed results.
Now running FH MX under OSX (10.2.8 Jaguar?) I have added a
virtual PS printer but I am unable to work out how to successfully
embed fonts, and would much appreciate any advice!! Thanks in
advance.I would be careful saying that the resolution is correct for
any
publication. Newspaper print is typically at 85 lpi where as
standard
press printing (even magazines) is 150 lpi or higher. These
require 170
and 300 ppi images, respectively. Not knowing what the
D6Dispatch
preset gives you I would think it's closer to 170 than 300
which would
not be enough for most print needs other than newspaper.
Also, your directions for finding the PS option are when
using OS X 10.3
or earlier, which is what the original poster is using. For
others, in
10.4, it is found in the "PDF" button found at the bottom of
all option
sections. It is labeled oddly as "Save PDF as PostScript".
Rich
JerseyThursday wrote:
> This is how I create press ready PDF files (for print
ads) from Freehand MX (os
> X) with the fonts embedded.
>
> Out of Freehand, I click print. In the print dialog box,
on the third
> pull-down bar (should say ?copies and pages?) I pull it
down to the ?output
> options? selection. From there I check the box ?save as
file? and then select
> postscript from the format options. This creates a PS
file.
>
> I then distill this PS file in Acrobat distiller (comes
with Acrobat
> Profesional) using the job option D6Dispatch (this is a
Columbus, OH
> newspaper). You can download this distiller option free
from:
>
http://printads.thisweeknews.com/
>
> Works great for 4 color and black and white ads. The
fonts are embedded and
> the resolution is correct for any publication
>
> -
How to write to csv file - Whats wrong with this???
Hi ALL,
I created a view that does all sorts of calculations, now I need to write the output in csv file. How do I do this thru a procedure? Sorry I've never had to create a csv file before and this is my first time.
Thanks!
Edited by: user5737516 on Nov 18, 2009 9:47 AMWhat is wrong with this?? Am I supposed to do something else before I could run this?
CREATE OR REPLACE DIRECTORY PAYROLL as 'c:\';
Directory created.
grant read, write on directory PAYROLL to my_user;
Grant succeeded.
CREATE OR REPLACE PROCEDURE baninst1.PAY_CSV(p_year NUMBER, p_qtr NUMBER) AS
CURSOR c_data IS
SELECT pay_period,
pay_group,
p_qtr,
check_date,
SUM(soc_sec_gross) as SOC_SEC_GROSS,
SUM(medicare_gross) as MEDICARE_GROSS,
SUM(TOTAL_DEDUCTIONS) as Total_Deductions,
SUM(NET_PAY) as Net_Pay
FROM baninst1.pzvdedn
WHERE pay_year = p_year
AND p_qtr = p_qtr
GROUP BY pay_period, pay_group, check_date, pay_qtr
ORDER BY pay_period, pay_group, check_date, pay_qtr;
v_file UTL_FILE.FILE_TYPE;
BEGIN
v_file := UTL_FILE.FOPEN('PAYROLL',
'pay_csv.csv',
'w',
max_linesize => 32767);
FOR cur_rec IN c_data LOOP
UTL_FILE.PUT_LINE(v_file,
cur_rec.pay_period || ',' ||
cur_rec.pay_group || ',' ||
cur_rec.check_date || ',' ||
cur_rec.soc_sec_gross || ',' ||
cur_rec.medicare_gross || ',' ||
cur_rec.total_deductions || ',' ||
cur_rec.net_pay);
END LOOP;
UTL_FILE.FCLOSE(v_file);
EXCEPTION
WHEN OTHERS THEN
UTL_FILE.FCLOSE(v_file);
END;
Procedure created.
SQL> exec baninst1.PAY_CSV(2009,1);
BEGIN baninst1.PAY_CSV(2009,1); END;
ERROR at line 1:
ORA-20003: File could not be opened or operated on as requested.
ORA-06512: at "BANINST1.PAY_CSV", line 45
ORA-06512: at line 1Edited by: user5737516 on Nov 18, 2009 9:16 AM
Edited by: user5737516 on Nov 18, 2009 9:18 AM
Edited by: user5737516 on Nov 18, 2009 9:20 AM
Edited by: user5737516 on Nov 18, 2009 9:35 AM -
How to import data from CSV file with columns separated by semicolon?
I migrate database from MS SQL 2008 to ORACLE 11g
I export data to CSV file from MS SQL
then I try to import it to Oracle
several tables goes fine using Import data option in the SQL Developer
Standard CSV files with data separated by comma were imported.
chars, date (with format string), and integer data are imported via import wizard without problems
the problems were when I try to import table with noninteger numbers with modal part separated by comma not by dot
comma is the standard separator for columns in CSV file
so I must change the standard separator to semicolon
then the import wizard have problem to correct recognize the columns data because it use only standard CSV comma separator :-/
In SQL Developer 1.5.3 Tools -> Preferences -> Migration -> Data Move Options
I change "End of Column Delimiter" to ; but it doens't work
Is this possible to change the standard column separator for import data wizzard in SQL Developer 1.5.3?
Or maybe someone know how to import data in SQL Developer 1.5.3 from CSV when CSV colunn separator is set to semicolon?A new preference has been added to customize the import delimiter in main code line. This should be available as part of future release.
-
How to generate a second csv file with different report columns selected?
Hi. Everybody:
How to generate a second csv file with different report columns selected?
The first csv file is easy (report attributes -> report export -> enable CSV output Yes). However, our users demand 2 csv files with different report columns selected to meet their different needs.
(The users don't want to have one csv file with all report columns included. They just want to get whatever they need directly, no extra columns)
Thank you for any help!
MZHello,
I'm doing it usually. Typically example would be in the report only the column "FIRST_NAME" and "LAST_NAME" displayed whereas
in the csv exported with the UTL_FILE the complete address (street, housenumber, additions, zip, town, state ... ) is written, these things are needed e.g. the form letters.
You do not need another page, just an additional button named e.g. "export_to_csv" on your report page.
The csv export itself is handled from a plsql procedure "stored procedure" ( I like to have business logic outside of apex) which is invoked by pressing the button "export_to_csv". Of course the stored procedure can handle also parameters
An example code would be something like
PROCEDURE srn_brief_mitglieder (
p_start_mg_nr IN NUMBER,
p_ende_mg_nr IN NUMBER
AS
export_file UTL_FILE.FILE_TYPE;
l_line VARCHAR2(20000);
l_lfd NUMBER;
l_dateiname VARCHAR2(100);
l_datum VARCHAR2(20);
l_hilfe VARCHAR2(20);
CURSOR c1 IS
SELECT
MG_NR
,TO_CHAR(MG_BEITRITT,'dd.mm.yyyy') AS MG_BEITRITT ,TO_CHAR(MG_AUFNAHME,'dd.mm.yyyy') AS MG_AUFNAHME
,MG_ANREDE ,MG_TITEL ,MG_NACHNAME ,MG_VORNAME
,MG_STRASSE ,MG_HNR ,MG_ZUSATZ ,MG_PLZ ,MG_ORT
FROM MITGLIEDER
WHERE MG_NR >= p_start_mg_nr
AND MG_NR <= p_ende_mg_nr
--WHERE ROWNUM < 10
ORDER BY MG_NR;
BEGIN
SELECT TO_CHAR(SYSDATE, 'yyyy_mm_dd' ) INTO l_datum FROM DUAL;
SELECT TO_CHAR(SYSDATE, 'hh24miss' ) INTO l_hilfe FROM DUAL;
l_datum := l_datum||'_'||l_hilfe;
--DBMS_OUTPUT.PUT_LINE ( l_datum);
l_dateiname := 'SRNBRIEF_MITGLIEDER_'||l_datum||'.CSV';
--DBMS_OUTPUT.PUT_LINE ( l_dateiname);
export_file := UTL_FILE.FOPEN('EXPORTDIR', l_dateiname, 'W');
l_line := '';
--HEADER
l_line := '"NR"|"BEITRITT"|"AUFNAHME"|"ANREDE"|"TITEL"|"NACHNAME"|"VORNAME"';
l_line := l_line||'|"STRASSE"|"HNR"|"ZUSATZ"|"PLZ"|"ORT"';
UTL_FILE.PUT_LINE(export_file, l_line);
FOR rec IN c1
LOOP
l_line := '"'||rec.MG_NR||'"';
l_line := l_line||'|"'||rec.MG_BEITRITT||'"|"' ||rec.MG_AUFNAHME||'"';
l_line := l_line||'|"'||rec.MG_ANREDE||'"|"'||rec.MG_TITEL||'"|"'||rec.MG_NACHNAME||'"|"'||rec.MG_VORNAME||'"';
l_line := l_line||'|"'||rec.MG_STRASSE||'"|"'||rec.MG_HNR||'"|"'||rec.MG_ZUSATZ||'"|"'||rec.MG_PLZ||'"|"'||rec.MG_ORT||'"';
-- DBMS_OUTPUT.PUT_LINE (l_line);
-- in datei schreiben
UTL_FILE.PUT_LINE(export_file, l_line);
END LOOP;
UTL_FILE.FCLOSE(export_file);
END srn_brief_mitglieder;Edited by: wucis on Nov 6, 2011 9:09 AM -
How to read columns of a Microsoft Excel .csv file with LabVIEW?
This should be simple. Any ideas on how to read an Excel file with csv extension using LabVIEW?
Thanks!Use the Read From SpeadSheet File.VI which you can find on the FILE I/O pallette.
"Read From Spreadsheet File
Reads a specified number of lines
or rows from a numeric text file beginning at a specified character offset and
converts the data to a 2D, single-precision array of numbers. You optionally can transpose the
array. The VI opens the file before reading from it and closes it afterwards.
You can use this VI to read a spreadsheet file saved in text format. This VI
calls the Spreadsheet String
to Array function to convert the data."
The CSV file is essentially a text file which uses commas as delimiters in the files structure.
Maybe you are looking for
-
Sitemesh with e-commerce 5.0
Hi, I am trying to use a decorator framework (Sitemesh) and it does not seem to work properly (or as intended) with SAP e-commerce 5 application. The reason I assume is that because the e-coomerce application uses sturts framework which does a forwar
-
MacBook Pro Power Management Issues and "Broken" Bootcamp
This is not a question but rather a solution I have discovered to a problem I have experienced many times now. My Core 2 Duo 15" MacBook Pro (non-LED version) has exhibited several issues with the systems power management hardware. Firstly: Occasiona
-
Hi all, I want to configure dbconsole manually... when i tired to do with emca i got followong errors INFO: This operation is being logged at /product/10.2.0/cfgtoollogs/emca/Sid/emca_2009-09-14_10-44-25-AM.log. Sep 14, 2009 10:44:58 AM oracle.sysman
-
HI some bdy had deleted APPL_TOP/admin ( in Test instance)) .ie admin directory which contains all the files for executing adutilities, how do i recreate this directory please let me knw the ans for this immediately. I am getting erros like this Java
-
Hey I am debugging a transaction PFCG (To create roles). In this when I set a breakpoint for a FM 'PRGN_RFC_CREATE_ACTIVITY_GROUP' used in this transaction , it is set successfully. But when i press 'F8', it does not stop there , needed some help on