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
 
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: 10456
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 Comparing two sequential files Mohan Kothakota COBOL Programming 14 Mon Apr 16, 2018 6:35 pm
No new posts SORT 3 files,extract specific fields ... Kiransr DFSORT/ICETOOL 13 Fri Mar 23, 2018 10:54 am
No new posts How to build one file from two input ... daniele DFSORT/ICETOOL 5 Tue Feb 27, 2018 6:45 pm
No new posts Compare two PS files using ICE TOOL f... SENTHIL MURUGAAN DFSORT/ICETOOL 5 Sun Dec 24, 2017 1:26 pm
No new posts Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am

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