Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Syncsort: Problem in multiple file sort ( INREC)

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
nehal mulki
Warnings : 1

New User


Joined: 01 Jul 2008
Posts: 7
Location: Pune

PostPosted: Tue Jul 01, 2008 2:28 pm    Post subject: Syncsort: Problem in multiple file sort ( INREC)
Reply with quote

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
View user's profile Send private message

Vasukip
Currently Banned

New User


Joined: 17 Jun 2008
Posts: 48
Location: Chennai

PostPosted: Tue Jul 01, 2008 7:00 pm    Post subject: Re: Problem in multiple file sort ( INREC)
Reply with quote

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
View user's profile Send private message
amalraj_ece

New User


Joined: 16 Jul 2006
Posts: 21
Location: delhi

PostPosted: Wed Jul 02, 2008 1:49 am    Post subject: Reply to: Syncsort: Problem in multiple file sort ( INREC)
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2158
Location: @my desk

PostPosted: Wed Jul 02, 2008 9:58 am    Post subject:
Reply with quote

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
View user's profile Send private message
nehal mulki
Warnings : 1

New User


Joined: 01 Jul 2008
Posts: 7
Location: Pune

PostPosted: Wed Jul 02, 2008 10:23 am    Post subject:
Reply with quote

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
View user's profile Send private message
nehal mulki
Warnings : 1

New User


Joined: 01 Jul 2008
Posts: 7
Location: Pune

PostPosted: Wed Jul 02, 2008 10:25 am    Post subject:
Reply with quote

hi Frank Yaeger ,

I need help from u ...


Thanks,
Nehal.
Back to top
View user's profile Send private message
nehal mulki
Warnings : 1

New User


Joined: 01 Jul 2008
Posts: 7
Location: Pune

PostPosted: Wed Jul 02, 2008 10:26 am    Post subject:
Reply with quote

hi Vasukip,

I tried using ICETOOL ,

Its working fine.

can u help me creating DFSORT card ??


Thanks,
Back to top
View user's profile Send private message
Vasukip
Currently Banned

New User


Joined: 17 Jun 2008
Posts: 48
Location: Chennai

PostPosted: Wed Jul 02, 2008 11:22 am    Post subject:
Reply with quote

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
View user's profile Send private message
nehal mulki
Warnings : 1

New User


Joined: 01 Jul 2008
Posts: 7
Location: Pune

PostPosted: Wed Jul 02, 2008 11:28 am    Post subject:
Reply with quote

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
View user's profile Send private message
Vasukip
Currently Banned

New User


Joined: 17 Jun 2008
Posts: 48
Location: Chennai

PostPosted: Wed Jul 02, 2008 11:31 am    Post subject:
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2158
Location: @my desk

PostPosted: Wed Jul 02, 2008 11:58 am    Post subject:
Reply with quote

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
View user's profile Send private message
nehal mulki
Warnings : 1

New User


Joined: 01 Jul 2008
Posts: 7
Location: Pune

PostPosted: Wed Jul 02, 2008 1:40 pm    Post subject: Reply to: Syncsort: Problem in multiple file sort ( INREC)
Reply with quote

hi man ,

Its giving error !!

OUTREC STATEMENT : SYNTAX ERROR
OUTREC STATEMENT : DUPLICATE STATEMENT FOUND
OUTREC STATEMENT : DUPLICATE STATEMENT FOUND
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2158
Location: @my desk

PostPosted: Wed Jul 02, 2008 1:53 pm    Post subject:
Reply with quote

Nehal,

Can you post here the card and SYSOUT messages.

Thanks,
Arun
Back to top
View user's profile Send private message
nehal mulki
Warnings : 1

New User


Joined: 01 Jul 2008
Posts: 7
Location: Pune

PostPosted: Wed Jul 02, 2008 2:05 pm    Post subject:
Reply with quote

Card is same as u hav suggested !!

and the error msg , i hav already posted !!

Plz check !!

Thanks.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Jul 02, 2008 2:12 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 1 Fri Dec 02, 2016 9:47 am
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us