Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 MXG - Processing Compressed DB2 SMF r... vasanthz All Other Mainframe Topics 2 Thu May 10, 2018 12:47 am
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Merge 2 records sancraig16 SYNCSORT 19 Tue Mar 27, 2018 8:17 pm
No new posts Copy set of records based on condition krish.deepu SYNCSORT 2 Thu Mar 08, 2018 11:39 am
No new posts add sequence number for duplicate rec... SRUTHI DRAVIDAMANI COBOL Programming 11 Thu Feb 22, 2018 5:37 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us