GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Mainframe  >  JCL
Go To First  |  Previous Question  |  Next Question 
 JCL  |  Question 50 of 128    Print  
How can i search a character string in all the generations of a GDG dataset at once.Any code,utility will do?

  
Total Answers and Comments: 2 Last Update: February 15, 2007     Asked by: Sachin 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
August 25, 2006 15:18:09   #1  
srilkrishy Member Since: May 2006   Contribution: 5    

RE: How can i search a character string in all the gen...

Hi

You can use a SS range option available in the SORT tool to get the records that fall on a particular criteria.

Foe exapmle If you want to search the sting 'aaa' from the i/p file in between the colums 5 to 30 you need to code the SYSIN of the sort like below.

Include cond (5 25 ss eq c'abc').

25 is the differnece between the 30 and 5 (ie the total lenght of between 2 columns)

Since you want to get the details from the GDG You need to keep the SORT in file with out the generation group.

For example you are having the GDG version like

AAA.BBB.CCC.G00V001

AAA.BBB.CCC.G00V002

AAA.BBB.CCC.G00V003

Then your sort in will be

AAA.BBB.CCC

Please let me know if you need the complete code of the JCL.

Thank you

Krishy


 
Is this answer useful? Yes | No
February 15, 2007 02:40:05   #2  
Sanjay        

RE: How can i search a character string in all the gen...
As srilkrishy said if you want to search for 'aaa' the following would be the code..//**********************************************************************//*****THIS JCL WILL SEARCH THE STRING IN GIVEN PDS******//********************************************************************** //SEARCH EXEC PGM ISRSUPC // PARM (SRCHCMP // '') //NEWDD DD DSN AAA.BBB.CCC.G00V001 // DISP SHR //* DD DSN AAA.BBB.CCC.G00V002 //* DISP SHR //* DD DSN AAA.BBB.CCC.G00V003 //* DISP SHR //OUTDD DD SYSOUT (*) //SYSIN DD * SRCHFOR 'aaa'/* correct me if i am wrong with regards...
 
Is this answer useful? Yes | No

 Related Questions

The DD statement links the external dataset name (DSN) to the DDNAME coded within the executing program. It links the file names within the program code to the file names know to the MVS operating system. 
Latest Answer : DD statement is the DATA DEFINITION Statement.It's function is to give a symbolic name to a file. This will allow a program to access a file through this name so that the file name may be changed without effecting the program. There are several ...

PROC stands for procedure. It is 'canned' JCL invoked by a PROC statement. An instream PROC is presented within the JCL; a catalogued PROC is referenced from a proclib partitioned dataset.  
Latest Answer : I believe most give you the flavor of what it is. One of the main reasons for using a PROC is so that you can supply substitution variables. For example if you use a PROC to install software, you might supply a variable like &HLQ so that ...

What is a GDG? How is it referenced? How is it defined? What is a MODELDSCB? GDG stands for generation data group. It is a dataset with versions that can be referenced absolutely or relatively. It is defined by an IDCAMS define generation datagroup execution.

DISP=OLD denotes exclusive control of the dataset; DISP=SHR means there is no exclusivity.  
Latest Answer : DISP=OLD --> Exclusive HOLD. Read from beginning of dataset. But if u write, then it will overwrite on existing data. i.e old data is lost. DISP=MOD --> Exclusive HOLD. You can write to the end of the file without loosing your old ...

DISP=MOD is used when the dataset can be extended, ie, you can add records at the end of an existing dataset.  
Latest Answer : mod is a key word which is used with disp parameter as DISP=MODIt is used for if the dataset already exit then add the records to dataset at end of the data set. ...

What are the keywords associated with DCB? How can you specify DCB information? What is the OS precedence for obtaining that DCB information, ie. where does the system look for it first?
The keywords associated with the DCB parameter are LRECL, RECFM, BLKSIZE and DSORG. The DCB information can be supplied in the DD statement. The sysem looks for DCB information in the program code first. 

Data definition name is the eight character designation after the // of the DD statement. It matches the internal name specified in the steps executing program. In COBOL that's the name specified 
Latest Answer : The DD name is the logical 8 characters file name which alllows the pplication program to identify or tag the dataset.Whereas the DSN is the physical file name used by the MVS to identify the dataset.like in any application program we can write ...in ...

Latest Answer : Stepname.RC will ...

What could be the disposition parameter that i would have to use in the jcl if i have a file that has to be created newly for every successful run of the program ,but at the same time it should retain the old data if my program abend in the middle and restarts. could you please provide me the code?
Read Answers (5) | Asked by : vineeth

Latest Answer : This is a famous utility which also known as DUMMY UTILITY.If i give DSN=DUMMY then when the job is executed, the job gets scanned. It makes the OS to feel that there a virtual file & only read is permitted. ...


 Sponsored Links

 
Related Articles

ODP.NET - Presenting Master-Detail Information Using a Dataset

ODP NET Presenting Master Detail Information Using a Dataset As mentioned before a DataSet object can have its own relations between data tables existing in it We can add these relations dynamically at the client side within an application to represent master detail or hierarchical information The f
 

ODP.NET - Populating a Dataset with a Single Data Table

ODP NET Populating a Dataset with a Single Data Table A dataset is simply a group of data tables These data tables can be identified with their own unique names within a dataset You can also add relations between data tables available in a dataset mosgoogle The following code gives you the details o
 

jQuery Table Row Finished Code

jQuery Table Row Finished Code The Finished Code Our second example page has demonstrated table row striping highlighting tooltips collapsing expanding and filtering Taken together the JavaScript code for this page is mosgoogle geshibot lang php" document ready function var highlighted
 

jQuery Interacting with Other Code

jQuery Interacting with Other Code We learned with our sorting and paging code that we can t treat the various features we write as islands The behaviors we build can interact in sometimes surprising ways; for this reason it is worth revisiting our earlier efforts to examine how they coexist with t
 

jQuery Completed sorting and paging code

Learning jQuery The Finished Code The completed sorting and paging code in its entirety follows mosgoogle geshibot lang php" fn alternateRowColors function tbody tr odd this removeClass even addClass odd ; tbody tr even this removeClass odd addClass even ; return this; ; document
 

C++ String Representation and Handling

C String Representation and Handling In this C tutorial you will learn about string representation and handling how is string represented end string notation initializing char array character representation string literals example programe to understand the character array concept and the accessing
 

JavaScript String Object

JavaScript String Object In this JavaScript tutorial you will learn about String Object purpose of string object in JavaScript purpose of string object indexof method lastIndexOf method and substring method along with syntax and example mosgoogle center Purpose of String Object in JavaScript The mai
 

Convert a String into an Integer

How to convert a string into an integer in C program? This is done by using the function named as atoi(). This function atoi() is present in the header file named as <stdlib.h>. When programmers use this function they must include the header file by the statement #include <stdl
 

String handling functions

What is the string handling functions present in header file <string.h>? There are number of string handling functions present in string.h. In other words if a programmer uses any of the function present in string.h then they must include the header file as #include <string.h&am
 

Convert a String into Long Value

What string function is used to convert a string into long value? This is done by using the function named as atol() . This function atol() is present in the header file named as <stdlib.h>. When programmers use this function they must include the header file by the statement
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape