Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Question relating records and jcl ?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
tapas.behera
Warnings : 1

New User


Joined: 05 Mar 2006
Posts: 1
Location: Bangalore

PostPosted: Sun Mar 05, 2006 12:43 pm    Post subject: Question relating records and jcl ?
Reply with quote

Hi friends,
Suppose i have 20 records in a file(say file1) and hv another file (say file2).

Now i want to move 10 records (i.e from 1 to 10)from file1 to file2.

So what r things need to be define in the JCL ?
Back to top
View user's profile Send private message

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Sun Mar 05, 2006 1:42 pm    Post subject:
Reply with quote

You don't use JCL to copy records; You use JCL to invoke programs or utilities.

In your case, you can use either a utility (SORT, FILEAID), or a program.

Here is a REXX example:
Code:

/* REXX */
 
ADDRESS TSO "EXECIO 10 DISKR INFILE (STEM IN. FINIS"
ADDRESS TSO "EXECIO 10 DISKW OUTFILE (STEM IN. FINIS"
 
EXIT
 


O.
Back to top
View user's profile Send private message
Rupesh.Kothari

Member of the Month


Joined: 27 Apr 2005
Posts: 464

PostPosted: Sun Mar 05, 2006 4:50 pm    Post subject: Re: Question relating records and jcl ?
Reply with quote

Hi,


Quote:
Hi friends,
Suppose i have 20 records in a file(say file1) and hv another file (say file2).

Now i want to move 10 records (i.e from 1 to 10)from file1 to file2.

So what r things need to be define in the JCL ?


I believe here records means number of lines from Flat file. You can copy no of records using SORT.

Hope this helps

Regards
Rupesh
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Mon Mar 06, 2006 5:37 pm    Post subject: Re: Question relating records and jcl ?
Reply with quote

Tapas,


An ?IDCAMS? solution

Code:


//JS00100  EXEC PGM=IDCAMS
//INDD1  DD DSN=your.input.file,
//       DISP=SHR                       
//OUTDD1 DD DSN=your.output.file,           
//       DISP=SHR               
//SYSIN DD *                                     
 REPRO INFILE(INDD1) OUTFILE(OUTDD1) COUNT(10)             
/*                                               



If you wanted to copy records 6-15

Code:


//JS00100  EXEC PGM=IDCAMS
//INDD1  DD DSN=your.input.file,
//       DISP=SHR                       
//OUTDD1 DD DSN=your.output.file,           
//       DISP=SHR               
//SYSIN DD *                                     
 REPRO INFILE(INDD1) OUTFILE(OUTDD1) SKIP(5) COUNT(10)             
/*                                               



Dave
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts QUESTION: RETURN CHANNEL pahiker CA Products 21 Thu Apr 20, 2017 12:31 am
No new posts The Last Two Question For You To Ask ... CaptBill Mainframe Interview Questions 0 Fri Apr 14, 2017 5:42 am
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us