i want to know how to copy 10 records from...............

In this Mainframe Forum - You can post your queries on FILE-AID tool

Moderators: Anuj Dhawan, Moderator Group

Post Reply
jumi
Member
Posts: 1
Joined: Wed Jun 24, 2009 12:35 pm

i want to know how to copy 10 records from...............

Post by jumi » Wed Jun 24, 2009 12:51 pm

Hi

Can you tell me how to copy only 10 records from a file having 1000 records to another file using file-aid?

what types of files can be processed using file-aid? all types of files?

User avatar
JACK
Member
Posts: 20
Joined: Mon Jan 30, 2006 6:18 am

FILE-AID commands

Post by JACK » Wed Jun 24, 2009 2:36 pm

try using following code

Code: Select all

$$DD01  COPY OUT=60 

Refer following thread posted by Anuj

http://www.mainframegurukul.com/Mainfra ... t3669.html

Dave E
Member
Posts: 9
Joined: Thu Jun 25, 2009 6:01 pm

Post by Dave E » Thu Jun 25, 2009 8:01 pm

Hi,

This is really easy.
1. Open the file that you want to copy records into. Then type F2 on the command line an press enter. This will open another editor window for you.

2. Now, 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. You can keep doing this until you have copied all the records you want into memory. Note, you can also use the CC block command to select a set of records in the file. Once you have selected all your records, type RETURN on the command kine and press enter. This will close this edit window and return you to your original edit window.

3. Type A (for after) or B (for before) line commands to indicate where you want to insert the copied rows, then type PASTE on the command line and press enter. This will put all rows from memory into the file. Note that this is more sophisticated than the Windows copy/paste because it copies the whole row, regardless of the record length. Job done!

I hope this helps.

Cheers.
Dave E
Software Engineer

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Fri Jun 26, 2009 8:47 pm

Hi Dave,

Why do you suggest for F2, I'm not sure? File-Aid Batch job with following control-cards

Code: Select all

$$DD01  COPY OUT=10
should do what OP needs, isn't it?
Regards,
Anuj

User avatar
arcvns
Member
Posts: 28
Joined: Sat May 30, 2009 10:19 pm
Location: Chennai, India

Post by arcvns » Wed Jul 01, 2009 8:21 am

Anuj,

I think Dave was trying to explain an "online" approach. :)
Arun

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Wed Jul 01, 2009 3:50 pm

Arun -- my question is why F2?

Please try this at your end:
Open the file that you want to copy records into. Then type F2 on the command line an press enter. This will open another editor window for you.
I'm not sure how to use that.
Regards,
Anuj

Dave E
Member
Posts: 9
Joined: Thu Jun 25, 2009 6:01 pm

Post by Dave E » Tue Jul 14, 2009 5:45 pm

Hi,

Just to be clear, when I say F2, I do not mean the function2 button on the keyboard. The F2 command opens a new editor window in File-AID. Thus enabling you to cut and paste the records you want. These records can be consecutive or you can select each one manually, from anywhere in the file.

Not many people are aware of some of these "golden nuggets" in File-AID.

And yes, you can do this in batch. Obviously you will need to think about your selection criteria if you only want to copy specific records into the new file.

Cheers.
Dave E
Software Engineer

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Fri Jul 17, 2009 10:47 pm

Hi Dave,

Probaly I'm still not sure, is F2=formatted-edit?
Regards,
Anuj

academyindia4

Topic deleted by Admin

Post by academyindia4 » Sat Jan 30, 2016 11:03 pm

<< Content deleted By Admin >>

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others