RE: I want to copy the first and last record from the ...
hi,
What you can do is -> first get the total number of records in the file (you may use File-aid -> Utilities - > Copy, by this your file would be copied to another file giving total number of records copied). say the number of records is 100. so, you need to copy only the 1st & the last record( record no 1 & 100).use following code to get the 1st & last record copied.
//STEP1 EXEC PGM=IDCAMS //DDIN01 DD DSN=INPUT FILE NAME //DDOUT01 DD DSN=OUTPUT FILE NAME //SYSPRINT DD SYSOUT=* //SYSIN DD *  REPRO -      INFILE(DDIN01) -      OUTFILE(DDOUT01) -      SKIP(1) - << THIS OPTION WILL SKIP YOUR FIRST                                << RECORD IN OUTPUT FILE AND                                 << START COPYING FROM 2nd RECORD upto 99th record      COUNT(98) /* //
RE: I want to copy the first and last record from the ...
hi friend i have a solution for ur pbmplz go trg the jclfirst count the no of records for example if u have 1000 records and first u split those reccords form the input file 1)which contains the first record 2)contains the last record and concadinate those records
//TEDIACK1 JOB (AO13TSO0),'TEDIACK1 ',MSGLEVEL=(1,1), // //STEPR020 EXEC PGM=SORT //************* * //SYSOUT DD SYSOUT=* //SORTIN DD DSN=IRFSD1.IGF.IRFS.OI.ALLINV.JAN0607,DISP=SHR //SORTOUT DD DSN=IRFSD1.IGF.IRFS.OI.ALLINV.JAN0607.BKUP2, // UNIT=SYSDA,SPACE=(CYL,(100,25),RLSE,,ROUND), // DCB=(LRECL=1650,BLKSIZE=23100,RECFM=FB), // DISP=(,CATLG,DELETE) //SYSIN DD * SORT FIELDS=COPY, SKIPREC=999 (or) stopaft = 001/* skiprec will skip the 999 records and the out dataset will have only the last record stopaft =001 will have only the first record how write another step to concadinate those recordsregards,Guru