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 and so I am not using SORT.
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Thu Jul 15, 2004 11:11 am Post subject:
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.
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.
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