Home      Mainframe Forum      Mainfarme Tutorials      IBM Manuals      Mainframe Interview Questions      Mainframe Books      IT News     SiteMap     Downloads


     
 
MAINFRAME - TIP OF THE DAY : All available storage is assigned to the job or jobstep, If REGION is coded 0K or 0M

Google
 
Web mainframegurukul.com

File aid help!
Goto page 1, 2  Next
 
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> FILE-AID
  View previous topic :: View next topic  
Author Message
chandiok
Member


Joined: 30 Apr 2009
Posts: 6

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Thu Apr 30, 2009 3:22 am    Post subject: File aid help! Reply with quote

Is there some way we can "NC" not contain in file aid batch JCL under list command to select records that do not contain a particular charcter in any position of a record.
Thanks
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.

maheshvamsi
Active Member


Joined: 25 Mar 2009
Posts: 52
Location: Banglore

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Thu Apr 30, 2009 10:31 am    Post subject: Reply with quote

Not Sure About File-Aid, but we can extract records which do not contain a particular character in any postion through SORT.

Please let us know, if you want a solution for this in sort.
_________________
Thanks

MaheshVamsi
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
dbzTHEdinosauer
Moderator


Joined: 02 Oct 2006
Posts: 975

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Thu Apr 30, 2009 10:40 am    Post subject: Reply with quote

you could always delete the records in your file that have the character, and then save what is left as a new file, which would contain only records that do not contain the char.
_________________
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
chandiok
Member


Joined: 30 Apr 2009
Posts: 6

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Thu Apr 30, 2009 8:58 pm    Post subject: Reply with quote

maheshvamsi wrote:
Not Sure About File-Aid, but we can extract records which do not contain a particular character in any postion through SORT.

Please let us know, if you want a solution for this in sort.


Cool!, would love to know it appreciate your help. Thanks
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
chandiok
Member


Joined: 30 Apr 2009
Posts: 6

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Thu Apr 30, 2009 9:03 pm    Post subject: Reply with quote

dbzTHEdinosauer wrote:
you could always delete the records in your file that have the character, and then save what is left as a new file, which would contain only records that do not contain the char.

Great! thanks for the info, I will keep that in mind. The problem I had needed an AND condition with Co (contain) and NC (not contain), this is a good idea too so I keep that in mind for future use. Appreciate your help.
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Anuj Dhawan
Moderator


Joined: 09 Aug 2008
Posts: 1631
Location: Mumbai, India

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Fri May 01, 2009 6:53 pm    Post subject: Reply with quote

Hi,

Suggest you show some sample input and expected output from that? Tell us the rules to derive that "output"; and also tell us the LRECL & RECFM of input/output.
_________________
Regards,
Anuj
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
chandiok
Member


Joined: 30 Apr 2009
Posts: 6

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Sat May 02, 2009 3:33 am    Post subject: Reply with quote

Anuj D. wrote:
Hi,

Suggest you show some sample input and expected output from that? Tell us the rules to derive that "output"; and also tell us the LRECL & RECFM of input/output.


Anuj,
The input file is FB and Lrecl 80 the output is same as input
We need to extrract record that contain AAA but not ART in a record.
any suggestions are welcome
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Anuj Dhawan
Moderator


Joined: 09 Aug 2008
Posts: 1631
Location: Mumbai, India

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Sun May 03, 2009 9:59 pm    Post subject: Reply with quote

Can "AAA" appear anywhere in the record to be selected?
_________________
Regards,
Anuj
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
chandiok
Member


Joined: 30 Apr 2009
Posts: 6

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Mon May 04, 2009 1:33 am    Post subject: Reply with quote

Anuj D. wrote:
Can "AAA" appear anywhere in the record to be selected?

That is the problem AAA and ART both can appear anywhere in the record.
Thanks
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
maheshvamsi
Active Member


Joined: 25 Mar 2009
Posts: 52
Location: Banglore

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Mon May 04, 2009 11:25 am    Post subject: Reply with quote

I saw this post now only. you can use below code. Assumed input & oupt file are of record length 80.

Code:
//SORT EXEC PGM=SORT                                               
//SORTIN DD disp=shr, dsn=Input file of record lenght 80
//SORTOUT DD disp=shr,dsn=Output file of record length 80                                         
//SYSIN DD *                                                       
  SORT FIELDS=COPY                                                 
  INCLUDE COND=(1,80,SS,EQ,C'AAA',OR,                   
                1,80,SS,NE,C'ART')                                 
/*                                                                 
//SYSPRINT DD SYSOUT=*                                             
//SYSOUT   DD SYSOUT=*



Input:

Code:
123456 AAA 132456 ART
123456 AAA 132456 AVT
123456 BAA 132456 ART


Output:

Code:
123456 AAA 132456 AVT



Please let us know, if you are still facing any issue.
_________________
Thanks

MaheshVamsi
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Anuj Dhawan
Moderator


Joined: 09 Aug 2008
Posts: 1631
Location: Mumbai, India

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Mon May 04, 2009 12:44 pm    Post subject: Reply with quote

Hi,
Quote:
We need to extrract record that contain AAA but not ART in a record.
Probably in below sort control statements, we need "AND" instead of "OR"
Code:
INCLUDE COND=(1,80,SS,EQ,C'AAA',OR,                   
                1,80,SS,NE,C'ART')



And maheshvamsi, I'm not sure why would you say the output is:
Code:
123456 AAA 132456 AVT
with the input and control card you show; win your exapple output would be:
Code:
123456 AAA 132456 ART
123456 AAA 132456 AVT
unless you replace "OR" with "AND".
_________________
Regards,
Anuj
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
maheshvamsi
Active Member


Joined: 25 Mar 2009
Posts: 52
Location: Banglore

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Mon May 04, 2009 3:18 pm    Post subject: Reply with quote

Yes, Anuj you are absolutely correct, I thought I edited this post with AND.

In sort cord we need to Use AND, Instead of OR. I checked it in my system, I updated the output, forgot to update control card.

anyway thank you. for updating me.
This is the correct control card.

Code:
SORT FIELDS=COPY                     
  INCLUDE COND=(1,80,SS,EQ,C'AAA',AND,
                1,80,SS,NE,C'ART')

_________________
Thanks

MaheshVamsi


Last edited by maheshvamsi on Mon May 04, 2009 9:15 pm; edited 2 times in total
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Anuj Dhawan
Moderator


Joined: 09 Aug 2008
Posts: 1631
Location: Mumbai, India

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Mon May 04, 2009 4:20 pm    Post subject: Reply with quote

Please spell my name correctly, that's Anuj.

Have a good one,

Ad
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
maheshvamsi
Active Member


Joined: 25 Mar 2009
Posts: 52
Location: Banglore

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Mon May 04, 2009 9:15 pm    Post subject: Reply with quote

Typo, I update the post.

have a niceday.
_________________
Thanks

MaheshVamsi
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Anuj Dhawan
Moderator


Joined: 09 Aug 2008
Posts: 1631
Location: Mumbai, India

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Tue May 05, 2009 12:04 pm    Post subject: Reply with quote

Thank You . . . Smile
_________________
Regards,
Anuj
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Display posts from previous:   
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> FILE-AID All times are GMT + 5 Hours
Goto page 1, 2  Next
Page 1 of 2



 
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

Related topics
 Topics   Replies   Author   Views   Last Post 
No new posts Search Batch file-aid help 14 frenchman 31561 Mon Feb 01, 2016 10:23 pm
academyindia4 View latest post
No new posts File-Aid Help 3 Nicholas 21374 Mon Feb 01, 2016 10:22 pm
academyindia4 View latest post
No new posts Hi plz help me out 7 Guest 21197 Mon Feb 01, 2016 10:14 pm
academyindia4 View latest post
This topic is locked: you cannot edit posts or make replies. executing java program thru JCL 6 Guest 24809 Tue Feb 12, 2013 1:56 pm
Anuj Dhawan View latest post
No new posts Many JCL statements contain specific values designed to dire 1 Krishna 4873 Tue May 12, 2009 5:39 pm
Krishna View latest post
 


Cobol Tutorial
This cobol tutorial covers most of the important topics like STRING, UNSTRING, COMP, COMP-3.....
DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. Explains in simple language. Some Chapters are locked, Forum members have free access to these chapters
CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming...
JCL Tutorial
This is most popular JCL tutorial from mainframegurukul. It does contain important jcl ....
SORT Tutorial
This Tutorial covers all important aspects of DFSORT. Has more SORT examples
INTERVIEW Questions
This page covers important interview questions
Mainframe Jobs
Mainframe Jobs posted by members of mainframegurukul forum
FaceBook Page
MainframeGurukul FaceBook Page
LinkedIn Page
MainframeGurkul Linkedin Page

This widget requires Flash Player 9 or better







Go to top of the page
 

Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  DB2 INTERVIEW QUESTIONS ||  COBOL INTERVIEW QUESTIONS  ||  JCL INTERVIEW QUESTIONS ||  JCL2 INTERVIEW QUESTIONS ||  VSAM INTERVIEW QUESTIONS ||  CICS INTERVIEW QUESTIONS  ||  Online tutorials ||  Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  SiteMap  ||  Expeditor Tutorial  ||  FILE-AID Tutorial  ||  Changeman Tutorial  ||  COBOL   ||  DB2   ||  JCL  ||  CICS  ||  VSAM  ||  DB2 Interview Questions ( 110 )   || Simple JCL Tutorials  || JCL Tutorial from MainframeGurukul.com   || Simple JCL Tutorial - Chapter1 ;|| Mainframe Forum - Tutorials  || Mainframe Tutorials || Mainframe CICS tutorial|| Mainframe COBOL Tutorial

Drona Educational Forums - Mainframe Cobol DB2 CICS Board
Powered by phpBB

mainframetopic-4036.html