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...


a input file contains 1000 records, how to move the first
500 record into one out put file and how to move to second
500 records to anothere output file

Answers were Sorted based on User's Feedback



a input file contains 1000 records, how to move the first 500 record into one out put file and how..

Answer / bvr

THIS IS FOR COPY FIRST 500 RECORDS
using IDCAMS utility
//sysin DD*
REPRO -
INFILE(DD1) -
OUTFILE(DD2) -
COUNT(500) THIS IS FOR COPY FIRST 100 RECORDS
/*

THIS IS FOR COPY next 100 RECORDS
using IDCAMS utility
//sysin DD*
REPRO -
INFILE(DD1) -
OUTFILE(DD2) -
skip(500) -
COUNT(500)
/*

Is This Answer Correct ?    16 Yes 4 No

a input file contains 1000 records, how to move the first 500 record into one out put file and how..

Answer / balusu

//STEP0020 EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=FSS012.SAMPLE.IN,DISP=SHR
//SORTOUT DD DSN=FSS012.SAMPLE.OUT4,
// SPACE=(TRK,(5,5),RLSE),
// DCB=(LRECL=80,BLKSIZE=800,RECFM=FB),
// UNIT=SYSDA,
// DISP=(NEW,CATLG,DELETE)
//SYSIN DD *
SORT FIELDS=COPY,STOPAFT=501
/*
//STEP0021 EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=FSS012.SAMPLE.IN,DISP=SHR
//SORTOUT DD DSN=FSS012.SAMPLE.OUT5,
// SPACE=(TRK,(5,5),RLSE),
// DCB=(LRECL=80,BLKSIZE=800,RECFM=FB),
// UNIT=SYSDA,
// DISP=(NEW,CATLG,DELETE)
//SYSIN DD *
SORT FIELDS=COPY,SKIPREC=499
/*

Is This Answer Correct ?    5 Yes 0 No

a input file contains 1000 records, how to move the first 500 record into one out put file and how..

Answer / varsha

Using SPLITBY option, you can do it in one step only -

//JOBNAME
//STEP1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=INPUT DSN,DISP=SHR
//OUT1 DD DSN=OUTPUT DSN1,DISP=(NEW,CATLG),
// SPACE=(CYL,(5,5)),UNIT=SYSDA
//OUT2 DD DSN=OUTPUT DSN2,DISP=(NEW,CATLG),
// SPACE=(CYL,(5,5)),UNIT=SYSDA
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FNAMES=(OUT1,OUT2),SPLITBY=500
/*
//


Please correct .. if I am wrong

Is This Answer Correct ?    5 Yes 0 No

a input file contains 1000 records, how to move the first 500 record into one out put file and how..

Answer / nishant

using IDCAMS utility
//sysin DD*
REPRO -
INFILE(DD1) -
OUTFILE(DD2) -
COUNT(500) COPYING FIRST 500 RECORDS
SKIP(500)
REPRO -
INFILE(DD1) -
OUTFILE(DD3) -
skip(500) -
COUNT(500) COPYING NEXT 500 RECORDS
/*

Is This Answer Correct ?    1 Yes 0 No

a input file contains 1000 records, how to move the first 500 record into one out put file and how..

Answer / kalpesh

THIS IS FOR COPYING FIRST 500 RECORDS
using IDCAMS utility
//sysin DD*
REPRO -
INFILE(DD1) -
OUTFILE(DD2) -
COUNT(500) COPYING FIRST 500 RECORDS
SKIP(500)
/*

THIS IS FOR COPY next 500 RECORDS
using IDCAMS utility
//sysin DD*
REPRO -
INFILE(DD1) -
OUTFILE(DD2) -
skip(500) -
COUNT(500) COPYING FIRST 500 RECORDS
/*

Is This Answer Correct ?    0 Yes 0 No

a input file contains 1000 records, how to move the first 500 record into one out put file and how..

Answer / saurabh gupta

using IDCAMS utility
//sysin DD*
REPRO -
INFILE(DD1) -
OUTFILE(DD2) -
COUNT(500) THIS IS FOR COPY FIRST 100 RECORDS
SKIP(500) IF WE WANT TO COPY ONLY 501 TO 1000 RECORDS
/*

Is This Answer Correct ?    2 Yes 5 No

Post New Answer

More JCL Interview Questions

Hi, I have 3 files say file A , file B and file C.I want to form an output file in which i will have all the records from file A. Files B and C also may contain records that are present in file A.I want those records also to be included in my output file. for eg: file A contains: 1 2 3 file B contains: 2 4 5 file C contains: 1 3 5 So in my output file should look like: 1 2 3 2 1 3 Can any one help ???.....thanks in advance.

2 Answers  


List some valid operation codes in JCL

3 Answers  


How does the jcl specify the job to os?

0 Answers  


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

0 Answers   IBM,


Explain about RECORDING MODE Clause

1 Answers  


How we can code in a jcl to execute a job in a particular time and date without using any job shudular?. (Eg) i want to execute a particular job at 8 am on 01/01/2010.

2 Answers   Target,


Explain the purpose of dd dummy statement?

0 Answers  


What do you understand by the term notcat 2 – gs?

0 Answers  


How can I write the joblog in the spool on normal end of a job step and direct the joblog to a dataset only if the step abends?

2 Answers  


What is TimeStamp, What is TimeStamp error and What is the Abend Code for TimeStamp Error ?

4 Answers   IBM,


what is DSN parameter and DISP parameter is used for?

0 Answers  


WORKING-STORAGE SECTION. 77 W-A PIC 9(3)V99 VALUE 23.75. 77 W-B PIC ZZ9V99 VALUE 123.45. PROCEDURE DIVISION. MOVE W-A TO W-B. DISPLAY W-B. STOP RUN. compiler : IGYGR1080-S A "VALUE" clause literal was not compatible with the data category o subject data item. The "VALUE" clause was discarded. WORKING-STORAGE SECTION. 77 W-A PIC 9(3)V99 VALUE 23.75. 77 W-B PIC ZZ9V99. PROCEDURE DIVISION. MOVE 123.45 TO W-B. MOVE W-A TO W-B. DISPLAY W-B. STOP RUN. 2375

0 Answers  


Categories