Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
splitting the comp-3 field

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: splitting the comp-3 field
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7314

PostPosted: Fri Apr 20, 2012 8:53 pm    Post subject: Reply to: splitting the comp-3 field
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

Site Director


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

PostPosted: Fri Apr 20, 2012 9:32 pm    Post subject: Reply to: splitting the comp-3 field
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Splitting one row into multiple Rows ... Rajan Moorthy DFSORT/ICETOOL 9 Mon May 14, 2018 10:58 pm
No new posts How to include a particular field val... sakrat DFSORT/ICETOOL 8 Fri Apr 06, 2018 8:27 pm
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Searching a table for the field name? socker_dad COBOL Programming 8 Sat Mar 31, 2018 2:57 am
No new posts COMP Variables Mismatch gayu7 COBOL Programming 5 Wed Dec 20, 2017 5:06 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us