Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
SYNCSORT Append to the file

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

New User


Joined: 13 Oct 2008
Posts: 4
Location: Chennai

PostPosted: Mon Oct 13, 2008 3:13 pm    Post subject: SYNCSORT Append to the file
Reply with quote

Hi All,

I have two input file

F1 - VB of Record length = 250

F2 - VB of record length = 1(which will be a character)

I need to append the data in file2 to file1.Can anyone help me out regarding this.

Thanks,
Meena
Back to top
View user's profile Send private message

gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Mon Oct 13, 2008 3:31 pm    Post subject:
Reply with quote

Hi,

try this
Code:
//COPYSTEP EXEC PGM=SORT                   
//SORTIN   DD DSN=FILE2,DISP=SHR               
//SORTOUT  DD DSN=FILE1,DISP=MOD               
//SYSOUT   DD SYSOUT=*                         
//SYSIN    DD *                                 
  SORT FIELDS=COPY                             



Gerry
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 Oct 13, 2008 3:33 pm    Post subject:
Reply with quote

Or do you mean that you want the data of file 1 to be followed by the data of file 2 in one record.

Please ask your questions in a clear manner.
Back to top
View user's profile Send private message
meena90

New User


Joined: 13 Oct 2008
Posts: 4
Location: Chennai

PostPosted: Mon Oct 13, 2008 3:44 pm    Post subject:
Reply with quote

Hi Expat,

Ya,I need the data of file1 to be followed by the data of file2.

Thanks,
Meena
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Mon Oct 13, 2008 8:01 pm    Post subject:
Reply with quote

OK, still not quite clear. Which scenario below is what you want:

#1
Code:

File1-Record1
File1-Record2
.
.
.
File2-Record1
File2-Record2
.
.
.


#2
Code:

File1-Record1 File2-Record1
File1-Record2 File2-Record2
.
.
.
Back to top
View user's profile Send private message
meena90

New User


Joined: 13 Oct 2008
Posts: 4
Location: Chennai

PostPosted: Mon Oct 13, 2008 8:53 pm    Post subject: Reply to: SYNCSORT Append to the file
Reply with quote

I need for the second one.

Thanks,
Meena
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Mon Oct 13, 2008 9:15 pm    Post subject:
Reply with quote

Are there the same number of records in File 1 and File 2?

Are they both already in sorted order?
Back to top
View user's profile Send private message
meena90

New User


Joined: 13 Oct 2008
Posts: 4
Location: Chennai

PostPosted: Tue Oct 14, 2008 8:45 am    Post subject: Reply to: SYNCSORT Append to the file
Reply with quote

There are equal no of records in it(say File1 and file2 both have 5 records). And they are not sorted.

Input in File1:

ID# Department Class
----- -------------- -------
10 4 2
12 2 1


Input in File2:

Flag
-----

Y
Y

Expected output:


ID# Department Class Flag
----- -------------- ------- -----
10 4 2 Y
12 2 1 Y
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2285
Location: @my desk

PostPosted: Tue Oct 14, 2008 9:45 am    Post subject:
Reply with quote

Quote:
F2 - VB of record length = 1(which will be a character)

Just curious how could somebody alloacte a VB file of LRECL=1. VB files have a 4 byte RDW and AFAIK, you'll not be able to have LRECL less than or equal to 4. I believe it's better to have an FB file of same length rather than having a 5 byte file.

Also since file-1 is a VB file, how will you handle this scenario? Where do you want to append the file-2 character in the below case?
Code:
file-1,record-1
file-1,record---------2
file-1,record---------------3
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 Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us