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 COMP Variables Mismatch gayu7 COBOL Programming 5 Wed Dec 20, 2017 5:06 pm
No new posts Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
No new posts CONDITIONAL USING COMP-2 WITH PROBLEMS. JOSUEGENTIL COBOL Programming 7 Wed Nov 08, 2017 11:13 pm
No new posts how can i move s9(9) to s9(9) usage comp HARENDRA CHOUDHARY COBOL Programming 3 Mon Nov 06, 2017 12:10 am
This topic is locked: you cannot edit posts or make replies. Incrementing current time field by 30... arunsoods DFSORT/ICETOOL 11 Thu Oct 26, 2017 3:22 pm

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