View previous topic :: View next topic
|
Author |
Message |
rinkubhat
New User
Joined: 13 Sep 2005 Posts: 35 Location: India
|
|
|
|
Hi
I needed syntax for a sort JCL in wich i want to move spaces to a particular field for another field
e.g
i have a file in which i have different fields like INPUT-ID,
COMPANY CODE,YEAR,ETC ETC
SO FOR INPUT ID-SOME VALUE I WANT SPACES TO BE MOVED TO COMPANY CODE |
|
Back to top |
|
|
Alain Benveniste
New User
Joined: 14 Feb 2005 Posts: 88
|
|
|
|
Could you show us a concret example, please ?
Alain |
|
Back to top |
|
|
rinkubhat
New User
Joined: 13 Sep 2005 Posts: 35 Location: India
|
|
|
|
Hi Alian
Consider a file with ten records WITH RECORD LENGTH 15
The field names of the file are COMPANY CODE;INPUT-ID,ACCOUNTING-DATE;LOCATION ETC.
NOW FOR INPUT-ID-82MP IN THIS PARTICULAR FILE I WANT SPACES TO BE MOVED TO COMPANY CODE.
I GUESS THIS IS CLEAR |
|
Back to top |
|
|
rajandhla
Active User
Joined: 18 Oct 2005 Posts: 182 Location: Luton UK
|
|
|
|
Rinku,
Its possible with OUTREC FIELDS option try that if you haven't tried.
Please let me know if you required more.
Regards
Jai |
|
Back to top |
|
|
rinkubhat
New User
Joined: 13 Sep 2005 Posts: 35 Location: India
|
|
|
|
Hi Jai
Could u explain in detail the syntax |
|
Back to top |
|
|
rajandhla
Active User
Joined: 18 Oct 2005 Posts: 182 Location: Luton UK
|
|
|
|
Rinku,
outrec is used to reformat the record.
Suppose your record length is 80 bytes. and you want in new record format in the some field position with spaces.
if i want from postion 10 to 15 as spaces.
then outrec looks as
outrec fields=(1,9,10:6,c' '16,65)
hope this helps
regards
jai |
|
Back to top |
|
|
rinkubhat
New User
Joined: 13 Sep 2005 Posts: 35 Location: India
|
|
|
|
Jai
Thanks your OUTREC funda helped |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
outrec fields=(1,9,10:6,c' '16,65) |
This is not the correct syntax for the OUTREC statement. Two of the many forms of the correct syntax would be:
Code: |
OUTREC FIELDS=(1,9,10:6C' ',16,65)
or
OUTREC FIELDS=(1,9,6X,16,65)
|
6C' ' and 6X both mean 6 blanks.
But an easier way to do this is with DFSORT's OVERLAY feature like this:
Code: |
OUTREC OVERLAY=(10:6X)
|
With overlay, you only have to specify the data you want to change.
You'll need z/OS DFSORT V1R5 PTF UQ95214 or DFSORT R14 PTF UQ95213 (Dec, 2004) in order to use DFSORT's OVERLAY function. Only DFSORT has this function, so if you don't have DFSORT, you won't be able to use it. If you do have DFSORT, but you don't have the Dec, 2004 PTF, ask your System Programmer to install it (it's free). For complete details on all of the new DFSORT and ICETOOL functions available with the Dec, 2004 PTF, see:
Use [URL] BBCode for External Links
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 |
|
|
|