Page 1 of 1

How to copy 10 records from.

Posted: Wed Jun 10, 2015 11:30 am
by daniel
Is there an online or batch way of copying 50 records from a file having 100K records to another file using file-aid? File are sequential in nature.

Re: How to copy 10 records from.

Posted: Wed Jun 10, 2015 11:34 am
by enrico-sorichetti
using file-aid
if You do not know how, why did You chose fileaid ?
a sort solution might be simpler

Re: How to copy 10 records from.

Posted: Wed Jun 10, 2015 5:40 pm
by Robert Sample
Is there an online or batch way of copying 50 records from a file having 100K records to another file using file-aid?
Yes. Why don't you read the manuals to find out how?

Re: How to copy 10 records from.

Posted: Wed Jun 10, 2015 7:25 pm
by enrico-sorichetti
the TS is pretty wishy washy in expressing his requirements
the tile tells 10 records, the post text tells 50,
lets make a deal halfway, 30 looks like a good number :mrgreen:

Re: How to copy 10 records from.

Posted: Wed Jun 10, 2015 10:01 pm
by William Collins
With SORT it is:

Code: Select all

 OPTION COPY,STOPAFT=yournumberhere

Re: How to copy 10 records from.

Posted: Wed Jun 10, 2015 11:21 pm
by nicc
Do you want the first n records, the last n records or n records from various parts of the dataset?

Re: How to copy 10 records from.

Posted: Sat Jun 13, 2015 5:12 pm
by daniel
I need to this using file-aid as we per the standards we are following. I need first 10 records to be copied.

Re: How to copy 10 records from.

Posted: Sat Jun 13, 2015 6:07 pm
by William Collins
Well, I'm sure someone there can tell you how to do it then. You certainly should have access to the documentation and it sounds like a very simple task.

Re: How to copy 10 records from.

Posted: Sat Jun 13, 2015 6:41 pm
by enrico-sorichetti
the usual stupidity in setting the requirements.

defining the tool to be used without checking if the skill needed is there. :evil:

Re: How to copy 10 records from.

Posted: Fri Aug 05, 2016 2:53 pm
by Anuj Dhawan
Hi,

Getting familiar with documentation will help you long way. However, for the current question, there are two ways of doing it:
  1. If you want to do it in batch, use the following control cards:

    Code: Select all

    //STEPCOPY EXEC PGM=FILEAID 
    //DD01     DD DSN=T1300AD.INPUT1,DISP=SHR 
    //DD01O    DD DSN=T1300AD.OUTPUT1,DISP=OLD 
    //SYSOUT   DD SYSOUT=* 
    //SYSPRINT DD SYSOUT=* 
    //SYSLIST  DD SYSOUT=* 
    //SYSTOTAL DD SYSOUT=* 
    //SYSIN    DD * 
    $$DD01  COPY OUT=10
    /*
    //*
    This is explained in this thread http://www.zmainframes.com/viewtopic.php?f=50&t=57 too.
  2. If you want to do it in on-line file-aid, follow these steps:
    • a. Once you are in your file-aid panel, open the file that you want to copy records into. Type F2 on the command line an press enter. This will open another editor window for you.

      b. Next, open the file you want to copy records 'FROM. Use the C line command to select the records you want to copy and then type CUT on the command line, then press ENTER. Once all the records you wanted are selected, type RETURN on the command line and press enter - you'll return back to original edit window.

      c. Use ISPF commands to paste before or after, type A (for after) or B (for before) line commands, to indicate where you want to insert the copied rows. Type PASTE on the command line and press enter. You're done.
Hope this helps.