how to split files which has header and trailor
Moderators: Frank Yaeger, DikDude, Moderator Group
how to split files which has header and trailor
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 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??
Last edited by sowjanya on Tue Nov 11, 2008 11:19 am, edited 1 time in total.
sort using STARTREC ENDREC
Here is example, which may help you.
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.
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.
Natarajan
Chennai
Chennai
giving an error
Its giving an error at startrec
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.
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.
Natarajan
Chennai
Chennai
another logic required
thanks
Last edited by sowjanya on Mon Nov 17, 2008 3:49 pm, edited 1 time in total.
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.
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.
Regards,
Krishna
Facebook --> http://www.facebook.com/mainframegurukul
Connect with RAMESH KRISHNA REDDY --> http://www.linkedin.com/in/rameshkrishnareddy
Twitter --> https://twitter.com/mainframegurkul
http://www.mainframetutorials.com
Krishna
Facebook --> http://www.facebook.com/mainframegurukul
Connect with RAMESH KRISHNA REDDY --> http://www.linkedin.com/in/rameshkrishnareddy
Twitter --> https://twitter.com/mainframegurkul
http://www.mainframetutorials.com
- Frank Yaeger
- Moderator
- Posts: 812
- Joined: Sat Feb 18, 2006 5:45 am
- Location: San Jose, CA
- Contact:
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.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.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
If not SyncSort DFSORT is also fine..
Hi frank,
I need other logic for the one posted..it may also be using DFSORT also is fine.
Thanks,
sowjanya
I need other logic for the one posted..it may also be using DFSORT also is fine.
Thanks,
sowjanya
- Frank Yaeger
- Moderator
- Posts: 812
- Joined: Sat Feb 18, 2006 5:45 am
- Location: San Jose, CA
- Contact:
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.
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.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
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.
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.
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page