View previous topic :: View next topic |
Author |
Message |
ravikrishna Beginner
Joined: 23 Sep 2005 Posts: 3 Topics: 2
|
Posted: Fri Sep 23, 2005 12:21 am Post subject: retreiving records through jcl |
|
|
hi every one i have record length of 40 bytes first 10 bytes is my surname and last 30 bytes my name i want 2 retrieve only first 10 bytes ...in jcl how do i do it in jcl ?
 |
|
Back to top |
|
 |
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Fri Sep 23, 2005 12:44 am Post subject: |
|
|
Search for OUTREC FIELDS here. _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes. |
|
Back to top |
|
 |
Phantom Data Mgmt Moderator

Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Fri Sep 23, 2005 1:36 am Post subject: |
|
|
ravikrishna,
Quote: |
how do i do it in jcl ?
|
JCL is not a programming language. It just acts as a host for other programming languages.
Your requirement can be accomplished in several ways.
1. COBOL & other programming languages.
2. Utilities like SORT, EAZYTRIEVE, QUIKJOB.....
As mentioned by Cogito, look for OUTREC statement in any of the sort manuals (DFSORT / Syncsort - whatever you have) or search for the same in the Utilities forum.
Thanks,
Phantom |
|
Back to top |
|
 |
Frank Yaeger Sort Forum Moderator

Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
|
Posted: Fri Sep 23, 2005 11:13 am Post subject: |
|
|
ravikrishna,
The following DFSORT job will do what you asked for:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file (FB/40)
//SORTOUT DD DSN=... output file (FB/10)
//SYSIN DD *
OPTION COPY
OUTREC FIELDS=(1,10)
/*
|
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 _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort |
|
Back to top |
|
 |
|
|