Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Duplicate PARM on OUTFIL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
View previous topic :: :: View next topic  
Author Message
sancraig16

New User


Joined: 27 Mar 2018
Posts: 22
Location: usa

PostPosted: Thu Apr 05, 2018 10:25 pm    Post subject: Duplicate PARM on OUTFIL
Reply with quote

I tried adding a 2nd WHEN=GROUP statement and job failed with DUPLICATE PARM . Should I do the 2nd GROUP in a separate SORT ?

Code:


SYSIN :
  INREC IFTHEN=(WHEN=GROUP,BEGIN=(13,7,CH,EQ,C'XXXXXXX'),
  END=(42,8,CH,EQ,C'YYYYYYYY'),
  PUSH=(70:22,23))
  OPTION COPY
  OUTFIL INCLUDE=(42,8,CH,EQ,C'YYYYYYYY',OR,
                  42,7,CH,EQ,C'ZZZZZZZ'),
        IFTHEN=(WHEN=GROUP,BEGIN=(47,7,CH,EQ,C'ZZZZZZZ'),
                END=(42,8,CH,EQ,C'YYYYYYYY'),
                PUSH=(100:47,24)),
         BUILD=(1,120),CONVERT
         *
WER813I  INSTALLATION OPTIONS IN DDT LOAD LIBRARY WILL BE USED
WER270A  OUTFIL STATEMENT  : DUPLICATE PARM FOUND
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE

Back to top
View user's profile Send private message

Arun Raj

Moderator


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

PostPosted: Thu Apr 05, 2018 10:36 pm    Post subject:
Reply with quote

sancraig16,

Is this related to your other topic? Sample input and output records might help.

Not sure what you are trying to achieve, but did you try 'moving' your WHEN=GROUP to your existing INREC?
Back to top
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 340
Location: Maryland

PostPosted: Thu Apr 05, 2018 10:44 pm    Post subject: Re: Duplicate PARM on OUTFIL
Reply with quote

sancraig16 wrote:
I tried adding a 2nd WHEN=GROUP statement and job failed with DUPLICATE PARM


1. There is no sign of any 2nd WHEN=GROUP parameter (not a statement) - ???

2. In the case if any IFTHEN used, no BUILD other than IFTHEN's subparameter is allowed.
Back to top
View user's profile Send private message
sancraig16

New User


Joined: 27 Mar 2018
Posts: 22
Location: usa

PostPosted: Thu Apr 05, 2018 10:50 pm    Post subject:
Reply with quote

It is different task which I am working on . My goal is to get XXXXXX, YYYYYYY and ZZZZZZZ on the same line. Using WHEN=GROUP , I was able to PUSH XXXXXX on records of YYYYYYY and ZZZZZZ. I am now trying a 2nd WHEN=GROUP to get them all on the same record.

Code:

       XXXXXXX
00000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000
                                    YYYYYYYY000000123
11111111111111111111111111111111111111111111111111111
                                    ZZZZZZZ0000004569
22222222222222222222222222222222222222222222222222222
       XXXXXXX
00000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000
                                    YYYYYYYY000000222
11111111111111111111111111111111111111111111111111111
                                    ZZZZZZZ0000008888
22222222222222222222222222222222222222222222222222222

Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Thu Apr 05, 2018 10:51 pm    Post subject:
Reply with quote

You can try adding the second WHEN=GROUP to your existing INREC.
Back to top
View user's profile Send private message
sancraig16

New User


Joined: 27 Mar 2018
Posts: 22
Location: usa

PostPosted: Thu Apr 05, 2018 10:53 pm    Post subject: Re: Duplicate PARM on OUTFIL
Reply with quote

sergeyken wrote:
sancraig16 wrote:
I tried adding a 2nd WHEN=GROUP statement and job failed with DUPLICATE PARM


1. There is no sign of any 2nd WHEN=GROUP parameter (not a statement) - ???

2. In the case if any IFTHEN used, no BUILD other than IFTHEN's subparameter is allowed.


Not sure if I am following you . The 2nd WHEN=GROUP is right after the OUTFIL INCLUDE .

Are you saying IFTHEN and BUILD cannot go together?
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Thu Apr 05, 2018 10:58 pm    Post subject:
Reply with quote

Quote:
The 2nd WHEN=GROUP is right after the OUTFIL INCLUDE .
Yes, I noticed that and hence asking you if you could modify like this (remove from OUTFIL and add to INREC).
Code:
SYSIN :
   INREC IFTHEN=(WHEN=GROUP,BEGIN=(13,7,CH,EQ,C'XXXXXXX'),
   END=(42,8,CH,EQ,C'YYYYYYYY'),
   PUSH=(70:22,23)),
         IFTHEN=(WHEN=GROUP,BEGIN=(....),
   END=(.....),
   PUSH=(...))
   OPTION COPY
....
...


Quote:
Are you saying IFTHEN and BUILD cannot go together?
No, I was not saying that, IFTHEN and BUILD/OVERLAY could go together but I think not a GROUP/PUSH and BUILD/OVERLAY. I cannot test with your product right now.
Back to top
View user's profile Send private message
sancraig16

New User


Joined: 27 Mar 2018
Posts: 22
Location: usa

PostPosted: Thu Apr 05, 2018 11:02 pm    Post subject:
Reply with quote

Arun Raj wrote:
You can try adding the second WHEN=GROUP to your existing INREC.


I should have thought about that. Thanks ! It works now.
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Thu Apr 05, 2018 11:03 pm    Post subject:
Reply with quote

sancraig16 wrote:
Arun Raj wrote:
You can try adding the second WHEN=GROUP to your existing INREC.


I should have thought about that. Thanks ! It works now.
No problem! Glad I could be of some help.
Back to top
View user's profile Send private message
sancraig16

New User


Joined: 27 Mar 2018
Posts: 22
Location: usa

PostPosted: Fri Apr 06, 2018 1:58 am    Post subject:
Reply with quote

I ran this SORT for large number of records and ran into an issue. In one set of records I do not have a matching BEGIN but do have the matching END . I was expecting the record to be omitted but it was included. In my case I did not have XXXXXXX but do have YYYYYYYY record . Anyway to exclude such occurrences?
Back to top
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 340
Location: Maryland

PostPosted: Fri Apr 06, 2018 2:30 am    Post subject: Re: Duplicate PARM on OUTFIL
Reply with quote

sancraig16 wrote:
sergeyken wrote:
2. In the case if any IFTHEN used, no BUILD other than IFTHEN's subparameter is allowed.


Not sure if I am following you . The 2nd WHEN=GROUP is right after the OUTFIL INCLUDE .

Are you saying IFTHEN and BUILD cannot go together?


Either BUILD alone, as parameter of OUTFIL statement, or multiple IFTHEN with optional BUILD subparametrs as parts of IFTHENs are allowed.

Either
Code:
OUTFIL ...BUILD=(...)...

or
Code:
OUTFIL ...IFTHEN=(...,PUSH=(...)...),
       ...IFTHEN=(...,BUILD=(...)...),
       ...IFTHEN=(...,BUILD=(...)...),



BUILD, and IFTHEN are incompatible at the same level of parameters.
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Fri Apr 06, 2018 6:05 am    Post subject:
Reply with quote

sancraig16 wrote:
I ran this SORT for large number of records and ran into an issue. In one set of records I do not have a matching BEGIN but do have the matching END . I was expecting the record to be omitted but it was included. In my case I did not have XXXXXXX but do have YYYYYYYY record . Anyway to exclude such occurrences?
Can you post an example that includes that scenario and any other situation that could possibly occur, and the expected output from it?

Now looking back at your sample data, you might want to push 'X' record and the 'Y' record to your 'Z' record and then in the output include the 'Z' record alone. I just realized you are not doing it that way. Can you post the control statements used?
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 -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Remove duplicate record with condition rajiv rengasamy DFSORT/ICETOOL 4 Wed Jul 11, 2018 3:55 pm
No new posts SELECT TO MULIPLE OUTFIL speermb DFSORT/ICETOOL 5 Fri Mar 23, 2018 10:44 pm
No new posts WRITE to VSAM giving duplicate RC picus_mf CICS 1 Fri Feb 23, 2018 2:52 pm
No new posts add sequence number for duplicate rec... SRUTHI DRAVIDAMANI COBOL Programming 11 Thu Feb 22, 2018 5:37 pm
No new posts how to add the amount for duplicate r... SRUTHI DRAVIDAMANI COBOL Programming 9 Wed Feb 21, 2018 7:21 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us