Polaris - jcl file interview question

jcl interview questions

Moderator: Moderator Group

Post Reply
User avatar
Vamsi99
Active Member
Posts: 183
Joined: Wed Nov 05, 2008 11:20 am

Polaris - jcl file interview question

Post by Vamsi99 » Sun Oct 11, 2009 9:41 pm

How do we retrieve odd numbered records like 1st,3rd,5th, 7th... from a file.

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Mon Oct 12, 2009 4:31 pm

Using what? SORT, COBOL or something else?
Regards,
Anuj

mansoor_asma
Member
Posts: 2
Joined: Thu Jan 07, 2010 1:41 pm
Location: Chennai

How doweretrieve odd numbered records like 1st,3rd,from file

Post by mansoor_asma » Thu Jan 07, 2010 1:49 pm

We can do it through JCL by using SPLIT command of ICEMAN utility.
Please find the below JCL to obtaain it:

//SPLIT EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=Y897797.INPUT1,DISP=OLD
//OUT1 DD DSN=output file1,DISP=(NEW,CATLG),
// SPACE=(CYL,(5,5)),UNIT=SYSDA
//OUT2 DD DSN=output file2,DISP=(NEW,CATLG),
// SPACE=(CYL,(5,5)),UNIT=SYSDA
//SYSIN DD *
SORT FIELDS=copy
OUTFIL FNAMES=(OUT1,OUT2),SPLIT
//*

Note: odd numbered records will be present in output file1
s MD Mansoor

MrSpock
Active Member
Posts: 273
Joined: Wed Jun 27, 2007 5:37 pm

Post by MrSpock » Thu Jan 07, 2010 3:44 pm

No.

This question was recently answered here:

http://www.mainframegurukul.com/ibmmain ... php?t=4808

academyindia4

Topic deleted by Admin

Post by academyindia4 » Sat Jan 30, 2016 11:21 pm

<< Content deleted By Admin >>

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