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
 

 

CAN OUTREC be specific to One OUTFIL in SYNCSORT ?

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

New User


Joined: 10 Mar 2005
Posts: 41
Location: United States Of America

PostPosted: Wed Dec 21, 2011 6:22 pm    Post subject: CAN OUTREC be specific to One OUTFIL in SYNCSORT ?
Reply with quote

Hi All,

When I tried to give OUTREC against two differrent OUTFIL FILES i am getting following error.

Can anyone know how to fix it ?
SYSIN :
SORT FIELDS=COPY
OUTFIL FILES=01,INCLUDE=(111,2,CH,EQ,C'01')
OUTFIL FILES=02,INCLUDE=(111,2,CH,EQ,C'02')
OUTFIL FILES=03,INCLUDE=(111,2,CH,EQ,C'03')
OUTFIL FILES=04,INCLUDE=(111,2,CH,EQ,C'04')
OUTFIL FILES=05,INCLUDE=(111,2,CH,EQ,C'05')
OUTFIL FILES=06,INCLUDE=(111,2,CH,EQ,C'06')
OUTFIL FILES=SR,INCLUDE=(111,2,CH,EQ,C'50')
OUTFIL FILES=ER,INCLUDE=(111,2,CH,EQ,C'99')
OUTREC FIELDS=(1:14,70)
OUTFIL FILES=MS,INCLUDE=(6,2,CH,EQ,C'11',OR,6,2,CH,EQ,C'21')
OUTREC FIELDS=(1:03,42)
*
WER269A OUTREC STATEMENT : DUPLICATE STATEMENT FOUND
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Wed Dec 21, 2011 6:25 pm    Post subject: Reply to: CAN OUTREC be specific to One OUTFIL in SYNCSORT ?
Reply with quote

the WER prefix indicates that You are using SYNCSORT,
topic moved to the proper forum section
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Wed Dec 21, 2011 6:31 pm    Post subject: Reply to: CAN OUTREC be specific to One OUTFIL in SYNCSORT ?
Reply with quote

follow on,
the OUTREC statement as written is GLOBAL for the whole <sort>
to generate different layouts You must use the IFTHEN/BUILD construct
quite a few samples around
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 645
Location: Pennsylvania

PostPosted: Wed Dec 21, 2011 6:37 pm    Post subject:
Reply with quote

Use the Build construct:

OUTFIL FILES=01,INCLUDE=(111,2,CH,EQ,C'01'),BUILD=(1:14,70)
repeat that for each line...
OUTFIL FILES=MS,INCLUDE=(6,2,CH,EQ,C'11',OR,6,2,CH,EQ,C'21'),
BUILD=(1:03,42)
Back to top
View user's profile Send private message
sameer

New User


Joined: 10 Mar 2005
Posts: 41
Location: United States Of America

PostPosted: Wed Dec 21, 2011 8:05 pm    Post subject:
Reply with quote

I tried with BUILD but its not working out..

SYSIN :
SORT FIELDS=COPY
OUTFIL FILES=01,INCLUDE=(111,2,CH,EQ,C'01')
OUTFIL FILES=02,INCLUDE=(111,2,CH,EQ,C'02')
OUTFIL FILES=03,INCLUDE=(111,2,CH,EQ,C'03')
OUTFIL FILES=04,INCLUDE=(111,2,CH,EQ,C'04')
OUTFIL FILES=05,INCLUDE=(111,2,CH,EQ,C'05')
OUTFIL FILES=06,INCLUDE=(111,2,CH,EQ,C'06')
OUTFIL FILES=SR,INCLUDE=(111,2,CH,EQ,C'50')
OUTFIL FILES=ER,INCLUDE=(111,2,CH,EQ,C'99')
OUTREC BUILD=(1:14,42)
OUTFIL FILES=MS,INCLUDE=(6,2,CH,EQ,C'11',OR,6,2,CH,EQ,C'21')
OUTREC BUILD=(1:14,42)
*
WER269A OUTREC STATEMENT : DUPLICATE STATEMENT FOUND
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 645
Location: Pennsylvania

PostPosted: Wed Dec 21, 2011 8:08 pm    Post subject:
Reply with quote

Did you even look at my example?

You need a BUILD for each OUTFIL.

Many of your BUILD statements will be the same.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Dec 21, 2011 11:08 pm    Post subject:
Reply with quote

Hello,

Quote:
I tried with BUILD but its not working out..
Why did you not use the example provided?
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Thu Dec 22, 2011 1:29 am    Post subject:
Reply with quote

daveporcelan wrote:
Did you even look at my example?


That just made my day! You give the guy the EXACT syntax to use, he reads maybe 5% of what you posted, then comes back with "it doesn't work."

Gotta love it.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7241

PostPosted: Thu Dec 22, 2011 4:57 am    Post subject: Reply to: CAN OUTREC be specific to One OUTFIL in SYNCSORT ?
Reply with quote

To take Dave's example, and add SYMNAMES

Code:

//SYMNAMES DD *               
MAIN-FILE-INDICATOR,111,002,CH
MS-FILE-INDICATOR,006,002,CH 
TO-FILE01,C'01'               
TO-FILE02,C'02'               
TO-FILE03,C'03'               
TO-FILE04,C'04'               
TO-FILE05,C'05'               
TO-FILE06,C'06'               
TO-FILESR,C'50'               
TO-FILEER,C'99'               
TO-FILEMS-1,C'11'             
TO-FILEMS-2,C'21'             
OUTREC-FOR-MAIN-FILES,014,070
OUTREC-FOR-MS-FILE,003,042   


As your actual lengths for your output are unclear, I have left them as the original, but you can easily change them.

Code:

//SYSIN DD *
  SORT FIELDS=COPY                                           
                                                             
  OUTFIL FILES=01,INCLUDE=(MAIN-FILE-INDICATOR,EQ,TO-FILE01),
         BUILD=(1:OUTREC-FOR-MAIN-FILES)                     
                                                             
  OUTFIL FILES=02,INCLUDE=(MAIN-FILE-INDICATOR,EQ,TO-FILE02),
         BUILD=(1:OUTREC-FOR-MAIN-FILES)                     
                                                             
  OUTFIL FILES=03,INCLUDE=(MAIN-FILE-INDICATOR,EQ,TO-FILE03),
         BUILD=(1:OUTREC-FOR-MAIN-FILES)                     
                                                             
  OUTFIL FILES=04,INCLUDE=(MAIN-FILE-INDICATOR,EQ,TO-FILE04),
         BUILD=(1:OUTREC-FOR-MAIN-FILES)                     
                                                             
  OUTFIL FILES=05,INCLUDE=(MAIN-FILE-INDICATOR,EQ,TO-FILE05),
         BUILD=(1:OUTREC-FOR-MAIN-FILES)                     
                                                             
  OUTFIL FILES=06,INCLUDE=(MAIN-FILE-INDICATOR,EQ,TO-FILE06),
         BUILD=(1:OUTREC-FOR-MAIN-FILES)                     
                                                             
  OUTFIL FILES=SR,INCLUDE=(MAIN-FILE-INDICATOR,EQ,TO-FILESR),
         BUILD=(1:OUTREC-FOR-MAIN-FILES)                     
                                                             
  OUTFIL FILES=ER,INCLUDE=(MAIN-FILE-INDICATOR,EQ,TO-FILEER),
         BUILD=(1:OUTREC-FOR-MAIN-FILES)                     
                                                             
  OUTFIL FILES=MS,INCLUDE=(MS-FILE-INDICATOR,EQ,TO-FILEMS-1, 
                         OR,MS-FILE-INDICATOR,EQ,TO-FILEMS-2),
         BUILD=(1:OUTREC-FOR-MS-FILE)                         


Do you need the SORTOUT dataset as well as the above? If not, why not "TOOL" it?
Back to top
View user's profile Send private message
bodatrinadh

Active User


Joined: 05 Jan 2007
Posts: 101
Location: chennai (India)

PostPosted: Thu Dec 22, 2011 12:46 pm    Post subject: Reply to: CAN OUTREC be specific to One OUTFIL in SYNCSORT ?
Reply with quote

Sameer,

See the code posted by " daveporcelan" and Try to identify what you have missed. There is a missing "Comma" in your code after the Include statement. And also instead of OUTREC BUILD/ OUTREC FIELDS give BUILD/FILEDS for OUTFIL FILES=ER and OUTFIL FILES=MS.

Thanks
-3nadh
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 7 Fri Dec 02, 2016 9:47 am
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
No new posts Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am
No new posts ICETOOL/SYNCSORT - SYSPRINT output nartcr DFSORT/ICETOOL 17 Wed Oct 05, 2016 10:46 pm
No new posts how to split records based on specifi... Venkata Ramayya DFSORT/ICETOOL 6 Wed Sep 28, 2016 3:20 am


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