Internal Attributes with user defined X-ORIGIN in DSEE 7?
Hello!
I am noticing DSEE 7 has some internal attributes listed as user defined in the schema:
attributetypes: ( 2.16.840.1.113730.3.1.605 NAME 'entryid' DESC 'Sun ONE defined attribute type' EQUALITY 2.5.13.2 SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation X-ORIGIN ( 'Sun-Java(tm)-System-Directory/6.3.1' 'user defined' ) )
attributetypes: ( 2.16.840.1.113730.3.1.603 NAME 'dncomp' DESC 'Sun ONE defined attribute type' EQUALITY 2.5.13.1 SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 NO-USER-MODIFICATION USAGE directoryOperation X-ORIGIN ( 'Sun-Java(tm)-System-Directory/6.3.1' 'user defined' ) )
attributetypes: ( 2.16.840.1.113730.3.1.604 NAME 'parentid' DESC 'Sun ONE defined attribute type' EQUALITY 2.5.13.2 SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation X-ORIGIN ( 'Sun-Java(tm)-System-Directory/6.3.1' 'user defined' ) )
My customer wants to manage/archive their custom schema by scooping up 99user.ldif and submitting it into a file-based version tracking system (Perforce). However, since these internal DS attributes are now listed as user defined, they are going to hang around in 99user.ldif, making my customer feel dissatisfied and untidy. Actually, I see their point.
So, can I remove the X-ORIGIN of "user defined" on these and stick them in another schema LDIF? Are we planning on changing the schema definitions on these internal DS attributes in the future?
Yes, I am guessing that somewhere in the 7.0 code the schema definitions for these attributes got tagged with an X-ORIGIN of "user defined" by accident. So whenever the schema gets modified via LDAP, these attributes will get written into 99user.ldif. I suspect removing them from 99user.ldif won't do any harm, but as long as they have that X-ORIGIN, they will keep coming back. I took the attributeType definitions and removed the X-ORIGIN of "user defined", put them in another LDIF named something like "98dsee-internal.ldif" and put that into the schema directory. My only worry is whether the existence of a different definition for these attributes in the schema directory will cause any problem down the road. So far, it hasn't.
Similar Messages
-
Retain standard SAP order type after copying with user defined order type
Hello SAP Gurus,
We have a requirement of retaining the standard SAP order types after copying with User defined order types. But the issue is we don't want to see the standard SAP order type such as PM01, PM02 in production system while using transaction like IW31 etc.
Is there anybody who has answer to retain these stanadard SAP order types without deleting from system configuration?
Thanks in advance.
Cheers,
VaibhavVaibhav,
When you F4 on the order type field in IW31 you will get the popup showing the order type list. At the top of this list is a button with a green "+" sign (Insert in personal list).
You can use this button to select your favourite list.
This function is available in most F4 drop-down lists.
However, you cannot set this setting for all users. You will need to write an ABAP program to do this.
PeteA -
Problem with user-defined functions in XQuery String
hello
i've a problem with user-defined functions in XQuery String
details are here (the code is not Human-readable via forum's embedded editor ?? strange)
http://docs.google.com/Doc?id=ddqwddsr_21c96d9x
thanks !!See
michaels> select xmlquery('declare function local:test_function($namecmp as xs:string?, $inputtype as xs:string?) as xs:string?
return {$inputtype}
local:test_function("1","2")' returning content) o from dual
Error at line 5
ORA-19114: error during parsing the XQuery expression:
LPX-00801: XQuery syntax error at '{'
3 return {$inputtype}
- ^
michaels> select xmlquery('declare function local:test_function($namecmp as xs:string?, $inputtype as xs:string?) as xs:string?
$inputtype
local:test_function("1","2")' returning content) o from dual
O
2
1 row selected. -
Display of document line items with user defined fields
Hi all,
I have created two user defined fields in CI_COBL structure and they are available on OBC4 screen. I maintained optinal for entry in the screen layout. I posted one document with user defined fields and saved.
Now the document is updated in BSEG table. I then display the document, and it display the doucment
But when i double click on the one of the line items system gives an error that there is some problem in customising and entries missing in Table COBM.
I checked OXK3 and see that in field information for user fields, it says entries maintained in table COBM.
But still i couldnt display my line items in detail.
Any solutions
Thanks in advance
RamYes your are looking at the correct sap note.
Things look pretty straight forward in the notes documentation.
1)Extend the VBKRED structure with the fields you want.
2)Populate thse values in the user exit in program DBKMVF02 in FORM routine USER_EXIT_FUELLEN_XVBKRED.
For extending a standard structure you need to create a zstructuree in se11 first and then append it to the standard structure.
In your case you need to extend VBKRED_EX1 structure rather than VBKRED.
Regards,
ravi -
Error erase Queries in Query Manager- The query is used with user-define...
Hello Experts
I have deleted a User Field that had a Formatted Search and now I can not remove it because it is linked according to a UF, the error message is as follows:
"The query is used with user-defined values [Message 952-23]"
There will be a way to resolve this issue???
Thanks in advanceHi Juan,
I have tried this very limited, but the formid, is this a number in your case?
SELECT * from cshs t0 inner join ouqr t1 on t0.queryid = t1.intrnalkey
where t1.qname = '[%0]'
Running this query I can get the form id that I need to recreate, but I have a feeling you already know the form id, is this correct?
- Is there an error when you try to recreate the form id?
- Will it not let you recreate the same form id because the id is given by the system?
If it is not possible to recreate the form id, please prepare a backup and log a message. Support should be able to correct the entry in table cshs.
Hope it helps.
Jesper -
Personalization Publication with user defined / multiple / discrete values
Hello,
I try to personalize a main report ( with Enterprise XI 12.1.0, Crystal Report XI )
( parameter p_company_code ( as string ), with user defined / multiple / discree and range values )
with dynamic recipients ( Crystal Report ).
For a single value it works.
But I did not find a solution how to set up the values for my parameter p_company_code so that I can start the main report
with the following company codes ( 4711, 4712, 0815-0890 ) for one recipients ( only one report for all this company codes )
Thans for your help
H. BlumHi Fabio,
It works as follows.
let's say you have 3 multiple single lines for your cost center variable.
once you are in the folder, select any single value & the layout is ready for planning with the corresponding cost center.
now, select the "Cost center variable row" in the header of the folder within section "Name of Variable" & click on "Trash Can" icon to "Delete Selection" of variable.
this basically deletes all the entered selections (3 entries) & displays for all.
It works this way, because we don't have "resriction of values required by user".
if am not wrong & correct me if am wrong,
overall, this is nothing but equal to "planning level not restricted with any variable".
I just tested this & the flaw in this is that, it is not only displaying for all the initially entered 3 lines but it displays for each & every cost center irrespective of the variable selections.
hope it is clear. -
ALV with user-defined buttons on toolbar in wd abap
Hi All,
I have to create an alv with user defined buttons in wd abap on its toolbar.Could any one tell me in detail about it or provide me with any tutorial based on it.
Thanking you all in advance.DATA: LR_CMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE.
DATA: LR_INTF_ALV TYPE REF TO IWCI_SALV_WD_TABLE.
LR_CMP_USAGE = WD_THIS->WD_CPUSE_ALV( ).
IF LR_CMP_USAGE->HAS_ACTIVE_COMPONENT( ) EQ ABAP_FALSE.
LR_CMP_USAGE->CREATE_COMPONENT( ).
ENDIF.
LR_INTF_ALV = WD_THIS->WD_CPIFC_ALV( ).
WD_THIS->M_MODEL = LR_INTF_ALV->GET_MODEL( ).
DATA: LR_FUNCTION TYPE REF TO CL_SALV_WD_FUNCTION.
LR_FUNCTION =
WD_THIS->M_MODEL->IF_SALV_WD_FUNCTION_SETTINGS~CREATE_FUNCTION(
ID = 'ISSUE' ).
DATA: LR_BUTTON TYPE REF TO CL_SALV_WD_FE_BUTTON.
CREATE OBJECT LR_BUTTON.
LR_BUTTON->SET_TEXT( 'Issue/Receive' ).
LR_FUNCTION->SET_EDITOR( LR_BUTTON ).
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/101df93f-4b5c-2910-14aa-9eb0338c2110
Abhi -
Want to proceed with User defined fuction in Mapping i dont know java
Hi all ,
i dont know Java , i want to proceed with user defined fuction , i have worked with ABAP but not with java , i do want abt some knowledge about it ,
thanks
sridharHi,
Please see the below links ,
/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i
Difference in using java,xslt,message mapping
/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i
/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii
/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-iii
/people/stefan.grube/blog/2006/10/23/testing-and-debugging-java-mapping-in-developer-studio
/people/thorsten.nordholmsbirk/blog/2006/08/10/using-jaxp-to-both-parse-and-emit-xml-in-xi-java-mapping-programs
/people/rahul.nawale2/blog/2006/07/18/java-mapping-an-alternate-way-of-reading-a-csv-file
/people/amol.joshi2/blog/2006/03/10/think-objects-when-creating-java-mappings
XSLT Mapping
/people/prasadbabu.nemalikanti3/blog/2006/03/30/xpath-functions-in-xslt-mapping
/people/sreekanth.babu2/blog/2005/01/05/design-time-value-mappings-in-xslt
/people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
XSLT Mapping with java enhancement
/people/pooja.pandey/blog/2005/06/27/xslt-mapping-with-java-enhancement-for-beginners
Regards
Chilla.. -
It would be very nice and convenient to be able to tag and filter "My Music" (playlists, songs, albums and artists) with user-defined tags. I'm sure quite a few users would like to classify their music by genre. Myself, I would like to tag my albums, assigning them to different virtual collections.
Updated: 2015-07-23Hello and thanks for the feedback!
A similar idea has also been suggested here:
https://community.spotify.com/t5/Live-Ideas/Your-Music-Grouping-or-Sorting-by-Tags/idi-p/744947
Add your kudos and comments there please! ;) -
Dealing with User Defined Tables with the DI Server
I have a general question about the best way of working with the data in user defined tables using the DI Server. It appears from previous posts that it is not possible to use the standard methods such as UpdateObject. Also since update/insert and delete statements or explicitly forbidden using the ExecuteSQL method then how do we interact with the data in the tables?
Do we need to code our own data access layer for this type of access and is this a good practice?
Is this type of functionality going to be available in a future release of the DI Server?
ThanksUsing SQL for Update/Insert/Delete is not forbidden on UDTs (at least non-UDO UDTs; UDO UDTs are somehow in a gray area since they carry internal fields + e.g. inserts require further manipulation in B1 tables...)...
I.e. using ExecuteSQL to add data into UDTs is OK for DI Server...
HTH,
Frank -
Need help with user defined function
Hello SDN,
I need some help with a user-defined function. My source message contains multiple
generic records (1000 char string), and my target message is 1 header record,
then multiple generic records. See description of source and target messages below:
Source:
GenericRecordTable 1..unbounded
Row (1000 char string)
Target:
Field1 (char5)
Field2 (char5)
Field3 (char5)
IT_Data
GenericRecordTable 1..unbounded
Row (1000 char string)
Basically, what I need to do in my user defined funtion is to map the first record
in my source record to the 3 header fields, then map all of the rest of the records
(starting from line 2) into the GenericRecordTable.
Can someone please help me with the code for the user defined function(s) for this
mapping?
Thank you.hi,
Activities
1. To create a new user-defined function, in the data-flow editor, choose Create New Function (This
graphic is explained in the accompanying text), which is located on the lower left-hand side of the
screen. In the menu, choose Simple Function or Advanced Function.
2. In the window that appears, specify the attributes of the new function:
Name
Technical name of the function. The name is displayed in the function chooser and on the data-flow
object.
Description
Description of how the function is used.
Cache
Function type (see above)
Argument Count
In this table, you specify the number of input values the function can process, and name them. All
functions are of type String.
3. In the window that appears, you can create Java source code:
a. You can import Java packages to your methods from the Imports input field, by specifying them
separated by a comma or semi-colon:
You do not need to import the packages java.lang., java.util., java.io., and java.lang.reflect. since
all message mappings require these packages and therefore import them. You should be able to
access standard JDK and J2EE packages of the SAP Web Application Server by simply specifying the
package under Import. In other words, you do not have to import it as an archive into the Integration
Repository. You can also access classes of the SAP XML Toolkit, the SAP Java Connector, and the
SAP Logging Service (see also: Runtime Environment (Java-Mappings)).
In addition to the standard packages, you can also specify Java packages that you have imported as
archives and that are located in the same, or in an underlying software component version as the
message mapping.
b. Create your Java source text in the editor window or copy source text from another editor.
4. Confirm with Save and Close.
5. User-defined functions are limited to the message mapping in which you created the function. To
save the new function, save the message mapping.
6. To test the function, use the test environment.
The new function is now visible in the User-Defined function category. When you select this category,
a corresponding button is displayed in the function chooser pushbutton bar. To edit, delete, or add the
function to the data-flow editor, choose the arrow next to the button and select from the list box
displayed.
http://help.sap.com/saphelp_nw04/helpdata/en/d9/718e40496f6f1de10000000a1550b0/content.htm
http://java.sun.com/j2se/1.5.0/docs/api/
/people/krishna.moorthyp/blog/2006/07/29/documentation-html-editor-in-xi
/people/sap.user72/blog/2006/02/06/xi-mapping-tool-exports
http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm
UDF -
http://help.sap.com/saphelp_nw04/helpdata/en/22/e127f28b572243b4324879c6bf05a0/content.htm
Regards -
Need help with User Defined Aggregates - Statistical Mode
I would like to use User Defined Aggregates (UDAG) to calculate the Statistical Mode. The mode is the most frequent value among a set of observations.
http://en.wikipedia.org/wiki/Mode_(statistics)
In my application I aggregate an address level table of 130 million records to a ZIP4 level table of roughly 36 million records. Some ZIP4s will have 1 record, some may have 1000+ records. I need to use statistical modes to pick the most frequent values for some of the attribute fields.
Presently I am using an approach from AskTom using the Analytic functions combined with nesting subqueries. The code works but it's cumbersome. I feel user defined aggregates should be able to perform a simpler more straightforward integration into SQL queries.
I've reviewed several of the other posts in this forum on User Defined Aggregates. I feel I could write a procedure that calculates and average or merely concatenates strings. But this particular application of the UDAGs is stumping me. Rather than just increased a running total or count or concatenating a master string, you'd have to keep every distinct values and a count for how many times that value occured. Then evaluate those items to pick the most frequent to pass to output. I'm finding it difficult as a novice.
Any, I'll post a quick example using the present approach that I want to replace with a UDAG:
Here's a small table:
DRD> desc statmodetest
Name Null? Type
ID NUMBER
STATE VARCHAR2(2)
REGION VARCHAR2(1)
1* select * from statmodetest
DRD> /
ID ST REG
1 TX W
2 MN W
3 CA W
4 VA E
5 VA E
6 KY E
7 MN W
8 FL E
9 OK W
10 NC E
11 TX W
12 WI E
13 CA W
14 MI E
15 FL E
16 FL E
17 TN E
18 FL E
19 WI E
20 MA E
Now here's a query approach that gets the MODE State value for each Region.
1 SELECT DISTINCT region, mode_state, mode_state_cnt FROM (
2 SELECT region,
3 FIRST_VALUE(state) OVER (PARTITION BY region ORDER BY stcnt DESC) AS mode_state,
4 FIRST_VALUE(stcnt) OVER (PARTITION BY region ORDER BY stcnt DESC) AS mode_state_cnt
5 FROM (
6 select id, state, region, COUNT(state) OVER (PARTITION BY region, state) AS stcnt
7* from statmodetest t ) )
DRD> /
R MO MODE_STATE_CNT
W CA 2
E FL 4
What I'd like to be able to do is have a UDAG that supports this style query:
SELECT region, UDAGMODE(state)
FROM statmodetest
GROUP BY region ;
Thanks,
PaulThis is not what you want..?
SQL> select * from test;
ID STATU REGIO
1 TX W
2 MN W
3 CA W
4 VA E
5 VA E
6 KY E
7 MN W
8 FL E
9 OK W
10 NC E
11 TX W
12 WI E
13 CA W
14 MI E
15 FL E
16 FL E
17 TN E
18 FL E
19 WI E
20 MA E
20 rows selected.
SQL> select region,max(status) keep(dense_rank first order by cnt desc,status) st,
2 max(cnt)
3 from(
4 select region,status,count(*) cnt
5 from test
6 group by region,status)
7 group by region;
REGIO ST MAX(CNT)
E FL 4
W CA 2
<br>
<br>
Or I misread..? -
Urgent Help Needed - Associating Statistics with User-Defined Functions
Hello,
We have an appication uses cost-based optimizer and uses a lot of TO_DATE and SYSDATE calls in FROM and WHERE clauses. For certain reasons, every call to TO_DATE and SYSDATE has been replaced by MY_TO_DATE and MY_SYSDATE respectively (which in turn call built-in functions). However, cost based optimizer is behaving strangely, which is understanble, based on the lack of user-defined functions statistics. I am under the impression that I should use something like:
ASSOCIATE STATISTICS WITH FUNCTIONS my_to_date DEFAULT SELECTIVITY ?;
ASSOCIATE STATISTICS WITH FUNCTIONS my_to_date COST (?,?,?);
ASSOCIATE STATISTICS WITH FUNCTIONS my_sysdate DEFAULT SELECTIVITY ?;
ASSOCIATE STATISTICS WITH FUNCTIONS my_sysdate COST (?,?,?);
but what should the values (?) be?. I guess I want to replicate TO_DATE and SYSDATE values, but how would I find out what they are? Thanks in advance...
P.S. I am also looking for workarounds (I cannot create a synonym for TO_DATE right?), so any help is welcome!!!Hi emmalou69 ,
You told your actual parameter is
5, 5, 7.3 and 'z'
so change your method like
public static int test(int x, int y, double d, char ch)
because 5 - int; 7.3- float or double; z is char.
your method returns
public static int.
so you should return only int variable. but in your code you mentioned double. it's not correct.
The original code should look like
public class rubbish
public static void main(String args[]){
rubbish f = new rubbish();
f.test(5, 5, 7.3 ,'z');
public static int test(int x, int y, double d, char ch)
int value;
x = 5;
y = 5;
d= 7.3;
ch = 'z';
value =((int) d + x + y + ch);
System.out.println( x + ch + d + y);
return value;
}//here int value of z is 122.
and int(7.3) is 7
so 7+5+5+122 = 139.3
but value =((int) d + x + y + ch); returns 139. because you convert double to int that is 7.3 to 7
If it is useful, rate me duke dollars,
Thanks -
Problem with user defined selection-screens
Hi,
in my case, i have a default selection screen and a user defined selection screen. Now, after selecting a radio button in default selection screen, the user defined selection screen is called. after executing it report output is displayed. now if i press f3 (back) it is going to default selection screen. here my requirement is, when i press f3 it should go to the user defined selection.
Can u plz help me solve this.
bye n regards
sreeAny modifications to screen 1000 will be lost the next time the program is generated.
When the user hits the back key from the report output, your ABAP is restarted just like when you originally started it. That is why you are getting the default selection screen again.
Use the AT USER-COMMAND event. When BACK is hit from the report, use the SUBMIT command to re-execute the program, passing it the selections from the default selection screen. Leave out the RETURN option.
For help on filling the selection screen during SUBMIT, help is available at
http://help.sap.com/saphelp_470/helpdata/en/9f/dba51a35c111d1829f0000e829fbfe/frameset.htm -
Notification with user defined type results in PLS-00306: wrong number..
I created a user defined type TLogMessage:
CREATE OR REPLACE TYPE TLogMessage AS OBJECT
module VARCHAR2(4000),
severity NUMBER,
message VARCHAR2(4000)
I also created a multi-consumer queue using this type as payload.
My callback procedure in the package PK_SYST_LOGMESSAGE is defined as follows:
PROCEDURE DefaultLoggerCallback(
context RAW,
reginfo SYS.AQ$_REG_INFO,
descr SYS.AQ$_DESCRIPTOR,
payload RAW,
payload1 NUMBER
Finally, I registered the callback procedure as follows:
DBMS_AQADM.ADD_SUBSCRIBER(
queue_name => QUEUE_NAME,
subscriber => SYS.AQ$_AGENT(
name => 'default_logger',
address => NULL,
protocol => NULL
DBMS_AQ.REGISTER(
SYS.AQ$_REG_INFO_LIST(
SYS.AQ$_REG_INFO(
name => QUEUE_NAME || ':default_logger',
namespace => DBMS_AQ.NAMESPACE_AQ,
callback => 'plsql://MTDX.PK_SYST_LOGMESSAGE.DefaultLoggerCallback',
context => HEXTORAW('FF')
1
However, when I put a message in the queue using this procedure:
PROCEDURE LogMessage(
pModule VARCHAR2,
pSeverity NUMBER,
pMessage VARCHAR2
IS
vMessage TLogMessage;
vEnqueueOptions DBMS_AQ.ENQUEUE_OPTIONS_T;
vMsgProperties DBMS_AQ.MESSAGE_PROPERTIES_T;
vMessageHandle RAW(16);
BEGIN
vMessage := TLogMessage(module => pModule, severity => pSeverity, message => pMessage);
vEnqueueOptions.visibility := DBMS_AQ.IMMEDIATE;
vMsgProperties.correlation := pModule;
vMsgProperties.priority := -pSeverity;
-- Enqueue the message to all subscribers
DBMS_AQ.ENQUEUE(
queue_name => QUEUE_NAME,
enqueue_options => vEnqueueOptions,
message_properties => vMsgProperties,
payload => vMessage,
msgid => vMessageHandle
EXCEPTION
WHEN no_subscribers THEN
-- No subscribers on the queue; ignore
NULL;
END;
I can see the message in the queue, by querying the queue view. I can also see that Oracle tried to call my callback procedure, because in the trace file I see the following:
*** 2009-02-13 08:52:25.000
*** ACTION NAME:() 2009-02-13 08:52:24.984
*** MODULE NAME:() 2009-02-13 08:52:24.984
*** SERVICE NAME:(SYS$USERS) 2009-02-13 08:52:24.984
*** SESSION ID:(609.3387) 2009-02-13 08:52:24.984
Error in PLSQL notification of msgid:4F7962FEDD3B41FA8D9538F0B38FCDD1
Queue :"MTDX"."LOGMESSAGE_QUEUE"
Consumer Name :DEFAULT_LOGGER
PLSQL function :MTDX.PK_SYST_LOGMESSAGE.DefaultLoggerCallback
: Exception Occured, Error msg:
ORA-00604: Fout opgetreden bij recursief SQL-niveau 2.
ORA-06550: Regel 1, kolom 7:
PLS-00306: Onjuist aantal of type argumenten in aanroep naar 'DEFAULTLOGGERCALLBACK'..
ORA-06550: Regel 1, kolom 7:
PL/SQL: Statement ignored.
So.. how many parameters does Oracle expect, and of what type? Is there any way to find out? What is wrong with my code?Ok, found it... I had defined the last parameter of the callback procedure as 'payload1' (that is: 'payload-ONE') instead of 'payloadl' ('payload-ELL'). It all works like a charm now.
What a way to waste two whole days!
Maybe you are looking for
-
Optimize a loop in a SAP standard program
Hi gurus, Iv been optimizing this code.. inlcude workarea but still the same. It has 1000 records after retrieving the data from the select statement for less than 1 minute. It takes 10-12 mins in looping. I already debug it and PERFORM takes half a
-
Smileys are not displaying in the message. How can I see the smileys?
Can anyone help me?
-
Why will it not convert Russian pdf to word doc?
I am trying to convert a russian language pdf to word doc, unsuccesfully. Can it be done?
-
Future upgrading from current MBP express card 34 capability to54 possible?
My MBP arrived this morning and (my bad) I just noticed lack of FW800 port. I came here to discussions before tearing the seal on the protective envelope in case I might need to return based on your answers: From reading here, I see people saying exp
-
How to get command result to a variable
Hello, I have the following commands to get the number of lines that contains "here is the line". However the variable linecount is always null for me. Any suggestion? Thanks! set linecount=(type test.txt | find /c "here is the line') echo linecount