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
 
OUTREC OVERLAY different to INCREC generated INPUT

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

New User


Joined: 15 Aug 2015
Posts: 7
Location: Germany

PostPosted: Fri Apr 27, 2018 2:11 am    Post subject: OUTREC OVERLAY different to INCREC generated INPUT
Reply with quote

Hello,

I have the following input from IDCAMS in a VBA;125 dataset:

Code:

0GDG BASE ------ SA$SICH.LPAR.DFDSS.PDUMP.W.VUSR403             
        DATASET-OWNER---V-USR403     CREATION--------2011.106   
0NONVSAM ------- SA$SICH.LPAR.DFDSS.PDUMP.W.VUSR403.G0125V00   
        DATASET-OWNER-----(NULL)     CREATION--------2018.090   
0NONVSAM ------- SA$SICH.LPAR.DFDSS.PDUMP.W.VUSR403.G0126V00   
        DATASET-OWNER-----(NULL)     CREATION--------2018.098   
0NONVSAM ------- SA$SICH.LPAR.DFDSS.PDUMP.W.VUSR403.G0127V00   
        DATASET-OWNER-----(NULL)     CREATION--------2018.104   


expected output is basically a descending list by name, listing creation date and datediff to today plus the GDG base here.

Code:

ZSA$SICH.LPAR.DFDSS.PDUMP.W.VUSR403.G0127V00 W20181042018116+0000012SA$SICH.LPAR.DFDSS.PDUMP.W.VUSR403
ZSA$SICH.LPAR.DFDSS.PDUMP.W.VUSR403.G0126V00 W20180982018116+0000018SA$SICH.LPAR.DFDSS.PDUMP.W.VUSR403
ZSA$SICH.LPAR.DFDSS.PDUMP.W.VUSR403.G0125V00 W20180902018116+0000026SA$SICH.LPAR.DFDSS.PDUMP.W.VUSR403
?SA$SICH.LPAR.DFDSS.PDUMP.W.VUSR403          W20111062018116+0002567SA$SICH.LPAR.DFDSS.PDUMP.W.VUSR403


Problem is, as soon as I apply additional IFTHEN in the OUTREC the result is different on what INREC has provided. To test, just move the END before OUTREC to see what's meant. Any advise on where to look for the bug is appreciated. Btw, the competitor does the same attempt without issues. icon_eek.gif

Code:

//PARSE    EXEC PGM=SORT,PARM='MSG=AP'                               
//SYSOUT   DD SYSOUT=*                                                 
//SORTIN   DD DISP=SHR,DSN=&SYSUID..SYSPRINT                           
//SORTOUT  DD SYSOUT=*,LRECL=170                                       
//SYSIN    DD *                                                         
  OPTION VLSCMP                                                         
  SORT FIELDS=(6,44,CH,D)                                               
  INCLUDE COND=((6,15,SS,EQ,C'GDG BASE ------,NONVSAM -------'),OR,     
                 42,16,CH,EQ,C'CREATION--------')                       
  INREC IFTHEN=(WHEN=GROUP,                                             
    BEGIN=(6,15,SS,EQ,C'GDG BASE ------,NONVSAM -------'),             
    PUSH=(126:22,44)),                                                 
    IFTHEN=(WHEN=(42,16,CH,EQ,C'CREATION--------'),                     
      BUILD=(1,4,C'?',126,44,X,58,8,UFF,M11,LENGTH=7,DATE3),HIT=NEXT), 
    IFTHEN=(WHEN=(5,1,CH,EQ,C'?'),                                     
      PARSE=(%00=(STARTAFT=C'.PDUMP.',ENDBEFR=C'.',FIXLEN=1)),         
      OVERLAY=(50:%00,65:6,44,JFY=(SHIFT=RIGHT),                       
               65:65,35,JFY=(SHIFT=LEFT)),HIT=NEXT),                   
    IFTHEN=(WHEN=(101,1,CH,EQ,C'G',AND,                                 
                 (102,4,ZD,GE,+0,AND,102,4,ZD,LE,+9999),AND,           
                  106,1,CH,EQ,C'V',AND,107,2,ZD,EQ,+0),                 
      BUILD=(1,4,C'Z',6,44,50,1,51,7,58,7,                             
             58,7,Y4T,DATEDIFF,51,7,Y4T,65,35,9X)),                     
    IFTHEN=(WHEN=(5,1,CH,EQ,C'?'),                                     
      BUILD=(1,4,C'?',6,44,50,1,51,7,58,7,                             
             58,7,Y4T,DATEDIFF,51,7,Y4T,6,44))                         
  OUTREC IFTHEN=(WHEN=INIT,OVERLAY=(121:+0,TO=ZD,LENGTH=4))             
  END                                                                   


Cheers,
Joerg

Edit: Updated expected output.
Back to top
View user's profile Send private message

sergeyken

Active User


Joined: 29 Apr 2008
Posts: 305
Location: Maryland

PostPosted: Fri Apr 27, 2018 4:08 am    Post subject: Re: OUTREC OVERLAY different to INCREC generated INPUT
Reply with quote

Joerg.Findeisen wrote:
Code:
  OUTREC IFTHEN=(WHEN=INIT,OVERLAY=(121:+0,TO=ZD,LENGTH=4))


1. The single IFTHEN=(WHEN=INIT...) doesn't make a real sense. It works in the same manner as unconditional OUTREC OVERLAY=...

2. It would be nice to have samples: what output is expected vs. what is produced with/without this "extra IFTHEN"? The readers have no obligation to run such test for you.

3. For clarity, and for better understanding of the process it would be a good idea to place the control statements in the order they are really applied at run time:
Code:
 INCLUDE ...
 INREC ...
 SORT ...
 OUTREC ...
 OUTFIL ...
 END
Back to top
View user's profile Send private message
Joerg.Findeisen

New User


Joined: 15 Aug 2015
Posts: 7
Location: Germany

PostPosted: Fri Apr 27, 2018 12:18 pm    Post subject:
Reply with quote

Thanks for replying back and the hints for coding. I am so used to that sequence that I had forgotten to rearrange it prior to posting. icon_redface.gif

The OUTREC was coded with the first IFTHEN only (there are more to follow) but basically it should make no difference. Althou it does presently..

So the difference is shown here with OUTREC OVERLAY (suggested by you):

Code:

ZSA$SICH.LPAR.DFDSS.PDUMP.W.VUSR403.G0127V00 W20181042018116+0000012SA$S..
ZSA$SICH.LPAR.DFDSS.PDUMP.W.VUSR403.G0126V00 W20180982018116+0000018SA$S..
ZSA$SICH.LPAR.DFDSS.PDUMP.W.VUSR403.G0125V00 W20180902018116+0000026SA$S..
?SA$SICH.LPAR.DFDSS.PDUMP.W.VUSR403          W20111062018116+0002567SA$S..
0NONVSAM ------- SA$SICH.LPAR.DFDSS.PDUMP.W.VUSR403.G0125V00           
0NONVSAM ------- SA$SICH.LPAR.DFDSS.PDUMP.W.VUSR403.G0126V00           
0NONVSAM ------- SA$SICH.LPAR.DFDSS.PDUMP.W.VUSR403.G0127V00           
0GDG BASE ------ SA$SICH.LPAR.DFDSS.PDUMP.W.VUSR403                     


and here with OUTREC IFTHEN OVERLAY applied:

Code:

ZSA$SICH.LPAR.DFDSS.PDUMP.W.VUSR403.G0127V00 W20181042018116+0000012SA$S..
ZSA$SICH.LPAR.DFDSS.PDUMP.W.VUSR403.G0126V00 W20180982018116+0000018SA$S..
ZSA$SICH.LPAR.DFDSS.PDUMP.W.VUSR403.G0125V00 W20180902018116+0000026SA$S..
0NONVSAM ------- SA$SICH.LPAR.DFDSS.PDUMP.W.VUSR403.G0125V00           
0NONVSAM ------- SA$SICH.LPAR.DFDSS.PDUMP.W.VUSR403.G0126V00           
0NONVSAM ------- SA$SICH.LPAR.DFDSS.PDUMP.W.VUSR403.G0127V00           
0GDG BASE ------ SA$SICH.LPAR.DFDSS.PDUMP.W.VUSR403                     
?                                             20111062018116+0002567   


I would expect the first output as this is where I want to apply additional IFTHEN clauses for the final job. Just don't see my mistake here. icon_rolleyes.gif
IFTHEN INIT should apply in any case, doesn't it?
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Fri Apr 27, 2018 6:22 pm    Post subject: Re: OUTREC OVERLAY different to INCREC generated INPUT
Reply with quote

Joerg.Findeisen wrote:
Btw, the competitor does the same attempt without issues. icon_eek.gif
Were you suggesting that, with some other sort product, it gives a different result? I am trying to figure out what exactly is your problem.
Can you post the control statements that you used for each run that produced the different results above?
Back to top
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 305
Location: Maryland

PostPosted: Fri Apr 27, 2018 11:56 pm    Post subject:
Reply with quote

Joerg.Findeisen wrote:
Thanks for replying back and the hints for coding. I am so used to that sequence that I had forgotten to rearrange it prior to posting. icon_redface.gif


I cannot run this test by myself right now, but you continuously refuse to provide THE REQUIRED INFO IN FULL.

Sorry, in this case I cannot help.
Back to top
View user's profile Send private message
Joerg.Findeisen

New User


Joined: 15 Aug 2015
Posts: 7
Location: Germany

PostPosted: Sun Apr 29, 2018 4:49 pm    Post subject:
Reply with quote

Sorry for the delayed response. It's a weekend before a bank holiday here and I am On-call. icon_confused.gif

@Arun: Yes, your assumption is correct. SYNCSORT does give me a different result compared to DFSORT when I use in the OUTREC the following statement:

Code:
OUTREC IFTHEN=(WHEN=INIT,OVERLAY=(121:+0,TO=ZD,LENGTH=4))

To me it should provide exactly the same result as when using:
Code:
OUTREC OVERLAY=(121:+0,TO=ZD,LENGTH=4)


To summarize this, DFSORT provides same result for both variants in the OUTREC statement while SYNCSORT fails using IFTHEN OVERLAY in my OUTREC.

@sergeyken: Hope I could make the issue more clear now. Sorry for the confusion if any.

Initial question of mine was if I am doing something wrong for SYNCSORT or if it is a bug in the Software. Presently I am guessing my coding is correct.

Cheers,
Joerg
Back to top
View user's profile Send private message
Joerg.Findeisen

New User


Joined: 15 Aug 2015
Posts: 7
Location: Germany

PostPosted: Sun Apr 29, 2018 9:24 pm    Post subject:
Reply with quote

Code:
//PARSE    EXEC PGM=SORT,PARM='MSG=AP'                               
//SYSOUT   DD SYSOUT=*                                                 
//SORTIN   DD DISP=SHR,DSN=&SYSUID..SYSPRINT                           
//SORTOUT  DD SYSOUT=*,LRECL=170                                       
//SYSIN    DD *                                                         
  OPTION VLSCMP                                                         
  SORT FIELDS=(6,44,CH,D)                                               
  INCLUDE COND=((6,15,SS,EQ,C'GDG BASE ------,NONVSAM -------'),OR,     
                 42,16,CH,EQ,C'CREATION--------')                       
  INREC IFTHEN=(WHEN=GROUP,                                             
    BEGIN=(6,15,SS,EQ,C'GDG BASE ------,NONVSAM -------'),             
    PUSH=(126:22,44)),                                                 
    IFTHEN=(WHEN=(42,16,CH,EQ,C'CREATION--------'),                     
      BUILD=(1,4,C'?',126,44,X,58,8,UFF,M11,LENGTH=7,DATE3),HIT=NEXT),
    IFTHEN=(WHEN=(5,1,CH,EQ,C'?'),                                     
      PARSE=(%00=(STARTAFT=C'.PDUMP.',ENDBEFR=C'.',FIXLEN=1)),         
      OVERLAY=(50:%00,65:6,44,JFY=(SHIFT=RIGHT),                       
               65:65,35,JFY=(SHIFT=LEFT)),HIT=NEXT),                   
    IFTHEN=(WHEN=(101,1,CH,EQ,C'G',AND,                                 
                 (102,4,ZD,GE,+0,AND,102,4,ZD,LE,+9999),AND,           
                  106,1,CH,EQ,C'V',AND,107,2,ZD,EQ,+0),                 
      BUILD=(1,4,C'Z',6,44,50,1,51,7,58,7,                             
             58,7,Y4T,DATEDIFF,51,7,Y4T,65,35,9X)),                     
    IFTHEN=(WHEN=(5,1,CH,EQ,C'?'),                                     
      BUILD=(1,4,C'?',6,44,50,1,51,7,58,7,                             
             58,7,Y4T,DATEDIFF,51,7,Y4T,6,44))                         
  OUTREC IFTHEN=(WHEN=INIT,OVERLAY=(121:+0,TO=ZD,LENGTH=4))             
  END


is different in DFSORT and SYNCSORT,while

Code:
//PARSE    EXEC PGM=SORT,PARM='MSG=AP'                               
//SYSOUT   DD SYSOUT=*                                                 
//SORTIN   DD DISP=SHR,DSN=&SYSUID..SYSPRINT                           
//SORTOUT  DD SYSOUT=*,LRECL=170                                       
//SYSIN    DD *                                                         
  OPTION VLSCMP                                                         
  SORT FIELDS=(6,44,CH,D)                                               
  INCLUDE COND=((6,15,SS,EQ,C'GDG BASE ------,NONVSAM -------'),OR,     
                 42,16,CH,EQ,C'CREATION--------')                       
  INREC IFTHEN=(WHEN=GROUP,                                             
    BEGIN=(6,15,SS,EQ,C'GDG BASE ------,NONVSAM -------'),             
    PUSH=(126:22,44)),                                                 
    IFTHEN=(WHEN=(42,16,CH,EQ,C'CREATION--------'),                     
      BUILD=(1,4,C'?',126,44,X,58,8,UFF,M11,LENGTH=7,DATE3),HIT=NEXT),
    IFTHEN=(WHEN=(5,1,CH,EQ,C'?'),                                     
      PARSE=(%00=(STARTAFT=C'.PDUMP.',ENDBEFR=C'.',FIXLEN=1)),         
      OVERLAY=(50:%00,65:6,44,JFY=(SHIFT=RIGHT),                       
               65:65,35,JFY=(SHIFT=LEFT)),HIT=NEXT),                   
    IFTHEN=(WHEN=(101,1,CH,EQ,C'G',AND,                                 
                 (102,4,ZD,GE,+0,AND,102,4,ZD,LE,+9999),AND,           
                  106,1,CH,EQ,C'V',AND,107,2,ZD,EQ,+0),                 
      BUILD=(1,4,C'Z',6,44,50,1,51,7,58,7,                             
             58,7,Y4T,DATEDIFF,51,7,Y4T,65,35,9X)),                     
    IFTHEN=(WHEN=(5,1,CH,EQ,C'?'),                                     
      BUILD=(1,4,C'?',6,44,50,1,51,7,58,7,                             
             58,7,Y4T,DATEDIFF,51,7,Y4T,6,44))                         
  OUTREC OVERLAY=(121:+0,TO=ZD,LENGTH=4)             
  END


produces the same output in both products. As stated, there are a few more IFTHEN in my OUTREC (which I haven't posted yet) to be applied so I wish to see the same result with IFTHEN at first. Sometimes SYNCSORT is more strict with Syntax and it puzzles me why I see different results.
Back to top
View user's profile Send private message
Joerg.Findeisen

New User


Joined: 15 Aug 2015
Posts: 7
Location: Germany

PostPosted: Sun Apr 29, 2018 9:40 pm    Post subject:
Reply with quote

The code shall be used to find expired DFDSS backups which by identifier can be either Daily, Weekly or Monthly and have a creation date that exceeds a certain value (hence the IDCAMS input).
If all GDS have been expired also the associated empty GDG base with no active GDS has to be deleted.

With the supplied code, SYNCSORT would provide me with DELETE statements for the latest active GDS which is not correct.

Most of my installations do have in fact DFSORT which never lets me down, but out of curiosity I'd like to see it working also with SYNCSORT.

Cheers,
Joerg
Back to top
View user's profile Send private message
Joerg.Findeisen

New User


Joined: 15 Aug 2015
Posts: 7
Location: Germany

PostPosted: Mon Apr 30, 2018 5:58 am    Post subject:
Reply with quote

If it might be of interest, the SYNCSORT level used identifies itself with:

WER169I RELEASE 2.1 BATCH 0539 TPF LEVEL 1.1
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 How to build one file from two input ... daniele DFSORT/ICETOOL 5 Tue Feb 27, 2018 6:45 pm
No new posts Preserve order in Input File pshongal DFSORT/ICETOOL 13 Thu Dec 21, 2017 4:20 pm
No new posts OUTREC with ALter Command scorp_rahul23 DFSORT/ICETOOL 1 Wed Nov 22, 2017 3:10 pm
No new posts JOINKEYS Paired and Unpaired Sort on ... MFwhiz DFSORT/ICETOOL 7 Tue Nov 07, 2017 2:46 am
No new posts Copy selected columns from 2 input fi... Poha Eater DFSORT/ICETOOL 3 Thu Nov 02, 2017 3:43 pm

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