Hi,
How to insert new record into a vsam/PS file using outrec in a jcl sort after checking for some conditions like if record 1 is present then insert record 2 and record 3
Inserting new record using outrec in JCL
Moderators: Frank Yaeger, DikDude, Moderator Group
You cannot - try looking up OUTREC in the JLC language reference manual. I suspect that you will find that that keyword does not even exist. In general, JCL does not manipulate data - it just tells the OS which programs you want to run and what resources the programs need including, for utility programs, where to find program control cards.
(Edited much later) I missed the word "sort" in your post. What do you mean by "JCL sort" sorting the JCL or in a batch sort? If you are making a sort query what is wrong with the section of the forum immediately following this JCL section. That section is labelled (clearly) Dfsort and (less clearly) Syncsort so whichever sort product you use - and you did not specify - you should post there.
Which sort product do you use - this may affect the control cards required? Look at the messages produced, not the program name in PGM=.
(Edited much later) I missed the word "sort" in your post. What do you mean by "JCL sort" sorting the JCL or in a batch sort? If you are making a sort query what is wrong with the section of the forum immediately following this JCL section. That section is labelled (clearly) Dfsort and (less clearly) Syncsort so whichever sort product you use - and you did not specify - you should post there.
Which sort product do you use - this may affect the control cards required? Look at the messages produced, not the program name in PGM=.
Last edited by NicC on Fri Oct 11, 2013 2:14 am, edited 1 time in total.
Regards
Nic
Nic
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
You can't insert records with OUTREC. You can with OUTFIL. However, it is not clear what you acually want. Perhaps you are combining data from different files, in which case you'd want JOINKEYS.
If none of that helps, please be a lot more specific about what you want. Sample input, expected output, and how you get from one to the other.
If none of that helps, please be a lot more specific about what you want. Sample input, expected output, and how you get from one to the other.
You might also clarify what a vsam/PS is. This is not a term i've seen before.
VSAM files are not PS and PS files are not VSAM.
VSAM files are not PS and PS files are not VSAM.
Last edited by DikDude on Sat Oct 12, 2013 12:11 am, edited 1 time in total.
Have a good one
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
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