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

Regarding this new requirement?


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Mon Jun 30, 2008 5:50 pm
Reply with quote

Hi,

I have a input file like this

Code:

123 APT 21
MELLONE CIRCLE
LOS ANGELS
LA
12345


AND I WANT OUTPUT AS

Code:

123APT21MELLONECIRCLELOSANGELSLA 12345


THANKS
R KARTHIK
Back to top
View user's profile Send private message
ParagChouguley

Active User


Joined: 03 Feb 2007
Posts: 175
Location: PUNE(INDIA)

PostPosted: Mon Jun 30, 2008 5:56 pm
Reply with quote

Read all the records from input file into One dimentional array. Write the high level group variable to output file.

--Parag
Back to top
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Mon Jun 30, 2008 6:29 pm
Reply with quote

Hi, i am very sorry for wrongly mentioning the file layout

INPUT file:
Code:

123 APT 21                    ----   field 1
MELLONE CIRCLE   ----   field 2
LOS ANGELS    ----   field 3
LA   ----   field 4
12345   ----   field 5


01 wk-details.
05 field1
05 field2
05 field3
05 field4
05 field5



Output file:
Code:

123APT21MELLONECIRCLELOSANGELSLA 12345
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Jun 30, 2008 6:38 pm
Reply with quote

How will the output data be delimited should you ever want to rebuild the full address again from this data ???
Back to top
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Mon Jun 30, 2008 6:43 pm
Reply with quote

HI expat,

I want the o/p as mentioned that only. I will not used to rebuild that o/p.


Thanks
R KARTHIK
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: Mon Jun 30, 2008 9:39 pm
Reply with quote

Hello,

Set up arrays for the input and the output.

Move 1 byte at a time from the input to the output skipping all of the blanks except for 1 after the state code.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Urgent requirement for MF (Exp - 4 to... Mainframe Jobs 0
No new posts Need inputs on Space requirement and... IMS DB/DC 0
No new posts SORT requirement COBOL Programming 6
This topic is locked: you cannot edit posts or make replies. Mainframe Developer requirement in Ku... Mainframe Jobs 0
No new posts Cards mainframe developer requirement... Mainframe Jobs 0
Search our Forums:

Back to Top