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
 

 

Syncsort: Matching two variable block files

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

New User


Joined: 14 Mar 2009
Posts: 6
Location: Hyderabad

PostPosted: Mon Dec 14, 2009 10:07 am    Post subject: Syncsort: Matching two variable block files
Reply with quote

Hello,

I want to match 2 variable block files based on 2 fields.
File 1 of length (572+4) and File 2 of length(200+4). My output file is also a VB file of length (200+4), which is declared in my JCL as :

Code:


//SORTOUT   DD DSN=TEBTOTS.MERGE.RS648.MASTER,               
//             DISP=(NEW,CATLG,DELETE),                             
//             UNIT=SYSDA,                                 
//             DCB=(SYS1.MODLBL,RECFM=VB,LRECL=204,BLKSIZE=0,
//             BUFNO=25),                                   
//             SPACE=(27998,(400,40),RLSE)                 



When I give a Join statement in my Control card as

Code:


JOINKEYS FILES=F1,FIELDS=(5,5,A,12,7,A)
JOINKEYS FILES=F2,FIELDS=(5,5,A,12,7,A)
REFORMAT FIELDS=(F1:1,204)   
SORT FIELDS=COPY             



I get an error as 'SORTOUT RECFM INCOMPATIBLE ' since in the control card it is taking TYPE = F

Is there any way to indicate a VB file in control card?
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Dec 14, 2009 3:26 pm    Post subject:
Reply with quote

Have you tried using REFORMAT FIELDS=(F1:5,200)

Also, Because the solution for sort related questions may vary from product to product, please ensure that you state clearly which sort product you are using.

If you are not sure, then by running a simple sort step shown below, you will be able to find out for yourself.

If the messages start with ICE then your product is DFSORT. Please also post the output of the complete line which has a message code ICE201I, as this will enable our DFSORT experts to determine which release of DFSORT that you have installed. This may also affect the solution offered.

If the messages start with WER or SYT then the product is SYNCSORT and should be posted in the JCL forum. Please also post the information telling which version of SYNCSORT is installed, as this may also affect the solution offered.

Thank you for taking your time to ensure that the valuable time of others is not wasted by offering inappropriate solutions which are not relevant due to the sort product being used and/or the release that is installed in you site.

Code:
//SORTSTEP EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD *
ABC
//SORTOUT  DD SYSOUT=*
//SYSIN    DD *
  SORT     FIELDS=COPY
Back to top
View user's profile Send private message
rexzone1

New User


Joined: 16 Dec 2006
Posts: 14
Location: Halifax, Canada

PostPosted: Tue Dec 15, 2009 8:39 pm    Post subject:
Reply with quote

Hi Rupali,

Please use the statement as expat mentioned as your record length is only 200 and you don't need to add the RDW of 4 bytes when giving REFORMAT.

Hope this helps.
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Wed Dec 23, 2009 1:26 am    Post subject:
Reply with quote

If you code REFORMAT=(F1:5,200) you will get a 200-byte fixed length output file. If you want a 204-byte VB output file, you will need to add an OUTFIL statement as follows:
Code:
 //SYSIN    DD *
    SORT FIELDS=COPY
    OUTFIL FTOV


You can additionally trim off any blank characters at the end of each record as follows:
Code:
OUTFIL FTOV,VLTRIM=C' '
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 Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm
No new posts Matching and unmatching records scdinesh DFSORT/ICETOOL 11 Tue Feb 07, 2017 12:41 am
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm


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