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
 

 

Spliting one record in to two records of output file

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> HomeWorks & Requests
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    Post subject: Spliting one record in to two records of output file
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

Site Director


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

PostPosted: Tue Jul 10, 2012 12:05 am    Post subject:
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.
www.ibmmainframeforum.com/index.php

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.    IBMMAINFRAMES.com Support Forums -> HomeWorks & Requests All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm


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