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 - merging two files column wise

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Syncsort - merging two files column wise
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 Moderator


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

PostPosted: Fri Nov 12, 2010 11:42 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Tue Nov 16, 2010 3:07 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Tue Nov 16, 2010 3:42 pm    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Wed Nov 17, 2010 2:06 am    Post subject:
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    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 Loading data to table gives wrong for... Raghu navaikulam DB2 16 Thu Jul 13, 2017 2:11 pm
No new posts getting three output files out of JOI... migusd SYNCSORT 7 Mon Jun 05, 2017 11:30 pm
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Dynamic split of files under groups sril.krishy DFSORT/ICETOOL 4 Mon Apr 17, 2017 1:09 pm


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