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

Syncsort - merging two files column wise


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

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Fri Nov 12, 2010 9:30 pm
Reply with quote

I have 2 files recl = 600 each FB. 900 records each. In my first file I have data up to the 334th column. From file2 I need to copy another 600 length data to file1 from 335th column onwards. Truncation of data is fine.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Nov 12, 2010 11:42 pm
Reply with quote

It's not clear what you want to do. Are you "joining" record by record, or by a key, or what?

Please show an example of the records in each input file (relevant fields only) and what you expect for output. Explain the "rules" for getting from input to output. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input files and output file. If file1 can have duplicates within it, show that in your example. If file2 can have duplicates within it, show that in your example.

Also, run this job and show the //SYSOUT messages you receive, so I can see what level you're at:

Code:

//S1    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
RECORD
//SORTOUT DD DUMMY
//SYSIN    DD    *
    OPTION COPY
/*
Back to top
View user's profile Send private message
t5590ag

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Tue Nov 16, 2010 2:56 pm
Reply with quote

Yes I need to join the records. In fact I have 3 files.
FILE1- AAAAABBBBCCCC
FILE2- DDDEEEEFFFF
FILE3- GGGHHHHIIII
O/P File - AAAABBBBCCCCDDDEEEFFFGGGHHHIIII

This has to be done for 919 records in each file. No duplicates.No key fields needed.
LRECL = 600, RECFM=FB
Records in FILE1- Till pos 234 it has got data.
Data from FILE2 has to be joined from POS 235 onwards in FILE1.FILE2 has data from POS 1 to 236.FILE3 has data from POS1 to 130. FILE3 data will be joined after FILE2 data immediately.
All 3 files have 919 records.
Everything can be taken as CHAR. Final O/P file length would be 600 as well which is a sum of 234+236+130.

Pls let me know if more info is needed.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Nov 16, 2010 3:07 pm
Reply with quote

t5590ag wrote:
Pls let me know if more info is needed.

Frank Yaeger wrote:
Also, run this job and show the //SYSOUT messages you receive, so I can see what level you're at:
Code:

//S1    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
RECORD
//SORTOUT DD DUMMY
//SYSIN    DD    *
    OPTION COPY
/*
Back to top
View user's profile Send private message
t5590ag

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Tue Nov 16, 2010 3:23 pm
Reply with quote

Code:
SYNCSORT FOR Z/OS  1.3.2.2R    U.S. PATENTS: 4210961, 5117495   (C) 2007 SYNCSO
                                         Chrysler Group LLC   z/OS   1.11.0   
SYNCSORT LICENSED FOR CPU SERIAL NUMBER 1F464, MODEL 2097 603             LICEN
SYSIN :                                                                       
    OPTION COPY                                                         0002801
WER108I  SORTIN   : RECFM=FB   ; LRECL=    80; BLKSIZE=    80                 
WER110I  SORTOUT  : RECFM=FB   ; LRECL=    80; BLKSIZE=    80                 
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                                 
WER054I  RCD IN          1, OUT          1                                     
WER169I  RELEASE 1.3 BATCH 0491 TPF LEVEL 2.2                                 
WER052I  END SYNCSORT - T5590AG1,S1,,DIAG=8000,4284,A880,00E4,C87E,6CAB,AA88,66


It has always produced syncsort messages. but gives RC=0.Should not be a prob.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Nov 16, 2010 3:42 pm
Reply with quote

You are using SYNCSORT
You have been told in the past that the product is SYNCSORT and NOT DFSORT

Learn to post in the correct forum rather than waste the valuable time of others.
Back to top
View user's profile Send private message
t5590ag

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Tue Nov 16, 2010 3:59 pm
Reply with quote

expat,

I put it in TSO/ISPF initially thinking that there might be some tso command to do this.
Frank moved it to SORT then but I have not that much knowledge of SORT based on which I can do this using SORT.

Had I been confident of using SORT or SYNCSORT myself I would have put it in correct forum myself. But am sorry I had no idea which tool I am going to use.
Back to top
View user's profile Send private message
t5590ag

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Tue Nov 16, 2010 9:40 pm
Reply with quote

Hi friends, i joined my files using DATATRAN utility. so it is done for now.

Thanks for help and time whoever tried to resolve my problem.
Back to top
View user's profile Send private message
t5590ag

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Tue Nov 16, 2010 9:42 pm
Reply with quote

Overlay is a tso command which also I tried.
That also can be used for joining the records by putting them in the same file.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Nov 17, 2010 2:06 am
Reply with quote

Quote:
I put it in TSO/ISPF initially thinking that there might be some tso command to do this.
Frank moved it to SORT then but I have not that much knowledge of SORT based on which I can do this using SORT.

Had I been confident of using SORT or SYNCSORT myself I would have put it in correct forum myself. But am sorry I had no idea which tool I am going to use.


Why do you think it was me who moved it? I don't remember doing that. I don't even look at the TSO/ISPF Forum, so I doubt I moved anything from that 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 Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts How to load to DB2 with column level ... DB2 6
No new posts RC query -Time column CA Products 3
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
Search our Forums:

Back to Top