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 add sequence number for duplicate rec... SRUTHI DRAVIDAMANI COBOL Programming 11 Thu Feb 22, 2018 5:37 pm
No new posts how to add the amount for duplicate r... SRUTHI DRAVIDAMANI COBOL Programming 6 Wed Feb 21, 2018 7:21 pm
No new posts Merging records, but not all the time prino DFSORT/ICETOOL 17 Sat Feb 17, 2018 4:20 pm
No new posts Need all records with high key kalidasvs SYNCSORT 15 Fri Feb 09, 2018 10:38 pm
No new posts JES2 EXIT 6 QUESTION Randy Horowitz All Other Mainframe Topics 30 Tue Feb 06, 2018 5:47 pm

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