View previous topic :: View next topic
|
Author |
Message |
sun_job
New User
Joined: 18 Sep 2007 Posts: 73 Location: Bangalore
|
|
|
|
My input file contains
ABC 003,003
FEG 003,003
BNG 003,003
TNG 003,003
output
ABC 003
FEG 003
BNG 003
TNG 003
Need to eliminate the last 4 bytes? i want to use sort, any help is appreciated |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
OVERLAY those 4 bytes with spaces, |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
Just a few minor questions:
What is the file format and record length of the input file?
What is the file format and record length of the output file?
What sort product and version? |
|
Back to top |
|
|
sun_job
New User
Joined: 18 Sep 2007 Posts: 73 Location: Bangalore
|
|
|
|
Craq Giegerich wrote: |
Just a few minor questions:
What is the file format and record length of the input file?
What is the file format and record length of the output file?
What sort product and version? |
1. I/P file
File format FB RecL= 50
2. O/P file
File format FB Recl = 54
3. Not sure of version |
|
Back to top |
|
|
sun_job
New User
Joined: 18 Sep 2007 Posts: 73 Location: Bangalore
|
|
|
|
Just curious to know, will the NODUPS logic work here |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Does Syncsort support Parse?
Or evrn Outrec should do the trick |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Quote: |
Just curious to know, will the NODUPS logic work here |
sun_job,
Your example shows no duplicate removal. Why to go around the NODUPS when dick has already directed you in the right path.
And for the sort version, it will be there on the top of SYSOUT of any sort step execution.
Pandora,
Syncsort supports PARSE from 1.3 itself. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
this thread is going nowhere fast.
We don't know what sort product, then we throw in NODUPS, we need to eliminate the last 4 bytes and we end up with an output 4 bytes longer than the input.
Now I have another question, are the last 4 bytes always in position 8-11 ?
Are the extra 4 bytes for the output file just spaces ?
Gerry |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
sun_job wrote: |
Craq Giegerich wrote: |
What sort product and version? |
3. Not sure of version |
Run the following job:
Code: |
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
RECORD
/*
//SORTOUT DD DUMMY
//SYSIN DD *
OPTION COPY
/* |
Copy and paste the SYSOUT sysout here, enclosed in Code tags (quote this post to see what I mean if you don't know). This will allow us to determine what sort product you have, and its level. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
When i originally read this, i understood the last 4 should be spaced out. Possibly my mistake.
With the "clarification" i don't understand how the lrecl grew Supposedly, 4 bytes were spaced/removed. From 50 to 54? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
To confuse it more, is not it as simple as this Job is:
Code: |
//STEP010 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
ABC 003,003
FEG 003,003
BNG 003,003
TNG 003,003
//SORTOUT DD DSN=HLQ.CONFSING.OUTPUT,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(1,1),RLSE)
//SYSIN DD *
OPTION COPY
OUTREC FIELDS=(1,7,54:X)
//* |
|
|
Back to top |
|
|
|