Page 1 of 1
how to split files which has header and trailor
Posted: Tue Nov 11, 2008 10:56 am
by sowjanya
I want to split a file contaning 188451 records along with header and trailor into 2 files where in two files should be exactly has half of records with header and trailor. I tried using the SPLIT function in SYNCSORT but am getting error.
SORT FIELDS=COPY,SKIPREC = 1,STOPAFT = 94225
*
OUTFIL FILES=01,INCLUDE=(1,25,CH,EQ,C'0') AND (1,25,CH,EQ,C'9')
SKIPREC = 94226,STOPAFT = 94225
*
OUTFIL FILES=02,INCLUDE=(1,25,CH,EQ,C'0') AND (1,25,CH,EQ,C'9')
SORT STATEMENT : SYNTAX ERROR
NO KEYWORDS FOUND ON CONTROL STATEMENT
SYNCSMF CALLED BY SYNCSORT; RC=0000
SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
Can any1 say me what would be the reason??
sort using STARTREC ENDREC
Posted: Tue Nov 11, 2008 2:19 pm
by Natarajan
Here is example, which may help you.
Code: Select all
//SORTOF01 DD DUMMY
//SORTOF02 DD DUMMY
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FILES=01,STARTREC=1,ENDREC=2
OUTFIL FILES=02,STARTREC=3
/*
above sort card will copy first two records into SORTOF01 DD
rest of the record will go into SORTOF02 DD
if you dont understand, please let me know.
giving an error
Posted: Wed Nov 12, 2008 8:44 am
by sowjanya
Its giving an error at startrec
Posted: Wed Nov 12, 2008 1:56 pm
by Natarajan
this example was tested one. which tool you are using. Is it SORT/ICETOOL?
Posted: Thu Nov 13, 2008 12:27 pm
by Natarajan
It look like you have created a topic instead of replying to this topic. with subject/message with 'SORT' word. please delete that topic.
I think frank can answer your question. it might be the issue with the version
that you are using. same code worked for me.
Frank - Can you provide your valuable comments here.
another logic required
Posted: Thu Nov 13, 2008 5:26 pm
by sowjanya
thanks
Posted: Thu Nov 13, 2008 7:57 pm
by Krishna
sowjanya,
As per the mainframeGurukul's forum rules, you should not give links to our competitor websites. If you have any questions ask here.
I have updated your post.. to delete that link.
Posted: Thu Nov 13, 2008 9:46 pm
by Frank Yaeger
I think frank can answer your question. it might be the issue with the version
that you are using. same code worked for me.
Frank - Can you provide your valuable comments here.
No. The original poster specifically mentioned Syncsort. I'm a DFSORT developer. DFSORT and Syncsort are competitive products. I'm happy to answer questions on DFSORT and DFSORT's ICETOOL, but I don't answer questions on Syncsort.
If not SyncSort DFSORT is also fine..
Posted: Fri Nov 14, 2008 8:18 am
by sowjanya
Hi frank,
I need other logic for the one posted..it may also be using DFSORT also is fine.
Thanks,
sowjanya
Posted: Fri Nov 14, 2008 9:18 pm
by Frank Yaeger
Sowjanya,
The messages in your first post indicate you're using Syncsort. Are you saying you have DFSORT too? If so, please run the job in your first post with DFSORT and post the messages.
Posted: Fri Nov 14, 2008 11:18 pm
by Veera
Sowjanya,
I have posted a sample code for splitting the files using DFSORT in DFSORT , ICETOOL & Utilities forum. If you can use DFSORT it may help you.
http://www.mainframegurukul.com/Mainfra ... php?t=3602
Frank -> I have also asked a question, if you can have a look when you get a chance i really apprecaite it.
Thanks,
Veera.