i want to know how to copy 10 records from...............
Moderators: Anuj Dhawan, Moderator Group
i want to know how to copy 10 records from...............
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?
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?
FILE-AID commands
try using following code
Refer following thread posted by Anuj
http://www.mainframegurukul.com/Mainfra ... t3669.html
Code: Select all
$$DD01 COPY OUT=60
Refer following thread posted by Anuj
http://www.mainframegurukul.com/Mainfra ... t3669.html
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.
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
Software Engineer
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
Hi Dave,
Why do you suggest for F2, I'm not sure? File-Aid Batch job with following control-cards should do what OP needs, isn't it?
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
Regards,
Anuj
Anuj
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
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.
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
Software Engineer
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
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
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page