View previous topic :: View next topic
|
Author |
Message |
srramesh Currently Banned New User
Joined: 11 Jul 2008 Posts: 10 Location: Chennai
|
|
|
|
i have 10 record inthe input file,each recordslength is 15.i want only first tencharacters of each records...
give me an idea... |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
Any programming language I know of can read a record and ignore any part of it you want. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi,
Code: |
OPTION COPY
OUTREC FIELDS=(1,10) |
You might use INREC as well. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
sramesh,
Quote: |
i have 10 record inthe input file,each recordslength is 15.i want only first tencharacters of each records... |
what kind of file is your input file? FB or VB? |
|
Back to top |
|
|
srramesh Currently Banned New User
Joined: 11 Jul 2008 Posts: 10 Location: Chennai
|
|
|
|
@anuj d
thanks...its working |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
You are welcome..
BTW, these are basic usage of some SORT products, start reading Manuals a little..they will help you better than me..
- Ad |
|
Back to top |
|
|
srramesh Currently Banned New User
Joined: 11 Jul 2008 Posts: 10 Location: Chennai
|
|
|
|
i have 10 record inthe input file.i want only first 5 records after sorting.....
give me an idea... |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
rramesh,
Quote: |
i have 10 record inthe input file.i want only first 5 records after sorting..... |
This may not be the best idea.
Code a sort step to sort the entire file and then code another
sort step with the foll sort card
Code: |
SORT FIELDS=COPY,
STOPAFT=05
|
|
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
try this
Code: |
//SORT EXEC PGM=SORT
//SORTIN DD *
08
07
06
04
05
03
02
01
/*
//OUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(01,2,CH,A)
OUTFIL FNAMES=OUT,ENDREC=0005
/*
|
Gerry |
|
Back to top |
|
|
|