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
 

 

Splitting a file into several files

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

Active User


Joined: 07 May 2005
Posts: 110
Location: hyderabad

PostPosted: Fri Apr 04, 2008 5:21 pm    Post subject: Splitting a file into several files
Reply with quote

how to split a single file into different files based on the input records

ex : if my file has 1,100,000 records. note it may increased or decreased by day to day activities.
Back to top
View user's profile Send private message

vasanthkumarhb

Active User


Joined: 06 Sep 2007
Posts: 276
Location: Bang,iflex

PostPosted: Fri Apr 04, 2008 5:33 pm    Post subject:
Reply with quote

Hi,

You can USE sort card

Code:
//SYSIN DD *
    SORT FIELDS=COPY
    OUTFIL FILES=01 NAME INCLUDE(THE MATCHING CRITERIA)
 AN CONTINUE.THE SAME FOR DIFFERENT MATCHING CRITERIA..
/*
Back to top
View user's profile Send private message
veena_nagesh2002
Warnings : 1

Active User


Joined: 07 May 2005
Posts: 110
Location: hyderabad

PostPosted: Fri Apr 04, 2008 5:59 pm    Post subject:
Reply with quote

can you give me complete sort jcl on this
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 Apr 04, 2008 6:09 pm    Post subject:
Reply with quote

For what reason do you want to split the file,

a) Select certain records
b) Create several smaller files
c) Another reason
Back to top
View user's profile Send private message
veena_nagesh2002
Warnings : 1

Active User


Joined: 07 May 2005
Posts: 110
Location: hyderabad

PostPosted: Fri Apr 04, 2008 6:13 pm    Post subject:
Reply with quote

we will create a production file which may contain lakhs of records. generally we use transfer these files to open system. since that system is not capable of receving the huge data at a time and its creating lot many problems. hence we need to split the file into limit wise and then palnning to transfer it. let me know if you need more details

kindly help us
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 Apr 04, 2008 6:28 pm    Post subject:
Reply with quote

Take a look at

http://www.ibmmainframes.com/viewtopic.php?t=29578
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Apr 04, 2008 9:26 pm    Post subject:
Reply with quote

Hello,

Quote:
that system is not capable of receving the huge data at a time
You might consider compressing the file on the mainframe before downloading and then de-compress the data on the target system. Remember that to download a compressed filek, the transfer must be done in binary, not ascii.
Back to top
View user's profile Send private message
veena_nagesh2002
Warnings : 1

Active User


Joined: 07 May 2005
Posts: 110
Location: hyderabad

PostPosted: Sun Apr 06, 2008 12:35 pm    Post subject:
Reply with quote

the following code is throwing error message like below, kindly let me know did i made any mistake.

Code:
//STEP010 EXEC PGM=ICETOOL                               
//TOOLMSG DD SYSOUT=*                                     
//DFSMSG  DD SYSOUT=*                                     
//*                                                       
//IN DD DSN=S22.FIX.SE.PC000129.CMERROR,DISP=SHR         
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//C1 DD DSN=&&C1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//*                                                       
//CTL3CNTL DD *                                           
  OUTFIL FNAMES=(OUT01,OUT02,OUT03),                     
//         DD DSN=*.C1,VOL=REF=*.C1,DISP=(OLD,PASS)       
//OUT01 DD DSN=S22.FIX.SE.PC000129.CMERROR1               
//OUT02 DD DSN=S22.FIX.SE.PC000129.CMERROR2               
//OUT03 DD DSN=S22.FIX.SE.PC000129.CMERROR3               
//*                                                       
//TOOLIN DD *                                                       
COPY FROM(IN) USING(CTL1)                                           
COPY FROM(T1) TO(C1) USING(CTL2)                                   
COPY FROM(IN) USING(CTL3)                                           
/*                                                                 
//CTL1CNTL DD *                                                     
  OUTFIL FNAMES=T1,REMOVECC,NODETAIL,TRAILER1=(COUNT=(M11,LENGTH=8))
/*                                                                 
//CTL2CNTL DD *                                                     
  OUTREC BUILD=(2X,C'SPLIT1R=',1,8,ZD,DIV,03,TO=ZD,LENGTH=8,8 :X)   
/*                                                                 


error message is :

COPY FROM(T1) TO(C1) USING(CTL2)
SYT020I SYNCSORT CALLED WITH IDENTIFIER "0002"
SYT012E SYNCSORT COMPLETED UNSUCCESSFULLY
SYT030I OPERATION COMPLETED WITH RETURN CODE 16
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Sun Apr 06, 2008 12:59 pm    Post subject:
Reply with quote

Sorry, but I don't understand the purpose of CTL2CNTL:
OUTREC BUILD=(2X,C'SPLIT1R=',1,8,ZD,DIV,03,TO=ZD,LENGTH=8,8 :X)
And should there be an extra blank near the end?
Are there any other errors listed in the sysout?
Back to top
View user's profile Send private message
veena_nagesh2002
Warnings : 1

Active User


Joined: 07 May 2005
Posts: 110
Location: hyderabad

PostPosted: Sun Apr 06, 2008 7:44 pm    Post subject:
Reply with quote

Code:
//PU7052AX JOB (@),XCOM,MSGCLASS=R,NOTIFY=PU7052A,CLASS=0 
//*                                                       
//STEP010 EXEC PGM=ICETOOL                                 
//TOOLMSG DD SYSOUT=*                                     
//DFSMSG  DD SYSOUT=*                                     
//*                                                       
//IN DD DSN=S22.FIX.SE.PC000129.CMERROR,DISP=SHR           
//*                                                       
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//C1 DD DSN=&&C1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//*                                                       
//CTL3CNTL DD *                                           
  OUTFIL FNAMES=(OUT01,OUT02,OUT03),                       
//    DD DSN=*.C1,VOL=REF=*.C1,DISP=(OLD,PASS)             
//OUT01 DD DSN=S22.FIX.SE.PC000129.CMERROR.FRONT,DISP=OLD 
//OUT02 DD DSN=S22.FIX.SE.PC000129.CMERROR.MID,DISP=OLD   
//OUT03 DD DSN=S22.FIX.SE.PC000129.CMERROR.LAST,DISP=OLD   
//*                                                       
//TOOLIN DD *                                                       
  COPY FROM(IN) USING(CTL1)                                         
  COPY FROM(T1) TO(C1) USING(CTL2)                                 
  COPY FROM(IN) USING(CTL3)                                         
/*                                                                 
//CTL1CNTL DD *                                                     
  OUTFIL FNAMES=T1,REMOVECC,NODETAIL,TRAILER1=(COUNT=(M11,LENGTH=8))
/*                                                                 
//CTL2CNTL DD *                                                     
  OUTREC BUILD=(2X,C'SPLIT1R=',1,8,ZD,DIV,+03,TO=ZD,LENGTH=8,80:X) 
/*                                                                 


Now the problem is at CTL3

ERROR MESSAGE :
Code:
 CTL3CNTL :                                                                   
   OUTFIL FNAMES=(OUT01,OUT02,OUT03)       00080006
   SPLIT1R=0000002I                                                           
   *           
WER428I  CALLER-PROVIDED IDENTIFIER IS "0003"   
WER275A  NO KEYWORDS FOUND ON CONTROL STATEMENT
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000   
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Sun Apr 06, 2008 8:16 pm    Post subject:
Reply with quote

veena_nagesh2002 wrote:
ERROR MESSAGE :
Code:
 CTL3CNTL :                                                                   
   OUTFIL FNAMES=(OUT01,OUT02,OUT03)       00080006
   SPLIT1R=0000002I                                                           
   *           
WER428I  CALLER-PROVIDED IDENTIFIER IS "0003"   
WER275A  NO KEYWORDS FOUND ON CONTROL STATEMENT
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000   
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
First, no comma at the end of the first line?
Second, I don't think Syncsort has the SPLIT1R, but only the SPLIT and SPLITBY, either (done correctly) might provide just what you need.....
One more thing, maybe you should provide a mask to the split count to convert the 0000002I to 00000029......
Back to top
View user's profile Send private message
veena_nagesh2002
Warnings : 1

Active User


Joined: 07 May 2005
Posts: 110
Location: hyderabad

PostPosted: Mon Apr 07, 2008 10:20 am    Post subject:
Reply with quote

please find my answeres below

i have kept comma in the jcl but it was typo error on while pasting the above post.

Second, will try with split and spliby option but should i mention any extra in it.

I couldn't understand the third point in the post, hence please give me the details how to do that

last : took this jcl from the above referenced link and then how come it can be incorrect in the split options.

waiting for valuable reply.
Back to top
View user's profile Send private message
sril.krishy

Active User


Joined: 30 Jul 2005
Posts: 182
Location: hyderabad

PostPosted: Mon Apr 07, 2008 1:01 pm    Post subject:
Reply with quote

veena_nagesh2002,
The SPLIT1R is not supported by SYNCSORT.There is a SPLIT or SPLITBY option with SYNCSORT which will place them in an order.

Please chage the card like below and test.I tried it for 10 records and they are placed in the correspoding files like below.



Code:

//STEP010 EXEC PGM=SYNCTOOL                                           
//TOOLMSG DD SYSOUT=*                                               
//DFSMSG  DD SYSOUT=*                                               
//*                                                                 
//IN DD *                                                           
1234561                                                             
1234562                                                             
1234563                                                             
1234564                                                             
1234565                                                             
1234566                                                             
1234567                                                             
1234568                                                             
1234569                                                             
1234560--------->*                                                             
//T1 DD DSN=&&T1,UNIT=SYSDK,SPACE=(TRK,(1,1)),DISP=(,PASS)           
//C1 DD DSN=&&C1,UNIT=SYSDK,SPACE=(TRK,(1,1)),DISP=(,PASS)           
//*                                                                 
//CTL3CNTL DD *                                                     
  OUTFIL FNAMES=(OUT01,OUT02,OUT03),                                 
//    DD DSN=*.C1,VOL=REF=*.C1,DISP=(OLD,PASS)                       
//OUT01 DD SYSOUT=*                                                 
//OUT02 DD SYSOUT=*                                                 
//OUT03 DD SYSOUT=*                                                 
//*                                                                 
//TOOLIN DD *                                                       
  COPY FROM(IN) USING(CTL1)                                         
  COPY FROM(T1) TO(C1) USING(CTL2)                                   
  COPY FROM(IN) USING(CTL3)                                         
/*                                                                   
//CTL1CNTL DD *                                                     
  OUTFIL FNAMES=T1,REMOVECC,NODETAIL,TRAILER1=(COUNT=(M11,LENGTH=8))
/*                                                                   
//CTL2CNTL DD *                                                     
  OUTREC BUILD=(2X,C'SPLITBY=',1,8,ZD,DIV,+03,EDIT=(TTTTTTTT),80:X) 


OUT01 :

Code:

1234561
1234562
1234563
1234560---------->*


OUT02:
Code:

1234564
1234565
1234566

OUT03:
Code:

1234567
1234568
1234569


So the order might get changed if your input is having records if the division by 3 is not zero.

Thanks
Krishy
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Mon Apr 07, 2008 8:32 pm    Post subject:
Reply with quote

sril.krishy wrote:
The SPLIT1R is not supported by SYNCSORT.

SPLIT1R IS supported in SyncSort for z/OS 1.3.
Apparently veena_nagesh2002 is using an earlier release of the product.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Mon Apr 07, 2008 9:09 pm    Post subject:
Reply with quote

Alissa Margulies wrote:
SPLIT1R IS supported in SyncSort for z/OS 1.3.
Oh neat, I'm avidly awaiting the 1.3 manual to replace my 1.2.....grin.....
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Mon Apr 07, 2008 9:43 pm    Post subject:
Reply with quote

William Thompson wrote:
I'm avidly awaiting the 1.3 manual to replace my 1.2.....grin.....

(Check your PMs)
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 High CPU consumption Job using IAM fi... aswinir JCL & VSAM 8 Thu Dec 01, 2016 8:28 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm


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