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

Spliting one record in to two records of output file


IBM Mainframe Forums -> HomeWorks & Requests
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
gotobaskar

New User


Joined: 08 Jul 2012
Posts: 1
Location: India

PostPosted: Mon Jul 09, 2012 11:15 pm
Reply with quote

I have a record in the input file in the below format
BASIC SALARY = BS
VARIABLE ALLOWNANCE = VA

ID - 3 BYTE, NAME - 10, DESIGNATION - 15, BS - 6, VA - 6

ID NAME DESIGNA BS VA

ABA;KUMAR;DEVELOPER;10000;15000
ABC;MURAL;SUPERVISOR;9000;14000
AB0;DILIP;ENGINEER;6000;12000
AB1;ANAND;ASSISTANT;7000;13000
111;SUDHA;CONSULTANT;12000;20000

OUTPUT FILE SHOULD BE

AB0;DILIP;ENGINEER;CONSULTANT
ABA;KUMAR;DEVELOPER;CONSULTANT;10000
ABA;KUMAR;DEVELOPER;CONSULTANT;15000
ABC;MURAL;SUPERVISOR;CONSULTANT;9000
ABC;MURAL;SUPERVISOR;CONSULTANT;14000
AB1;ANAND;ASSISTANT;CONSULTANT;7000
AB1;ANAND;ASSISTANT;CONSULTANT;13000

Brief description of the output file below,

AB0;DILIP;ENGINEER;CONSULTANT
In the above record, forth field value picked from the last record( key field has 111)
ABA;KUMAR;DEVELOPER;CONSULTANT;10000
ABA;KUMAR;DEVELOPER;CONSULTANT;15000

The above two records splited from the first record from the input file.
First record of the output file has CONSULTANT from the last record key field has 111 and Basic salary fom input file
Secomd record of the output file has CONSULTANT from the last record key field has 111 and Variable allowance fom input file
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Jul 10, 2012 12:05 am
Reply with quote

Hello and welcome to the forum,

Unfortunately you have found the "wrong forum". We have a separate forum for beginners (freshers) and students.

You need to register for that forum and post your question there.
Use [URL] BBCode for External Links

Also when posting to that forum, explain what tool/language your are supposed to use to accomplish what you want. You also need to much more clearly explain the "rules" for getting from the input to the output you want.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> HomeWorks & Requests

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
Search our Forums:

Back to Top