View previous topic :: View next topic
|
Author |
Message |
srramesh Currently Banned New User
Joined: 11 Jul 2008 Posts: 10 Location: Chennai
|
|
|
|
hi
I have the following in the input file
12345
13245
23456
I want the first two records in one o/p file and the 3rd record in another o/p file
give sum ideas...[/ |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
What have you tried for yourself so far, what were the results and/or error messages ? |
|
Back to top |
|
|
karthikr44
Active User
Joined: 25 Aug 2007 Posts: 235 Location: Chennai
|
|
|
|
Hi,
Anyone please tell me what's wrong with the following sort card
Code: |
//JSTP0010 EXEC PGM=SYNCSORT
//SORTIN DD DSN=DEV2.RK.TEST(@@CASE1),
// DISP=SHR
//SORTOF01 DD DSN=DEV2.RK.TEST(@@CASE2),
// DISP=SHR
//SORTOF02 DD DSN=DEV2.RK.TEST(@@CASE3),
// DISP=SHR
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FILES=01,STOPAFT=2
OUTFIL FILES=02,STARTREC=3
/*
//*
|
I am getting the following error,
Code: |
SYSIN :
SORT FIELDS=COPY
OUTFIL FILES=01,STOPAFT=2
*
OUTFIL FILES=02,STARTREC=3
WER161B ALTERNATE PARM USED
WER268A OUTFIL STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
|
Regards
R KARTHIK |
|
Back to top |
|
|
Manuneedhi K
Active User
Joined: 07 May 2008 Posts: 115 Location: Chennai
|
|
|
|
@Karthik
Try ENDREC inplace of STOPAFT |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello srramesh,
Your "screenshot" has been deleted. You have been asked before to not attach images/screenshots/etc.
Again. . . To show what you see on your terminal, use copy/paste and the "Code" tag. There is a Preview function so you can see how your post will appear to the forum. Use t and when you are satisfied with how your post appears, click Submit.
Any new screenshots posted will be deleted with no followup. . . |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
srramesh,
You can use a DFSORT job like the following to do what you asked for:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
12345
13245
23456
/*
//OUT1 DD DSN=... output file1
//OUT2 DD DSN=... output file2
//SYSIN DD *
OPTION COPY
OUTFIL FNAMES=OUT1,ENDREC=2
OUTFIL FNAMES=OUT2,SAVE
/*
|
Alternatively, if you have z/OS DFSORT V1R5 PTF UK90013 (July, 2008) installed, you can use this DFSORT/ICETOOL job:
Code: |
//S2 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD *
12345
13245
23456
/*
//OUT1 DD DSN=... output file1
//OUT2 DD DSN=... output file2
//TOOLIN DD *
SUBSET FROM(IN) TO(OUT1) INPUT KEEP FIRST(2) DISCARD(OUT2)
/*
|
|
|
Back to top |
|
|
|