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

Syncsort help needed for IFTHEN+BUILD syntax


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
maintenure

New User


Joined: 22 Sep 2008
Posts: 10
Location: bangalore

PostPosted: Mon May 31, 2010 8:25 pm
Reply with quote

I am using the follwing sort card for joining two files and populate 'N' for a variable if the record is only present in F1,and 'Y' for the variabel if it is present in both.But i want only the first file content(1.e 1365 bytes)

Code:
  JOINKEYS FILES=F1,FIELDS=(1,9,A,10,1,A,11,2,A)
  JOINKEYS FILES=F2,FIELDS=(1,9,A,10,1,A,11,2,A)
  JOIN UNPAIRED,F1                             
  REFORMAT FIELDS=(F1:1,1365,                   
                   F2:1,30),FILL=X'FF'         
  SORT FIELDS=COPY                             
  OUTFIL IFTHEN=(WHEN=(1366,1,BI,NE,X'FF'),     
              BUILD=(1,589,590:C'Y',591,775)), 
         IFTHEN=(WHEN=(1366,1,BI,EQ,X'FF'),     
            BUILD=(1,589,590:C'N',591,775))     
  END                                           

But the build is not working in my case.Please find the error in my spool.

Code:
  SYNCSORT FOR Z/OS  1.3.2.1R    U.S. PATENTS: 4210961, 5117495   (C) 2007 SYNCSO
                                                                                   
   SORT FIELDS=COPY                                                             
   JOINKEYS FILES=F1,FIELDS=(1,9,A,10,1,A,11,2,A)                               
   JOINKEYS FILES=F2,FIELDS=(1,9,A,10,1,A,11,2,A)                               
   JOIN UNPAIRED,F1                                                             
   REFORMAT FIELDS=(F1:1,1365,                                                 
                    F2:1,30),FILL=X'FF'                                         
   OUTREC IFTHEN=(WHEN=(1366,1,BI,NE,X'FF'),                                   
               BUILD=(1,589,590:C'Y',591,775)),                                 
          IFTHEN=(WHEN=(1366,1,BI,EQ,X'FF'),                                   
               BUILD=(1,589,590:C'N',591,775))                                 
   END                                                                         
WER276B  SYSDIAG= 38211, 604871, 604871, 1697925                       
WER164B  5,288K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,     
WER164B     0 BYTES RESERVE REQUESTED, 892K BYTES USED                 
WER146B  128K BYTES OF EMERGENCY SPACE ALLOCATED                       
WER481I  JOINKEYS REFORMAT RECORD LENGTH= 1395, TYPE = F               
WER237I  OUTREC RECORD LENGTH =  1395                                 
WER110I  SORTOUT  : RECFM=FB   ; LRECL=  1365; BLKSIZE= 27300         
WER247A  SORTOUT  HAS INCOMPATIBLE LRECL                               
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                         
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                         
WER482I  JNF1 STATISTICS                                               
WER483B  2,372K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,     
WER483B     0 BYTES RESERVE REQUESTED, 892K BYTES USED                 
WER108I  SORTJNF1 : RECFM=FB   ; LRECL=  1365; BLKSIZE= 13650         
WER482I  JNF2 STATISTICS                                               
WER483B  2,372K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,     
WER483B     0 BYTES RESERVE REQUESTED, 892K BYTES USED                 
WER108I  SORTJNF2 : RECFM=FB   ; LRECL=    30; BLKSIZE= 27990         


Satheesh
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Mon May 31, 2010 9:58 pm
Reply with quote

Hello,

Code:
WER237I  OUTREC RECORD LENGTH = 1395                                 
WER110I  SORTOUT  : RECFM=FB   ; LRECL=  1365; BLKSIZE= 27300
You are trying to write 1395 bytes into a 1365 record. . .
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Mon May 31, 2010 10:08 pm
Reply with quote

dick scherrer wrote:
You are trying to write 1395 bytes into a 1365 record. . .
Yea, but why is his 1365 BUILD generating 1395 bytes?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Mon May 31, 2010 10:25 pm
Reply with quote

1365 + 30?

I'm probably reading it wrong. . .

d
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Tue Jun 01, 2010 12:01 am
Reply with quote

Quote:

But the build is not working in my case.Please find the error in my spool.


I do not see and 'error' in the spool.

What was the condition code of the step?

Does 'not working' mean 'unexpected results'?

Without seeing the Input, Expected Output, and Acutal Output, help form here may be hard to come by.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Tue Jun 01, 2010 12:29 am
Reply with quote

Quote:
WER247A SORTOUT HAS INCOMPATIBLE LRECL

SyncSort for z/OS 1.3 Programmer’s Guide wrote:
A (action) message indicates a critical error condition: SyncSort terminates in order to allow the user to correct the error(s) so that a successful sort/merge may be run.
Back to top
View user's profile Send private message
maintenure

New User


Joined: 22 Sep 2008
Posts: 10
Location: bangalore

PostPosted: Tue Jun 01, 2010 2:20 pm
Reply with quote

Yes sir,

I agree the output LRECL is incompatible as all of you mentioned also my requirement is only first 1365 bytes.But my question is why BUILD or OVERLAY is not working to get only first 1365 bytes length.

Please find my codes below.

1)Using BUILD,it is not working to take only first 1365 of total 1395 length of reformat fields

Code:
SYNCSORT FOR Z/OS  1.3.2.1R    U.S. PATENTS: 4210961, 5117495   (C) 2007 SYNCSO
                                             
SYNCSORT LICENSED FOR CPU SERIAL NUMBER 4A74D, MODEL 2094 606             LICEN

                                                                               
  JOINKEYS FILES=F1,FIELDS=(1,9,A,10,1,A,11,2,A)                               
  JOINKEYS FILES=F2,FIELDS=(1,9,A,10,1,A,11,2,A)                               
  JOIN UNPAIRED,F1                                                             
  REFORMAT FIELDS=(F1:1,1365,                                                 
                   F2:1,30),FILL=X'FF'                                         
  SORT FIELDS=COPY                                                             
  OUTFIL IFTHEN=(WHEN=(1366,1,BI,NE,X'FF'),                                   
              BUILD=(1,589,590:C'Y',591,775)),                                 
         IFTHEN=(WHEN=(1366,1,BI,EQ,X'FF'),                                   
              BUILD=(1,589,590:C'N',591,775))                                 
  END                                                                         
WER276B  SYSDIAG= 40675, 659364, 659364, 1698075                     
WER164B  5,288K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,   
WER164B     0 BYTES RESERVE REQUESTED, 892K BYTES USED               
WER146B  128K BYTES OF EMERGENCY SPACE ALLOCATED                     
WER481I  JOINKEYS REFORMAT RECORD LENGTH= 1395, TYPE = F             
WER110I  SORTOUT  : RECFM=FB   ; LRECL=  1365; BLKSIZE= 27300       
WER247A  SORTOUT  HAS INCOMPATIBLE LRECL                             
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                       
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                       
WER482I  JNF1 STATISTICS                                             
WER483B  2,372K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,   
WER483B     0 BYTES RESERVE REQUESTED, 892K BYTES USED               
WER108I  SORTJNF1 : RECFM=FB   ; LRECL=  1365; BLKSIZE= 13650       
WER482I  JNF2 STATISTICS                                             
WER483B  2,372K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,   
WER483B     0 BYTES RESERVE REQUESTED, 892K BYTES USED               
WER108I  SORTJNF2 : RECFM=FB   ; LRECL=    30; BLKSIZE= 27990       





2) Using Overlay also it is not working,Please find spool details below:

Code:
SYNCSORT FOR Z/OS  1.3.2.1R    U.S. PATENTS: 4210961, 5117495   (C) 2007 SYNCSO
                                             
SYNCSORT LICENSED FOR CPU SERIAL NUMBER 4A74D, MODEL 2094 606             LICEN
                                                                               
  SORT FIELDS=COPY                                                             
  JOINKEYS FILES=F1,FIELDS=(1,9,A,10,1,A,11,2,A)                               
  JOINKEYS FILES=F2,FIELDS=(1,9,A,10,1,A,11,2,A)                               
  JOIN UNPAIRED,F1                                                             
  REFORMAT FIELDS=(F1:1,1365,                                                 
                   F2:1,30),FILL=X'FF'                                         
  OUTREC IFTHEN=(WHEN=(1366,1,BI,NE,X'FF'),                                   
           OVERLAY=(1,589,590:C'Y',591,775)),                                 
         IFTHEN=(WHEN=(1366,1,BI,EQ,X'FF'),                                   
           OVERLAY=(1,589,590:C'N',591,775))                                   
  END                                                                 



But i tried of my own with the following code and achieved it.Please find the spool details below:

Code:
SYNCSORT FOR Z/OS  1.3.2.1R    U.S. PATENTS: 4210961, 5117495   (C) 2007 SYNCSO
                                             SYNCSORT LICENSED FOR CPU SERIAL NUMBER 4A74D, MODEL 2094 606             LICEN
SYSIN :                                                                       
  JOINKEYS FILES=F1,FIELDS=(1,9,A,10,1,A,11,2,A)                               
  JOINKEYS FILES=F2,FIELDS=(1,9,A,10,1,A,11,2,A)                               
  JOIN UNPAIRED,F1                                                             
  REFORMAT FIELDS=(F1:1,1365,                                                 
                   F2:1,30),FILL=X'FF'                                         
  INREC IFTHEN=(WHEN=(1366,1,BI,NE,X'FF'),                                     
           OVERLAY=(590:C'Y')),                                               
         IFTHEN=(WHEN=(1366,1,BI,EQ,X'FF'),                                   
           OVERLAY=(590:C'N'))                                                 
  SORT FIELDS=COPY                                                             
  OUTREC FIELDS=(1,1365)                                                       
  END                                                                         
WER481I  JOINKEYS REFORMAT RECORD LENGTH= 1395, TYPE = F                       
WER257I  INREC RECORD LENGTH =  1395                                           
WER237I  OUTREC RECORD LENGTH =  1365                                                 
WER110I  SORTOUT  : RECFM=FB   ; LRECL=  1365; BLKSIZE=  1365                 
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                                 
WER054I  RCD IN          7, OUT          7                                     
WER072I  NOEQUALS, BALANCE IN EFFECT                                           
WER169I  RELEASE 1.3 BATCH 0485 TPF LEVEL 2.1                                 
WER482I  JNF1 STATISTICS                                                       
WER108I  SORTJNF1 : RECFM=FB   ; LRECL=  1365; BLKSIZE= 13650                 
WER484I  SORTJNF1 : RCD IN= 7,OMITTED= 0,PAIRED= 3,UNPAIRED= 4                 
WER487I  FILESIZE 9,555 BYTES                                                 
WER482I  JNF2 STATISTICS                                                       
WER108I  SORTJNF2 : RECFM=FB   ; LRECL=    30; BLKSIZE= 27990                 
WER484I  SORTJNF2 : RCD IN= 10,OMITTED= 0,PAIRED= 3,UNPAIRED= 7               
WER487I  FILESIZE 300 BYTES                                                   
WER052I  END SYNCSORT - LSLNSYNC,PSTP0010,,DIAG=C800,428A,E02A,006C,80D6,6CA3,2
WER052I  DIAG1=8400,5284,A83A,68F5,CDC7,68AB,2620,6766                         
WER052I  DIAG2=E400,7284,C83A,68D5,ADC7,48AB,0620,6766                         


Again why the BUILD or OVERLAY command is not working(to get first 1365 bytes) along with IFTHEN clause as in the first two spool outputs.I am using

SYNCSORT FOR Z/OS 1.3.2.1R U.S. PATENTS: 4210961, 5117495

Product.

Please throw some light on this.Also please provide syncsort manual.

Thanks in advance
Satheesh G
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Jun 01, 2010 8:25 pm
Reply with quote

Hello,

Quote:
please provide syncsort manual
Syncsort material is covered by copyright and is not openly posted. If your organization is licensed to use Syncsort, you can contact:

Alissa Margulies
SyncSort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com

Alissa is a regular contributor to the forum. . .
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Build a record in output file and rep... DFSORT/ICETOOL 11
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
No new posts Mainframe Programmer with CICS Skill... Mainframe Jobs 0
Search our Forums:

Back to Top