View previous topic :: View next topic
|
Author |
Message |
krishnakanagal
New User
Joined: 27 Feb 2009 Posts: 12 Location: Bangalore
|
|
|
|
Hi,
I have an input file having 10 records say, any LRECL, I want to copy every alternate record for e.g.
Input File
1
2
3
4
5
6
G
P
X
D
Output file
1
3
5
G
X |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
You can use these DFSORT statements:
Code: |
OPTION COPY
OUTFIL SAMPLE=2
|
|
|
Back to top |
|
|
Rindia
New User
Joined: 17 Jun 2009 Posts: 6 Location: Hyderabad
|
|
|
|
Frank Yaeger wrote: |
You can use these DFSORT statements:
Code: |
OPTION COPY
OUTFIL SAMPLE=2
|
|
When i used the same syntax, it's not working for me.
Please let me know where i'm making mistake.
Error message:
ICE600I 0 DFSORT ICETOOL UTILITY RUN STARTED
ICE650I 0 VISIT www.ibm.com/storage/dfsort FOR ICETOOL PAPERS, EXAMPLES
ICE632I 0 SOURCE FOR ICETOOL STATEMENTS: TOOLIN
ICE630I 0 MODE IN EFFECT: STOP
OPTION COPY
$
ICE614A 0 INVALID OPERATOR
ICE602I 0 OPERATION RETURN CODE: 12
ICE630I 2 MODE IN EFFECT: SCAN
OUTFIL SAMPLE=2
$
ICE614A 0 INVALID OPERATOR
ICE601I 0 DFSORT ICETOOL UTILITY RUN ENDED - RETURN CODE: 12
JCl which i used :
//STEP01 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD DUMMY
//IN DD input file.........
//OUT DD outputfile....
//TOOLIN DD *
OPTION COPY
OUTFIL SAMPLE=2
/* |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
try executing PGM=SORT as below
Code: |
//STEP0001 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=input file
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OUTFIL SAMPLE=2
/*
|
Gerry |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Rindia,
Gerry is right. Those are DFSORT statements, not ICETOOL statements. (I assumed people knew how to code the JCL for DFSORT.)
You can either use those statements directly with DFSORT (as shown by Gerry) or you can use them indirectly with ICETOOL like this:
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=... input file
//OUT DD DSN=... output file
//TOOLIN DD *
COPY FROM(IN) USING(CTL1)
//CTL1CNTL DD *
OUTFIL FNAMES=OUT,SAMPLE=2
/*
|
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:
www.ibm.com/support/docview.wss?rs=0&uid=isg3T7000080 |
|
Back to top |
|
|
Rindia
New User
Joined: 17 Jun 2009 Posts: 6 Location: Hyderabad
|
|
|
|
Thank You Gerry and Frank. |
|
Back to top |
|
|
|