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

Copy only first some column using jcl


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

New User


Joined: 20 Dec 2007
Posts: 29
Location: India

PostPosted: Thu Feb 28, 2008 3:08 pm
Reply with quote

Hi All,
I had file which contains 20k record with structure as follows
first 9 col number + Name + .....
Now i need only first 9 col for each record.

When i tried to open using either in view or edit mode then Brows was substituted so i am unable to run BNDS (<<)coomand .

So could please provides jcl for same . icon_smile.gif
Back to top
View user's profile Send private message
sri_mf

Active User


Joined: 31 Aug 2006
Posts: 218
Location: India

PostPosted: Thu Feb 28, 2008 3:20 pm
Reply with quote

Use INREC of Sort ...
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Feb 28, 2008 3:25 pm
Reply with quote

Quote:
So could please provides jcl for same .

500 Euro should cover my development & testing costs.

But you have one good suggestion above, and I will suggest DFSORT (Or Syncsort) OUTREC
Back to top
View user's profile Send private message
souravmitra

New User


Joined: 19 Feb 2008
Posts: 3
Location: Kolkata

PostPosted: Thu Feb 28, 2008 3:54 pm
Reply with quote

Use SORT CARD as -

SORT FIELD=COPY
OUTREC FIELDS=(1:1,9,nX)

where n=(LRECL of Output file - 9)
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: Thu Feb 28, 2008 10:03 pm
Reply with quote

Ashsih,

Here's a DFSORT job that will do what you asked for:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (FB/?)
//SORTOUT DD DSN=...  output file (FB/9)
//SYSIN    DD    *
  OPTION COPY
  INREC BUILD=(1,9)
/*


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

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts How to load to DB2 with column level ... DB2 6
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts RC query -Time column CA Products 3
No new posts Need COBOL COPY Help in MVS Environment COBOL Programming 4
Search our Forums:

Back to Top