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

How to delete particular columns from a PS


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Vineet Joshi

New User


Joined: 11 Dec 2006
Posts: 7
Location: Bhubaneswar

PostPosted: Sat Aug 18, 2007 4:10 pm
Reply with quote

I want to know how to delete particular columns from a PS? Like, say there is a PS with LRECL of 120 and I want to delete columns from 1 to 20 or from columns 40 to 60.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Sat Aug 18, 2007 4:18 pm
Reply with quote

Sort allows you to reformat a record like you want. Take a look at the INREC and OUTREC commands in the DFSORT Application Programming Guide
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Sat Aug 18, 2007 8:53 pm
Reply with quote

Quote:
say there is a PS with LRECL of 120 and I want to delete columns from 1 to 20


Here's a DFSORT job to do that:

Code:

//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  input file (FB/120)
//SORTOUT DD DSN=...  output file (FB/100)
//SYSIN DD *
   OPTION COPY
   OUTREC BUILD=(21,100)
/*



Quote:
or from columns 40 to 60.


Here's a DFSORT job to do that:

Code:

//S2 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  input file (FB/120)
//SORTOUT DD DSN=...  output file (FB/99)
//SYSIN DD *
   OPTION COPY
   OUTREC BUILD=(1,39,61,60)
/*


If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

Use [URL] BBCode for External Links
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts DELETE SPUFI DB2 1
No new posts DSNTIAUL driven delete IBM Tools 0
No new posts Remote Unload of CLOB Columns DB2 6
No new posts Increase the number of columns in the... IBM Tools 3
No new posts How to delete a user's alias from the... JCL & VSAM 11
Search our Forums:

Back to Top