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 

Using File-Aid in JCL

 
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
laddoo
Beginner


Joined: 05 Apr 2004
Posts: 2
Topics: 1

PostPosted: Thu Jul 15, 2004 8:35 am    Post subject: Using File-Aid in JCL Reply with quote

Hi all,
I am using PGM=FILEAID to extract certain data from a VSAM file. Its something like this:

Code:

//FILEAID   EXEC  PGM=FILEAID                             
//SYSPRINT   DD  SYSOUT=*                                 
//DD01    DD  DISP=SHR,DSN=ABC.XYZ.PQRST(+0) the input file       
//DD01O   DD  DSN=AAA.BBB.CCC.DDD,DISP=SHR   the output file   
//*                                                       
//SYSIN     DD *                                           
$$DD01  COPY IF=(10,EQ,X'40404040404040,FFFFFFFFFFFFFF'), 
           ORIF=(421,EQ,C'V2000     '),                   
           ORIF=(421,EQ,C'V2000C    ')                   
/*


I need to have nested conditions in the COPY control cards...say the condition is
IF ( A OR B OR C) AND ( D AND (E OR F OR G)).

Can you refer some document where I can find out how to realize these? or Can you paste a solution for this?
I have tried using the parenthesis, but it doesn't work, (or i am making some mistakes.).

I am using the File-Aid in JCL because
1). I need to save the output file in a different DSN.( I dont know if its possible in file-aid uitility or not)
2). The conditions are many, and it would be simpler to jot them down in a JCL.
3). I want to learn using File-Aid in JCL Wink and so I am not using SORT.

Thanks in advance
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


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

PostPosted: Thu Jul 15, 2004 11:11 am    Post subject: Reply with quote

Ladoo,

Quote:

I am using PGM=FILEAID to extract certain data from a VSAM file.


Are sure your input file is a vsam file ? Your JCL input file shows a GDG. You cannot have a vsam cluster as GDG.

Quote:

1). I need to save the output file in a different DSN.( I dont know if its possible in file-aid uitility or not)


I am not sure what your question is , but you can use the WRITE parameter to copy the datasets to a different file.
Code:

$$DD01 USER WRITE=OUTPUT1,OUT=100
$$DD01 USER WRITE=OUTPUT2,OUT=0


In the above control cards, the first 100 records will written to the file associated with the DD name OUTPUT1 and the rest of the records from 101 record are written to the output file OUTPUT2

Quote:

I need to have nested conditions in the COPY control cards...say the condition is
IF ( A OR B OR C) AND ( D AND (E OR F OR G)).


For the above condition, here is a sample control cards.
Code:

$$DD01  COPY IF=(1,EQ,C'AAAA,BBBB,CCCC'),   
             AND=(20,EQ,C'D'),             
             AND=(30,EQ,C'EE,FF,GG'),OUT=0 


With above control we are copying records from the input file ,

1. If the first 4 bytes are having values 'aaaa', or 'bbbb', or,'cccc'

AND

2. If the 20 bytes contains a value 'd'

AND

3. If the 30 position is having values 'ee', or 'ff', or,'gg'

The sample job is :

Code:

//STEP0050 EXEC PGM=FILEAID,REGION=4M     
//SYSPRINT DD SYSOUT=*                     
//SYSLIST  DD SYSOUT=*                     
----+----1----+----2----+----3----+----4---
//DD01     DD *                           
AAAA               D         EE           
BBBB               D         FF           
BBBB               E         GG           
BBBB               F         EE           
CCCC               D         FF           
CCCC               G         GG           
XXXX               D         EE           
YYYY               D         EE           
ZZZZ               D         EE           
//DD01O    DD SYSOUT=*                     
//SYSIN    DD *                           
$$DD01  COPY IF=(1,EQ,C'AAAA,BBBB,CCCC'), 
             AND=(20,EQ,C'D'),             
             AND=(30,EQ,C'EE,FF,GG'),OUT=0
/*

The output from this job is:
Code:

AAAA               D         EE
BBBB               D         FF
CCCC               D         FF


Quote:

Can you refer some document where I can find out how to realize these?


Fileaid manauls are copyrighted and hence are not avaialable online. If your shop has a valid file-aid licence then you can download the manauls from compuware website.

All you need is a client number. To find out the client number of your site.

On the fileaid main menu choose the option 0(parameters)

on the next screen choose the option 1(SYSTEM)

You will find the client number on the top left corner of the screen.

Now use that client number along with your client email-id(it is a must) and you should have all the manuals.

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
laddoo
Beginner


Joined: 05 Apr 2004
Posts: 2
Topics: 1

PostPosted: Fri Jul 16, 2004 3:54 am    Post subject: Thanks Kolusu Reply with quote

Thanks a lot for your help:

1. I did make a mistake in calling my file a VSAM file..its a GDG...thanks for the correction.
2.
Quote:

Code:

$$DD01 COPY IF=(1,EQ,C'AAAA,BBBB,CCCC'),
AND=(20,EQ,C'D'),
AND=(30,EQ,C'EE,FF,GG'),OUT=0



This is exactly what I had asked for. Thanks for the help.

Thanks Kolusu
Back to top
View user's profile Send private message Send e-mail
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