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

splitting the comp-3 field


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
somapradeep1

New User


Joined: 07 Sep 2010
Posts: 22
Location: hyderabad

PostPosted: Fri Apr 20, 2012 8:29 pm
Reply with quote

hi,

in one of my vsam file one field is zip pic s9(9)comp-3.it contains data as
64570000
764530000
787012698
322380000
320030000
150280000
752010000 my req is i want to copy all fields in o/p file but the zip column should be split in to two columns by spliting which are in bold as a superate column..pls help me
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Apr 20, 2012 8:53 pm
Reply with quote

This is basically the third time you've asked this recently, twice today.

Here's the other one.

What problem are you having in doing this? Are you no longer using DFSORT?

Code:
  OPTION COPY                                           
  INREC OVERLAY=(tosomewhere:somewherenow,5,PD,TO=ZD,LENGTH=9,
                                  dest1:tosomewhere,5,ZD,TO=PD,LENGTH=3,
                                  dest2:tosomewhere+5,4,ZD,TO=PD,LENGTH=3)


Where

tosomewhere
somewherenow
dest1
dest2
tosomewhere+5

are things that we don't know.

OK, I make them up:

Code:
//PACKED   EXEC PGM=SORT
//SORTIN DD *
123456789
//SYSOUT   DD SYSOUT=*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
  OPTION COPY
  INREC OVERLAY=(10:1,9,ZD,TO=PD,LENGTH=5,20:10,5,PD,TO=ZD,LENGTH=9,
                 30:20,5,ZD,TO=PD,LENGTH=3,
                 40:25,4,ZD,TO=PD,LENGTH=3)



Gives this:

Code:
123456789          123456789   *         
FFFFFFFFF1357944444FFFFFFFFF41354444444079
1234567892468C00000123456789024C000000068C


Now, let me get the kettle on and dust the chair for you...
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: Fri Apr 20, 2012 9:32 pm
Reply with quote

Hello,

If you continue posting the same question multiple times, they will be deleted. . . icon_sad.gif

Beyond that, your userid might be Warned or Banned. . .

d
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts Join 2 files according to one key field. JCL & VSAM 3
No new posts How to move the first field of each r... DFSORT/ICETOOL 5
No new posts S0C7 - Field getting overlayed COBOL Programming 2
Search our Forums:

Back to Top