|
View previous topic :: View next topic
|
| Author |
Message |
nehal mulki Warnings : 1 New User
Joined: 01 Jul 2008 Posts: 7 Location: Pune
|
|
|
|
I have created this SORT card for copying only 443 bytes of data from input file. The input file is of length 451.
INCLUDE COND=(444,3,CH,EQ,C'ARE',AND,447,3,ZD,EQ,411)
INREC FIELDS=(1,443)
OPTION COPY
OUTFIL FILES=1
This sort card is working fine. But i need to replicate this sort card for 3 output files with same input file.
For eg.
INCLUDE COND=(444,3,CH,EQ,C'ABC',AND,447,3,ZD,EQ,401) - this record should go in FILE 1
INCLUDE COND=(444,3,CH,EQ,C'ABC',AND,447,3,ZD,EQ,411) -this record should go in FILE 2
INCLUDE COND=(444,3,CH,EQ,C'ABC',AND,447,3,ZD,EQ,421)-this record should go in FILE 3
I have tried , but failed.
Error was: " INCLUDE/OMIT FIELD BEYOND RECORD "
Plz help me. |
|
| Back to top |
|
 |
Vasukip Currently Banned New User

Joined: 17 Jun 2008 Posts: 48 Location: Chennai
|
|
|
|
Hi,
Plz try this code
hope ds helps u out !
| Code: |
//S1 EXEC PGM=SYNCTOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN = Input File,DISP=SHR
//OUT1 DD SYSOUT =*
//OUT2 DD SYSOUT =*
//OUT3 DD SYSOUT =*
//TOOLIN DD *
SORT FROM(IN1) TO(OUT1) USING(CTL1)
SORT FROM(IN1) TO(OUT2) USING(CTL2)
SORT FROM(IN1) TO(OUT3) USING(CTL3)
/*
//CTL1CNTL DD *
OPTION COPY
INCLUDE COND=(444,3,CH,EQ,C'ABC',AND,447,3,ZD,EQ,401),
BUILD=(1,443)
/*
//CTL2CNTL DD *
OPTION COPY
INCLUDE COND=(444,3,CH,EQ,C'ABC',AND,447,3,ZD,EQ,411),
BUILD=(1,443)
/*
//CTL3CNTL DD *
OPTION COPY
INCLUDE COND=(444,3,CH,EQ,C'ABC',AND,447,3,ZD,EQ,421),
BUILD=(1,443)
/*
|
|
|
| Back to top |
|
 |
amalraj_ece
New User
Joined: 16 Jul 2006 Posts: 21 Location: delhi
|
|
|
|
try this
| Code: |
//STEP10 EXEC PGM=SYNCSORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=AMAL.PS.TEST,DISP=SHR
//SORTOF01 DD DSN=AMAL.PS.TESTF01,DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,5),UNIT=DISK
//SORTOF02 DD DSN=AMAL.PS.TESTF02,DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,5),UNIT=DISK
//SORTOF03 DD DSN=AMAL.PS.TESTF03,DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,5),UNIT=DISK
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FILES=01,OUTREC=(1,367),
INCLUDE=((1,1,CH,EQ,C' '),OR,(1,2,CH,EQ,C'##'), *
OR,(1,2,CH,EQ,C'#$'),OR,(1,2,CH,EQ,C'#%'),OR,(1,2,CH,EQ,C'#*'))
OUTFIL FILES=02,OUTREC=(1,367),
INCLUDE=((1,2,CH,EQ,C'#0'),OR,(1,2,CH,EQ,C'#1'), *
OR,(1,2,CH,EQ,C'#2'),OR,(1,2,CH,EQ,C'#3'),OR,(1,2,CH,EQ,C'#4'), *
OR,(1,2,CH,EQ,C'#5'),OR,(1,2,CH,EQ,C'#6'),OR,(1,2,CH,EQ,C'#7'), *
OR,(1,2,CH,EQ,C'#8'),OR,(1,2,CH,EQ,C'#9'))
OUTFIL FILES=03,OUTREC=(1,367)
/*
|
|
|
| Back to top |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
|
|
Hello nehal,
Were you able to arrive at proper results? If not, Can you please post here the card you used?
Thanks,
Arun |
|
| Back to top |
|
 |
nehal mulki Warnings : 1 New User
Joined: 01 Jul 2008 Posts: 7 Location: Pune
|
|
|
|
hi arcvns,
my actual sort card is as below.
OUTFIL FILES=1,INCLUDE=(444,3,CH,EQ,C'AAA',AND,447,3,ZD,EQ,401)
OUTFIL FILES=2,INCLUDE=(444,3,CH,EQ,C'BBB',AND,447,3,ZD,EQ,411)
OUTFIL FILES=3,INCLUDE=(444,3,CH,EQ,C'CCC',AND,447,3,ZD,EQ,421)
INREC FIELDS=(1,443)
OPTION COPY
problem is , Include condition has fields which is at 444th and 447th location and i need to copy just 443 bytes from input file.
Error was: " INCLUDE/OMIT FIELD BEYOND RECORD "
for single file ...
INCLUDE COND=(444,3,CH,EQ,C'AAA',AND,447,3,ZD,EQ,401)
INREC FIELDS=(1,443)
OPTION COPY
OUTFIL FILES=1
This is working fine. Problem m facing is for multiple files.
got it ?? |
|
| Back to top |
|
 |
nehal mulki Warnings : 1 New User
Joined: 01 Jul 2008 Posts: 7 Location: Pune
|
|
|
|
hi Frank Yaeger ,
I need help from u ...
Thanks,
Nehal. |
|
| Back to top |
|
 |
nehal mulki Warnings : 1 New User
Joined: 01 Jul 2008 Posts: 7 Location: Pune
|
|
|
|
hi Vasukip,
I tried using ICETOOL ,
Its working fine.
can u help me creating DFSORT card ??
Thanks, |
|
| Back to top |
|
 |
Vasukip Currently Banned New User

Joined: 17 Jun 2008 Posts: 48 Location: Chennai
|
|
|
|
Hi Nehal,
Plz have ds !
| Code: |
//STEPLIB EXEC PGM=SORT
//SORTIN DD *
AAA 123 401
AAA 456 401
BBB 987 411
BBB 123 411
CCC 455 421
CCC 677 421
/*
//SORTOF01 DD SYSOUT=*
//SORTOF02 DD SYSOUT=*
//SORTOF03 DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FILES=01,
INCLUDE=(1,3,CH,EQ,C'AAA',AND,16,3,ZD,EQ,401),
OUTREC=(1,15)
OUTFIL FILES=02,
INCLUDE=(1,3,CH,EQ,C'BBB',AND,16,3,ZD,EQ,411),
OUTREC=(1,15)
OUTFIL FILES=03,
INCLUDE=(1,3,CH,EQ,C'CCC',AND,16,3,ZD,EQ,421),
OUTREC=(1,15)
/*
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
// |
|
|
| Back to top |
|
 |
nehal mulki Warnings : 1 New User
Joined: 01 Jul 2008 Posts: 7 Location: Pune
|
|
|
|
Hi Vasukip,
u r not getting my problem !!!
problem is , Include condition has fields which is at 444th and 447th location and i need to copy just 443 bytes from input file.
Error is " INCLUDE/OMIT FIELD BEYOND RECORD "
But gud to see ur quick responses !!! |
|
| Back to top |
|
 |
Vasukip Currently Banned New User

Joined: 17 Jun 2008 Posts: 48 Location: Chennai
|
|
|
|
hey,
cosider my example, Here in INCLUDE condition Im checking (16,3) position however for OUTREC I ve taken only first 15 (1,15) fields |
|
| Back to top |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
|
|
Hi Nehal
| Quote: |
OUTFIL FILES=1,INCLUDE=(444,3,CH,EQ,C'AAA',AND,447,3,ZD,EQ,401)
OUTFIL FILES=2,INCLUDE=(444,3,CH,EQ,C'BBB',AND,447,3,ZD,EQ,411)
OUTFIL FILES=3,INCLUDE=(444,3,CH,EQ,C'CCC',AND,447,3,ZD,EQ,421)
INREC FIELDS=(1,443)
OPTION COPY
|
The problem with the above code is after INREC FIELDS=, you have only positions 1 to 143 and you cant check for positions beyond that.
Try out this one and let us know.
| Code: |
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FILES=1,INCLUDE=(444,3,CH,EQ,C'AAA',AND,447,3,ZD,EQ,401),
OUTREC=(1,443)
OUTFIL FILES=2,INCLUDE=(444,3,CH,EQ,C'BBB',AND,447,3,ZD,EQ,411),
OUTREC=(1,443)
OUTFIL FILES=3,INCLUDE=(444,3,CH,EQ,C'CCC',AND,447,3,ZD,EQ,421),
OUTREC=(1,443)
|
Thanks,
Arun |
|
| Back to top |
|
 |
nehal mulki Warnings : 1 New User
Joined: 01 Jul 2008 Posts: 7 Location: Pune
|
|
|
|
hi man ,
Its giving error !!
OUTREC STATEMENT : SYNTAX ERROR
OUTREC STATEMENT : DUPLICATE STATEMENT FOUND
OUTREC STATEMENT : DUPLICATE STATEMENT FOUND |
|
| Back to top |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
|
|
Nehal,
Can you post here the card and SYSOUT messages.
Thanks,
Arun |
|
| Back to top |
|
 |
nehal mulki Warnings : 1 New User
Joined: 01 Jul 2008 Posts: 7 Location: Pune
|
|
|
|
Card is same as u hav suggested !!
and the error msg , i hav already posted !!
Plz check !!
Thanks. |
|
| Back to top |
|
 |
expat
Global Moderator

Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
nehal mulki
Have you really posted the error message. What is the error code shown in the sysout that you HAVE NOT posted.
If you are not willing to help others to help you why bother posting on the forum ?
Your warning is for the above reason. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|