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: 10327
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 FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Comparing 2 Files using Current time arunsoods SYNCSORT 9 Fri Sep 22, 2017 6:00 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 22 Sun Aug 27, 2017 10:35 pm
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 11 Fri Aug 18, 2017 10:50 am

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