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

UNSTRING on input record to get the data independently


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

New User


Joined: 02 Feb 2006
Posts: 7

PostPosted: Fri Feb 03, 2006 12:48 pm
Reply with quote

hi

i want to read a seq. file which has length of 1200 and some 100 different lengths of text is there.we want to get the data in the file which is delimited by "," into some variable and write to another file with fixed length.

I want that using UNSTRING on input record to get the data independently with using 100 no of variables in UNSTRING statement and move to out put record to write in.
Back to top
View user's profile Send private message
elonics

New User


Joined: 05 Jul 2005
Posts: 49
Location: India

PostPosted: Fri Feb 03, 2006 1:42 pm
Reply with quote

Hai Boss,
I didnt get you.Can you be more transparent.

Thanks,
Elonics.
Back to top
View user's profile Send private message
sbalajibe

New User


Joined: 15 Aug 2005
Posts: 62

PostPosted: Fri Feb 03, 2006 4:45 pm
Reply with quote

hi

give us the fields of the input file and output file

thanks
Balaji
Back to top
View user's profile Send private message
nuthan

Active User


Joined: 26 Sep 2005
Posts: 146
Location: Bangalore

PostPosted: Fri Feb 03, 2006 5:51 pm
Reply with quote

Hai Jangam,
Please explain that with some more details.
Back to top
View user's profile Send private message
jangam

New User


Joined: 02 Feb 2006
Posts: 7

PostPosted: Mon Feb 06, 2006 1:07 pm
Reply with quote

hi

let take a Source record is length 1200 and all char..

see input is asdf,lkjhlh,asdfassdf,asdfasdf,lkjhlkjh,fqwerqwer,.................

like this around 100 values

And i got Destin variable size 100 char then with is one variable can i get all values using UNSTRING ......

Thanks for respond

jangam
Back to top
View user's profile Send private message
sure116

New User


Joined: 03 Feb 2006
Posts: 11

PostPosted: Mon Feb 06, 2006 2:34 pm
Reply with quote

Hi jangam,

declare the Dstn variable with 12 subgroup items.
01 WS-DSTN.

05 WS-DSTN1 pic x(100).
05 WS-DSTN2 pic x(100).
05 WS-DSTN3 pic x(100).
||||||||||||||
||||||||||||||||||
05 WS-DSTN12 pic x(100).

Then unstring the Rec-A delimited by ',' into WS-Dstn variable

Then you will have reqd value..


Cheers
Suresh
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Mon Feb 06, 2006 3:00 pm
Reply with quote

I didnt get what is expected yet.... icon_evil.gif .... Dont mind dear... seems need a reboot of my machine...

Well, What I can understood is... Input file is a VB file...of LRCEL = 1200...
There are records with different record length (obviously it would be..it is VB file icon_lol.gif ) ...& there are 100 such types of different record length...

Now this is what I need to know...
Quote:
we want to get the data in the file which is delimited by "," into some variable and write to another file with fixed length.


Its better If can see I/P & Expected O/P.

Regards,

Priyesh.
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 Store the data for fixed length COBOL Programming 1
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 FINDREP - Only first record from give... DFSORT/ICETOOL 3
Search our Forums:

Back to Top