IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SORTOUT LRECL issue in JOINKEY


IBM Mainframe Forums -> SYNCSORT
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Vinodh S

New User


Joined: 12 Apr 2012
Posts: 28
Location: LA, California

PostPosted: Tue Dec 18, 2012 10:29 pm
Reply with quote

I'm trying to find out the delta changes between two files that is created today and the previous day.

The two input files are 25 bytes in LRECL. I have got the output as expected with respect to the Delta changes.

in the sortout i did not code the LRECL, Format and the Blocksize for the file and left it with the sort to create it with the best suited LRECL.

When i executed the job, the SORTOUT was created , but the LRECL of the SORTOUT file was 50 bytes.

I expected the SORTOUT to be 26 bytes. Since in my outrec build I write the Single Character I/U/D and then 25 bytes of field, either from F1 or from F2.

So i tried to give the LRECL=26, BLKSIZE=0 for the SORTOUT and but the SORT step abended and the SYSOUT pointed that the LRECL 26 is incompatible with SORTOUT.

Can some one tell why 50 byte file is created and if there is a way to create a SORTOUT file with just 26 bytes as LRECL.

Code:

JoinKeys Files=F1,FIELDS=(1,11,A,22,3,A)
JoinKeys Files=F2,FIELDS=(1,11,A,22,3,A)
JOINUNPAIRED,F1,F2
REFORMAT FIELDS=(F1:1,25,F2:1,25),FILL=X'FF'
OMIT COND=(1,25,CH,EQ,26,25)
SORT FIELDS=COPY
OUTREC IFTHEN=(WHEN=(2,1,BI,NE,X'FF',AND,26,1,B1,EQ,X'FF'),
             BUILD=(C'I',1,25)),
IFTHEN=(WHEN=(2,1,BI,EQ,X'FF',AND,26,1,B1,NE,X'FF'),
             BUILD=(C'D',26,25)),
IFTHEN=(WHEN=(2,1,BI,NE,X'FF',AND,26,1,B1,NE,X'FF'),
             BUILD=(C'U',1,25))
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Dec 18, 2012 11:21 pm
Reply with quote

If you are using DFSORT, you use the ? marker, not the FILL character, to identify match/mismatch in JOINKEYS.

Can you show your sysout from the step, please.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Wed Dec 19, 2012 12:25 am
Reply with quote

Code:
OMIT COND=(1,25,CH,EQ,26,25)


shouldnt it be

Code:
OMIT COND=(1,25,CH,EQ,26,25,CH)
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Dec 19, 2012 3:58 am
Reply with quote

Yes, Pandora-Box. I think the cards were typed, rather than pasted, so highly unreliable.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Dec 19, 2012 9:11 am
Reply with quote

Can you show a few of the output records, please, from the step which wrote 50 bytes?
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Wed Dec 19, 2012 9:16 am
Reply with quote

Also what is the sysout you get when you dont code DCB
What made you think to have LRECL=50?
Back to top
View user's profile Send private message
Vinodh S

New User


Joined: 12 Apr 2012
Posts: 28
Location: LA, California

PostPosted: Wed Dec 19, 2012 10:32 am
Reply with quote

Hi Pandora

I have already posted both the SYSOUT in my previous post. Posting here a small version for clarity. Please refer the previous post for the complete SYSOUT details.

The First SYSOUT I have posted is when I coded the DCB in the SORTOUT. Job abended, ABEND=S000 U0016.
Code:

 WER481I  JOINKEYS REFORMAT RECORD LENGTH=   50, TYPE = F                       
 WER237I  OUTREC RECORD LENGTH =    50                                         
 WER110I  SORTOUT  : RECFM=FB   ; LRECL=    26; BLKSIZE= 27976                 
 WER074I  SORTOUT  : DSNAME=TEST.WORK.TEMP.IUDEXTR                     
 WER247A  SORTOUT  HAS INCOMPATIBLE LRECL       


The Second SYSOUT correponds to the JCL where I did not code the DCB for the SORTOUT. The Job ran fine.

Code:

 WER481I  JOINKEYS REFORMAT RECORD LENGTH=   50, TYPE = F                       
 WER237I  OUTREC RECORD LENGTH =    50                                         
 WER110I  SORTOUT  : RECFM=FB   ; LRECL=    50; BLKSIZE= 27950                 
 WER074I  SORTOUT  : DSNAME=TEST.WORK.TEMP.IUDEXTR   


@ BILL

Will post the sample records shortly.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Wed Dec 19, 2012 10:46 am
Reply with quote

Also post your complete JCL STEP
Back to top
View user's profile Send private message
Vinodh S

New User


Joined: 12 Apr 2012
Posts: 28
Location: LA, California

PostPosted: Wed Dec 19, 2012 11:39 am
Reply with quote

JCl Where the DCB was coded for the SORTOUT.

Code:

000146 //STEP150  EXEC PGM=SORT,COND=(0,NE)                                   
000147 //**************************   
000148 //***       STEP FUNCTION  : COMPARE TO GET I/U/D
000153 //***********************   
000154 //SYSOUT   DD SYSOUT=*                                                 
000155 //SYSPRINT DD SYSOUT=*                                                 
000156 //*                                                                     
000160 //SORTJNF1 DD DSN=TEST.WORK.TEMP.EXTR.NEW,                     
000161 //         DISP=SHR                                                     
000162 //*                                                                     
000163 //SORTJNF2 DD DSN=TEST.WORK.TEMP.EXTR.OLD,                     
000164 //         DISP=SHR                                                     
000165 //*                                                                     
000166 //SORTOUT  DD DSN=TEST.WORK.TEMP.IUDEXTR,                     
000167 //         DISP=(NEW,CATLG,DELETE),                                     
000168 //         DCB=(LRECL=26,RECFM=FB,BLKSIZE=0),                           
000169 //         SPACE=(CYL,(10,100),RLSE)                                   
000170 //*                                                                     
000171 //SYSIN    DD DSN=TEST.WORK.TEMP.CNTL(IUDTEST),                 
000172 //         DISP=SHR                                                     



Corresponding SYSOUT:

Code:

Code:
 WER481I  JOINKEYS REFORMAT RECORD LENGTH=   50, TYPE = F                       
 WER237I  OUTREC RECORD LENGTH =    50                                         
 WER110I  SORTOUT  : RECFM=FB   ; LRECL=    26; BLKSIZE= 27976                 
 WER074I  SORTOUT  : DSNAME=TEST.WORK.TEMP.IUDEXTR                     
 WER247A  SORTOUT  HAS INCOMPATIBLE LRECL       


-------------------


JCl Where the DCB was not coded for the SORTOUT.

Code:

000147 //STEP150  EXEC PGM=SORT,COND=(0,NE)                                   
000148 //*****************************   
000149 //***       STEP FUNCTION  : COMPARE TO GET I/U/D                  *   
000154 //***************************   
000155 //SYSOUT   DD SYSOUT=*                                                 
000156 //SYSPRINT DD SYSOUT=*                                                 
000160 //*                                                                     
000161 //SORTJNF1 DD DSN=TEST.WORK.TEMP.EXTR.NEW,                     
000162 //         DISP=SHR                                                     
000163 //*                                                                     
000164 //SORTJNF2 DD DSN=TEST.WORK.TEMP.EXTR.OLD,                     
000165 //         DISP=SHR                                                     
000166 //*                                                                     
000167 //SORTOUT  DD DSN=TEST.WORK.TEMP.IUDEXTR,                     
000168 //         DISP=(NEW,CATLG,DELETE),                                     
000170 //         SPACE=(CYL,(10,100),RLSE)                                   
000171 //*                                                                     
000172 //SYSIN    DD DSN=TEST.WORK.TEMP.CNTL(IUDTEST),                 
000173 //         DISP=SHR                                                     



Corresponding SYSOUT:

Code:

 WER481I  JOINKEYS REFORMAT RECORD LENGTH=   50, TYPE = F                       
 WER237I  OUTREC RECORD LENGTH =    50                                         
 WER110I  SORTOUT  : RECFM=FB   ; LRECL=    50; BLKSIZE= 27950                 
 WER074I  SORTOUT  : DSNAME=TEST.WORK.TEMP.IUDEXTR 


For a complete SYSOUT, please refer my previous post.
Back to top
View user's profile Send private message
chandan.inst

Active User


Joined: 03 Nov 2005
Posts: 275
Location: Mumbai

PostPosted: Wed Dec 19, 2012 11:59 am
Reply with quote

Hi,

It seems it's taking REFORMAT fields length as out put file length.

What is coming in remaining 24 bytes in output file when you are executing it witout giving LRECL

You can try using SORTOF01 / OUTFIL FILES = 01 instead of SORTOUT

Regards,
Chandan
Back to top
View user's profile Send private message
Vinodh S

New User


Joined: 12 Apr 2012
Posts: 28
Location: LA, California

PostPosted: Wed Dec 19, 2012 12:46 pm
Reply with quote

Hi Chandan

The SORTOF01 did work as per my expectation icon_smile.gif
thanks a lot.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Wed Dec 19, 2012 12:53 pm
Reply with quote

I still couldnt believe OUTFIL did the trick but then why didnt it work with OUTREC

May be OUTREC should be replaced by INREC?

A good topic for discussion I believe

Experts need your intervention

Also with all due respect to SYNCSORT .. I didn't get issue in DFSORT icon_confused.gif

I know I shouldnt compare both but yet thought of stating it
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Dec 19, 2012 1:29 pm
Reply with quote

I'd have used

Code:
   BUILD=(C'I',1,25)),


and had them on INREC.

It is doing the processing, and then using 50 (the copy of length from input (REFORMAT here) to output is normal, unless data adjusted in length), even "padding" with spaces from the 26, Sort "knows" the records are 26, but also, somehow, "knows" you want a record-length of 50 (which you don't).

I think you need to raise an issue with SyncSort.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Dec 20, 2012 3:17 am
Reply with quote

I suspect this:

Code:
  INREC IFTHEN=(WHEN=(2,1,BI,NE,X'FF',AND,26,1,BI,EQ,X'FF'),                   
                 BUILD=(C'I',1,25)),                                               
        IFTHEN=(WHEN=(2,1,BI,EQ,X'FF',AND,26,1,BI,NE,X'FF'),                         
                 BUILD=(C'D',26,25)),                                             
        IFTHEN=(WHEN=(2,1,BI,NE,X'FF',AND,26,1,BI,NE,X'FF'),                         
                 BUILD=(C'U',1,25))   


Or this:

Code:
  INREC IFOUTLEN=26,
      IFTHEN=(WHEN=(2,1,BI,NE,X'FF',AND,26,1,BI,EQ,X'FF'),                   
               BUILD=(C'I',1,25)),                                               
      IFTHEN=(WHEN=(2,1,BI,EQ,X'FF',AND,26,1,BI,NE,X'FF'),                         
               BUILD=(C'D',26,25)),                                             
      IFTHEN=(WHEN=(2,1,BI,NE,X'FF',AND,26,1,BI,NE,X'FF'),                         
               BUILD=(C'U',1,25)) 


will work.

The IFOUTLEN can be used to set the length of the output from IFTHEN statements. It is not always possible for Sort to "keep track" of values across all IFTHENs. I can at the moment only think that the columns were "confusing" the issue.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu Dec 20, 2012 4:30 am
Reply with quote

Hi,

I have run it thru DFSORT and the output LRECL for SORTOUT is 50.


Actually, it makes sense that the LRECL is 50.

If all the IFTHEN statements do not satisfy the criteria, the record to be written out is 50 bytes long.


Gerry
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Thu Dec 20, 2012 10:38 am
Reply with quote

Code:
//INA      DD *
AAA  123
DBB  345
EBB  345
FBB  345
//INB      DD *
AAA  354
BBB  345
CBB  345
FBB  345
//SORTOUT DD DSN=PANDORA.MIMAT.CM006,DISP=(NEW,CATLG,DELETE),
//            SPACE=(CYL,(5,5),RLSE)
//SYSIN    DD *
  OPTION COPY
  JOINKEYS F1=INA,FIELDS=(1,3,A)
  JOINKEYS F2=INB,FIELDS=(1,3,A)
  JOIN UNPAIRED,F1,F2
  REFORMAT FIELDS=(F1:1,10,F2:1,10),FILL=X'FF'
  OMIT COND=(1,10,CH,EQ,11,10,CH)
  INREC IFOUTLEN=10,
        IFTHEN=(WHEN=(1,1,BI,NE,X'FF',AND,11,1,BI,EQ,X'FF'),
               BUILD=(1:C'I',2:1,10)),
        IFTHEN=(WHEN=(1,1,BI,EQ,X'FF',AND,11,1,BI,NE,X'FF'),
               BUILD=(1:C'D',2:11,10)),
        IFTHEN=(WHEN=(1,1,BI,NE,X'FF',AND,11,1,BI,NE,X'FF'),
               BUILD=(1:C'U',2:1,10))


Yes this gives the LRECL 10 but though without IFOUTLEN we dont get the error

Quote:
IFOUTLEN
 IFOUTLEN=n

INREC Control Statement

Overrides the INREC LRECL (or reformatted record length if the INREC record
is further modified) determined by DFSORT from your INREC IFTHEN
clauses. DFSORT sets an appropriate LRECL for the output records based on
the build, overlay, find/replace and group operation items specified by the
IFTHEN clauses. However, DFSORT does not analyze the possible results of
WHEN=(logexp) conditions when determining an appropriate INREC LRECL.
When you use INREC IFTHEN clauses, you can override the INREC LRECL
determined by DFSORT with the INREC IFOUTLEN parameter.
Fixed-length records longer than the IFOUTLEN length are truncated to the
IFOUTLEN length. Fixed-length records shorter than the IFOUTLEN are
padded with blanks to the IFOUTLEN length. Variable-length records longer
than the IFOUTLEN length are truncated to the IFOUTLEN length.
n specifies the length to use for the INREC LRECL (or for the reformatted
record length if the INREC record is further modified) . The value for n
must be between 1 and 32767, but must not be larger than the maximum
LRECL allowed for the RECFM, and must not conflict with the specified or
retrieved LRECL for the fixed-length output data set.


From DFSORT Manual and this is pretty clear now
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> SYNCSORT

 


Similar Topics
Topic Forum Replies
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts VB to FB - Finding LRECL SYNCSORT 4
No new posts Issue after ISPF copy to Linklist Lib... TSO/ISPF 1
No new posts Facing ABM3 issue! CICS 3
No new posts Panvalet - 9 Character name - Issue c... CA Products 6
Search our Forums:

Back to Top