Posted: Tue May 09, 2006 12:56 pm Post subject: need to find data in any column in JCL and coding rules
Hai All,
I want to search for data in a particular column 72 in a PDS for all members by using option 3.15 .Can anybody help me out ?
Moreover my understanding is that while coding a JCL , we have to code between col 1 - 71 only and if we code in col 72 the job will abend .Please help me out any link which has the coding rules for JCL.
Joined: 26 Nov 2002 Posts: 12382 Topics: 75 Location: San Jose
Posted: Tue May 09, 2006 1:22 pm Post subject:
hemamfuser,
Please do not open more than 1 topic for the same question. if you have file aid at your shop, then the following JCL will give you list of the members which has something other than a space in the 72 byte
Thanks for your quick response.I do not have File Aid in my shop.Basically my requirement is to find all the members using 3.15 option which have non blank data in cols 73 - 80 as well non blank data in specific column 72.
I have gone through the manual describing option 3.15 and i was unable to get the correct option.I go to option 3.15 and give 'E' on the command prompt and enter CMPCOLM 73:80 or 72:72 in Process Statements but when i hit enter and come back to the Extended Search-For Utility screen , i have to enter
This will list all the members who has //(as all JCL statements start with //) and contents from 72 thru 80 is not spaces. If you get a return code of 28 then you do not have any members with non blank data in pos 72 thru 80.
If you are interested in just finding the members which has non blank data in pos 72 thru 80 then the following JCL will give you desired results.
Your replies to my queries are really great .Can we not achieve the same result using option 3.15 checking for
a)non blank data in cols 73 - 80
b)non blank data in specific column 72.
I had edited a member and included some data in cols 73 - 80 and i had run your first JCL and i got RC=0 which did not give the member name which met the criteria , i guess i did not get the desired result.
I had also run the second JCL got successful run but also did not give me any member name as the first step itself did not give any results , so second step SORT also gave me RC=0 with no member listing.I reconfirmed that there is data in only one member in my PDS.
I wanted to know whether we can achieve the search using 3.15 option .Please help me out .
Joined: 26 Nov 2002 Posts: 12382 Topics: 75 Location: San Jose
Posted: Tue May 09, 2006 2:26 pm Post subject:
Quote:
I wanted to know whether we can achieve the search using 3.15 option .Please help me out .
hemamfuser,
The step0100 JCL is indeed a Batch version of 3.15
Quote:
I had edited a member and included some data in cols 73 - 80 and i had run your first JCL and i got RC=0 which did not give the member name which met the criteria , i guess i did not get the desired result.
If you get an rc=0 then it did find the member and you should look in the dataset associated with OUTDD
You are really great and thank you once again for advising and helping me out and i am able to get my desired results and i have understood that what we have in option 3.15 the same thing your generating through Batch JCL.I have few queries:
1.Can i have the link which explains about the batch jcl statements like SRCHFOR '//'
DPLINE ' ',72:80
PARM=(SRCHCMP,IDPFX,'') and others ?
2.How can i eliminate the comments lines to exclude in the search criteria like when i run the first JCL for search of data in pos 72 many members were listed out which had comment statement and having a * obviously in col 72 in a comment statement.So how can i exclude those kind of statements ?
3.Coding of JCL is done only from col 1 - 71 only that is job will not fail if there is data in col 71 also ?
4.Coding of JCL if done in col 72 is a error provided we have a comma before it and a space also ?
How can i eliminate the comments lines to exclude in the search criteria like when i run the first JCL for search of data in pos 72 many members were listed out which had comment statement and having a * obviously in col 72 in a comment statement.So how can i exclude those kind of statements ?
Simple Add another DPLINE for dropping all the records with '*' in pos 72
Code:
DPLINE '*',72
Quote:
3.Coding of JCL is done only from col 1 - 71 only that is job will not fail if there is data in col 71 also ?
No idea as to what you are talking
Quote:
4.Coding of JCL if done in col 72 is a error provided we have a comma before it and a space also ?
Not exactly true. Check this link which shows examples continuation in JCL. Look at example 3 in the link
Thanks for all your replies and suggestions and i am clear now with the processing options.
My query:
We can code any JCL statement between cols 1 - 71 only and if we have any data in column 71 job will not fail and it is a correct JCL .Please correct me .
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
Posted: Fri May 12, 2006 1:49 am Post subject:
hemamfuser,
Nothing will happen to your job, even if you have some data at column 71. The only thing is that if you have some character in Col 72, then it should follow the rules mentioned in Kolusu' note. check the last link kolusu gave you.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum