Regarding Control statements(Outfil files and split)

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

Post Reply
venky
Active Member
Posts: 50
Joined: Sat May 12, 2012 10:13 pm

Regarding Control statements(Outfil files and split)

Post by venky » Sun May 27, 2012 2:59 am

Hi,

//Job card
//step01 exec pgm=sort
//sortin dd dsn=mytest.lab.ps,disp=shr
//sortof1 dd dsn=mytest.lab.ps1,disp=(new,caltg,delete),
//* space parameters etc etc
//sortof2 dd dummy
//sortof3 dd dummy
//sortof4 dd dummy
//sysin dd *
outfil files=(1,2,3,4),split
/*

In the input file I am having the data as below.

001 Ricky
001 mainframe
001 developer
001 ibm
002 John
002 mainframe
002 developer
002 ibm
003 Patricia
003 mainframe
003 developer
003 ibm
004 Tony
004 mainframe
004 developer
004 ibm

I am getting the output is:
001 Ricky
002 John
003 Patricia
004 Tony

Can you please explain in brief why I am getting the output as mentioned above.

Regards,
Venky

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Sun May 27, 2012 3:37 am

it is working correctly as you have coded it.

suggest that you look into splitby

By the way,
welcome to the forum
and excellent subject title.
thx
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

NicC
Active Member
Posts: 650
Joined: Sun Jul 24, 2011 5:27 pm
Location: Down on the pig farm

Post by NicC » Sun May 27, 2012 10:57 am

Only problem is: You posted in the wrong section of the forum - this is the JCL section and you are asking a SORT question so should have posted in the DFSORT part of the forum even if you are posting a SYNCSORT question,
Regards
Nic

venky
Active Member
Posts: 50
Joined: Sat May 12, 2012 10:13 pm

Post by venky » Sun May 27, 2012 2:27 pm

okay thanks a lot.

Post Reply

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



Other References
Mainframe Tools and others