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
 

 

Concatinate the strings from two files using Filemgr

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IBM Tools
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    Post subject: Concatinate the strings from two files using Filemgr
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10291
Location: italy

PostPosted: Wed Jul 27, 2011 7:11 pm    Post subject: Reply to: Concatinate the strings from two files using Filem
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    IBMMAINFRAMES.com Support Forums -> IBM Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 3 Fri Aug 18, 2017 10:50 am
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 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


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