MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

need to find data in any column in JCL and coding rules

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
hemamfuser
Beginner


Joined: 09 May 2006
Posts: 9
Topics: 3

PostPosted: Tue May 09, 2006 12:56 pm    Post subject: need to find data in any column in JCL and coding rules Reply with quote

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.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12382
Topics: 75
Location: San Jose

PostPosted: Tue May 09, 2006 1:22 pm    Post subject: Reply with quote

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

Code:

//STEP0100 EXEC PGM=FILEAID         
//DD01     DD DSN=YOUR PDS,   
//            DISP=SHR               
//SYSPRINT DD SYSOUT=*               
//SYSLIST  DD SYSOUT=*               
//SYSIN    DD *                     
$$DD01 LIST IF=(72,GT,C' ')
/*


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
hemamfuser
Beginner


Joined: 09 May 2006
Posts: 9
Topics: 3

PostPosted: Tue May 09, 2006 1:33 pm    Post subject: Reply with quote

Kolusu,

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
Code:
Enter Search Strings and Optional operands (WORD/PREFIX/SUFFIX,C)       
   Caps . .                                                           
   Caps . .                                                             
   Caps . .                                                             
   Asis . .                                                             
   Asis . .

My concern is how do i enter non blank data to be searched in the field Caps.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12382
Topics: 75
Location: San Jose

PostPosted: Tue May 09, 2006 2:03 pm    Post subject: Reply with quote

hemamfuser,

hemamfuser,

Try this job,

Code:

//STEP0100 EXEC PGM=ISRSUPC,PARM=(SRCHCMP,IDPFX,'')         
//NEWDD    DD DSN=your pds,                         
//            DISP=SHR                                     
//OUTDD    DD DSN=output dataset,
//            DISP=(NEW,CATLG,DELETE),
//            SPACE=(CYL,(10,10),RLSE)
//SYSIN    DD *                                             
SRCHFOR '//'                                               
DPLINE ' ',72:80                                           
/*           


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.

Code:

//STEP0100 EXEC PGM=ISRSUPC,PARM=(SRCHCMP,IDPFX,'')         
//NEWDD    DD DSN=your pds,                         
//            DISP=SHR
//OUTDD    DD DSN=&T1,DISP=(,PASS),SPACE=(CYL,(10,10),RLSE)
//SYSIN    DD *                                             
SRCHFOR '//'                                               
DPLINE ' ',72:80                                           
/*           
//STEP0200 EXEC PGM=SORT                   
//SYSOUT   DD SYSOUT=*                     
//SORTIN   DD DSN=&T1,                     
//            DISP=SHR                     
//SORTOUT  DD SYSOUT=*                     
//SYSIN    DD *                           
  INCLUDE COND=(01,133,SS,EQ,C'//',AND,   
                05,007,CH,NE,C'SRCHFOR')   
  INREC FIELDS=(1,10)                     
  SORT FIELDS=(1,10,CH,A)                 
  SUM FIELDS=NONE                         
/*                                         


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
hemamfuser
Beginner


Joined: 09 May 2006
Posts: 9
Topics: 3

PostPosted: Tue May 09, 2006 2:22 pm    Post subject: Reply with quote

Kolusu,

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 .
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12382
Topics: 75
Location: San Jose

PostPosted: Tue May 09, 2006 2:26 pm    Post subject: Reply with quote

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

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
hemamfuser
Beginner


Joined: 09 May 2006
Posts: 9
Topics: 3

PostPosted: Tue May 09, 2006 3:01 pm    Post subject: Reply with quote

Kolusu,

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 ?
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12382
Topics: 75
Location: San Jose

PostPosted: Tue May 09, 2006 4:51 pm    Post subject: Reply with quote

Quote:

1.Can i have the link which explains about the batch jcl statements like SRCHFOR '//'


hemamfuser,

Check this link for documentation on superc

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ISPUGD02/APPENDIX1.2?DT=19951009092033

Quote:

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

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2B631/3.4.2?SHELF=&DT=20030423085347&CASE=

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
hemamfuser
Beginner


Joined: 09 May 2006
Posts: 9
Topics: 3

PostPosted: Wed May 10, 2006 5:30 am    Post subject: Reply with quote

Kolusu,

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 .
Back to top
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Fri May 12, 2006 1:49 am    Post subject: Reply with quote

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.

Thanks,
Phantom
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group