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
 

 

Concatenate the files by removing the Header

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Tue Jan 19, 2010 6:49 pm    Post subject: Concatenate the files by removing the Header
Reply with quote

Dear Expert,

I require the sort card for the following requirement:

I have 5 input files of below format and record lingth of 199 char
Code:

                        FILE # 1-             Welcome            Report - 
             Name .                        FAT                 ID       Others --------------------------------------------------------------------------------
                                                                               
ABCDEFGH                      INDIA            ABVFHH ....
ABCDEFGH                      INDIA            ABVFHH ....



NOTE:
The Actual contents of the file were reoved and gave the sample file

I want to concatenate the five files of above format in 2 cases.
1) Concatenate the files by removing headers (First 4 lines) of all 5 files.
2) Concatenate the files by removing headers (First 4 lines) of only 2nd, 3rd, 4th and 5th files only. But the first file header remains same.
Back to top
View user's profile Send private message

mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Tue Jan 19, 2010 8:33 pm    Post subject: Hi
Reply with quote

File Format of the input file is FBA.
Output fle also should be FBA format
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Jan 19, 2010 11:11 pm    Post subject:
Reply with quote

Here's a DFSORT/ICETOOL job that will do what you asked for. Note that NOHDER and ONEHDR must specify MOD data sets.

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG   DD  SYSOUT=*
//DFSMSG    DD  SYSOUT=*
//IN1 DD DSN=...  input file1 (FB/199)
//IN2 DD DSN=...  input file2 (FB/199)
//IN3 DD DSN=...  input file3 (FB/199)
//IN4 DD DSN=...  input file4 (FB/199)
//IN5 DD DSN=...  input file5 (FB/199)
//NOHDR DD DISP=MOD,DSN=...  output file1 (FB/199)
//ONEHDR DD DISP=MOD,DSN=...  output file2 (FB/199)
//TOOLIN   DD    *
COPY FROM(IN1) USING(CTL1)
COPY FROM(IN2) USING(CTL2)
COPY FROM(IN3) USING(CTL2)
COPY FROM(IN4) USING(CTL2)
COPY FROM(IN5) USING(CTL2)
/*
//CTL1CNTL DD *
  OUTFIL FNAMES=NOHDR,STARTREC=5
  OUTFIL FNAMES=ONEHDR
/*
//CTL2CNTL DD *
  OPTION SKIPREC=4
  OUTFIL FNAMES=(NOHDR,ONEHDR)
/*
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 15 Thu Dec 01, 2016 8:28 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm


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