Sort
Moderators: Frank Yaeger, DikDude, Moderator Group
Sort
Hi,
I have a requirement, if a file is not sorted in patricular position then it should abend.
for example: the file is of 80 bytes, from positon 1-9 we need to sort the file, if it is not sorted then it should get abend.
Please help by using Jcl.
Regards,
Venky.
I have a requirement, if a file is not sorted in patricular position then it should abend.
for example: the file is of 80 bytes, from positon 1-9 we need to sort the file, if it is not sorted then it should get abend.
Please help by using Jcl.
Regards,
Venky.
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
You have not yet explained why this is a "requirement".I need a condition if the file is not sorted then it should get jcl error.
If the file needs to be sorted, it makes no sense to end the run rather than simply sorting the data.from positon 1-9 we need to sort the file
Whatever is really needed, do not plan on causing a JCL error. You can terminate the job by a condition code test, but a JCL error makes No sense.
Have a good one
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
You have been asked multiple times why . . . If you refuse to provide information requested, why should people try to helpwe need to get abend code
And NO - it is NOT a business requirement and most likely does NOT support a business reqiuirement. Most likely it is just a disconnected communication.
You can have the sort issue a return code (as you have been told multiple times) and terminate processing based on this return code.
Last edited by DikDude on Mon Nov 12, 2012 1:25 am, edited 2 times in total.
Have a good one
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
Venky,
An "abend" is a "system abend" or a "user abend". Look up the terms and understand what they mean, ask, with an explanation of what you understand to that point, if you are unsure.
A JCL error is something wrong with the JCL, syntactically or in some cases logically, which will usually "flush" the job before it gets an opportunity to run (because it can't) or cancels the job once encountered (like duplicate dataset).
A return-code is a value that can be set by any program (if code is included to do so) and whose value can be tested using the Condition Code processing available in JCL. See the JCL manuals.
The only sensible way to arrange your process is to use the final one, the Return-Code with Condition-Code checking.
An "abend" is a "system abend" or a "user abend". Look up the terms and understand what they mean, ask, with an explanation of what you understand to that point, if you are unsure.
A JCL error is something wrong with the JCL, syntactically or in some cases logically, which will usually "flush" the job before it gets an opportunity to run (because it can't) or cancels the job once encountered (like duplicate dataset).
A return-code is a value that can be set by any program (if code is included to do so) and whose value can be tested using the Condition Code processing available in JCL. See the JCL manuals.
The only sensible way to arrange your process is to use the final one, the Return-Code with Condition-Code checking.
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