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
 
Copy only first some column using jcl

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Copy only first some column using jcl
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: 215
Location: India

PostPosted: Thu Feb 28, 2008 3:20 pm    Post subject: Reply to: Copy only first some column using jcl
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: 8614
Location: Back in jolly old England

PostPosted: Thu Feb 28, 2008 3:25 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Thu Feb 28, 2008 10:03 pm    Post subject:
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:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html
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 Compare and COPY using DFSORT pshongal DFSORT/ICETOOL 3 Fri Nov 17, 2017 9:49 am
No new posts Copy selected columns from 2 input fi... Poha Eater DFSORT/ICETOOL 3 Thu Nov 02, 2017 3:43 pm
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm
No new posts XMITIP sends it out. Can it copy on l... Rommel Dayon Rustia IBM Tools 0 Tue Sep 05, 2017 10:16 am

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