Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

I have a file in which I have 20 records. I want my first
record to go into file 1 and second record to go in second
file. I want to copy the alternate records like this in the
two output files. How can I do this using JCL?

Answer Posted / muttaiah

Adding to satish answer.

Option copy is similar to sort fields= copy or merge
fields=copy.
It is used to simply copy the records from input to output
file.

Outfil is used when we want to do process records in the
input file.
Here split option is used in Outfil to seperate the input
file into 2, that means it will write the alternate records
into the files specified in fnames.
Other syntax of Outfill would be

//step1 exec pgm=sort
//sortin dd dsn=Inputfile
//sortof01 dd dsn=file1
//sortof02 dd dsn=file2
//sysin dd *
option copy
outfil files=(01,02),split
/*
Here we are giving 01,02 which indicates the DDnames that
are prefixed with sortof.

Hope this makes sense in understanding satish answer

@All: Do correct me if i'm wrong.

Thank u

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the purpose of coding class parameter in job statement?

1201


How is a type of file defined in the jcl that executes the cobol program?

1140


What are steplib and joblib?

1119


Mention the types of job control statements?

1123


What is the difference between the positional and keyword parameters? Give examples.

1186


What statement marks the beginning of a job step; assigns a name to the step; identifies the program or catalogued or in-stream procedure to be executed in the step?

1053


what operation is performed by job statement?

1060


what is the purpose of coding notify parameter in job statement?

1097


What is the use of symbol // in jcl?

1385


Can anybody tell what is tool used to generate the list of PROCS used in JCL to generate a PROCTREE

2402


a dd statement has 2 types of parameters. Name them?

1088


what are the statements that are not valid to be included in an include statement?

1327


How do you access an uncatalogued dataset in a jcl?

1156


What are the jcl procedures?

1057


what is the compile process of cobol program expalin with code

2500