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
 

 

Copying the data in JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
picus_mf
Warnings : 1

New User


Joined: 09 Jun 2006
Posts: 51

PostPosted: Fri Nov 07, 2008 12:54 pm    Post subject: Copying the data in JCL
Reply with quote

Hi,
I have requriement to copy a fileA
1. to fileB as it is (unsorted, say like dumping)
2. to fileC sorting on the key.
This is the code I tried. This is copying the files in two files.
1. OK
2. The file is not sorted. Is there any wrong in the below code.

Code:

//STEP01 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG  DD SYSOUT=*
//INA1 DD DSN=A.B.C, DISP=SHR
//INA2 DD DSN=A.B.1, DISP=NEW
//INA3 DD DSN=A.B.2,DISP=NEW
//OUT DD SYSOUT=*
//TOOLIN DD *
  COPY FROM(IN1) USING(CTL1)
  COPY FROM(IN1) USING(CTL2)
/*
//CTL1CTL DD *
 SORT FIELDS=(3,44,CH,A)
 OUTFIL FNAMES=IN3
/*
//CTL2CTL DD *
 SORT FIELDS=COPY
 OUTFIL FNAMES=IN2
/*
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Nov 07, 2008 1:14 pm    Post subject:
Reply with quote

The DD names in your ICETOOL statements do not match those in your JCL
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2181
Location: @my desk

PostPosted: Fri Nov 07, 2008 1:26 pm    Post subject:
Reply with quote

Also here it should be //CTL1CNTL DD *
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Fri Nov 07, 2008 5:43 pm    Post subject:
Reply with quote

Quote:
1. to fileB as it is (unsorted, say like dumping)

Then no need of using CTL
Why not just
COPY FROM(infile) TO(outfile)
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Nov 07, 2008 9:45 pm    Post subject:
Reply with quote

picus,

Here's a simplified DFSORT/ICETOOL job:

Code:

//STEP01 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG  DD SYSOUT=*
//IN1 DD DSN=A.B.C,DISP=SHR
//OUT1 DD DSN=...  output file1 (sorted)
//OUT2 DD DSN=...  output file2 (unsorted)
//TOOLIN DD *
SORT FROM(IN1) TO(OUT1) USING(CTL1)
COPY FROM(IN1) TO(OUT2)
/*
//CTL1CNTL DD *
  SORT FIELDS=(3,44,CH,A)
/*
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Sorting group data rajella DFSORT/ICETOOL 4 Sun Jan 22, 2017 11:32 pm
No new posts Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm


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