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

Concatinate the strings from two files using Filemgr


IBM Mainframe Forums -> IBM Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Gaurav Saini

New User


Joined: 27 Jul 2011
Posts: 1
Location: India

PostPosted: Wed Jul 27, 2011 7:06 pm
Reply with quote

I want to concatenate the strings from two files, it can be done using cobol, bt I want to do this using Filemgr.

Contents of File 1 >
HEADER 20110725 000000100
HEADER 20110825 000000200
HEADER 20110925 000000300

Contents of File 2 >
0000010
0000020
0000030

Required output >
HEADER 20110725 000000100 0000010
HEADER 20110825 000000200 0000020
HEADER 20110925 000000300 0000030


I tried following code >
//STEP01 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=A.B.IN1,DISP=SHR
//SYSUT2 DD DSN=A.B.OUT,DISP=SHR
//SYSIN DD *
GENERATE MAXFLDS=1
RECORD FIELD=(25,1,,1)
/*
//STEP02 EXEC PGM=FILEMGR
//SYSUDUMP DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//DDIN DD DSN=A.B.IN2,DISP=SHR
//DDOUT DD DSN=A.B.OUT,DISP=SHR
//SYSIN DD *
$$FILEM DSC INPUT=DDIN,
$$FILEM PROC=*
FLD_OUT(1,7,27)
PRINT(OUTREC,CHAR)
/+
/*

Using this JCL my output is coming like this >
HEADER 20110725 000000100 HEADER
HEADER 20110825 000000200 HEADER
HEADER 20110925 000000300 HEADER

anyone with raxx function knowledge, please help me with it
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Jul 27, 2011 7:11 pm
Reply with quote

much easier to do it with <SORT> lots of examples on the forums,
chances of getting help on something that can be done better/faster with a different tool are pretty slim!
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 -> IBM Tools

 


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 Merge two VSAM KSDS files into third ... JCL & VSAM 6
No new posts Joinkeys - 5 output files DFSORT/ICETOOL 7
No new posts How to append a PS file into multiple... JCL & VSAM 3
Search our Forums:

Back to Top