View previous topic :: View next topic
|
Author |
Message |
karthi_ind
Active User
Joined: 24 Feb 2004 Posts: 131 Location: Chennai
|
|
|
|
Hi all,
My requirement is as below
Input file
Description
-------------
inv-type(4 spaces) inv-descr (10 spaces) inv-space (spaces)
(11 spaces) inv-descr (11 spaces)inv-type(spaces)inv-item
Output file should be
Description
-------------
inv-type, inv-descr, inv-space
inv-descr, inv-type, inv-item
In the above output file all the spaces have been removed (wherever it may be ) and inserted comma in between those descriptions.
It starts with 83 and ends with 252 in the input file. the length is 169.
Please help me on this.
Thanks |
|
Back to top |
|
|
karthi_ind
Active User
Joined: 24 Feb 2004 Posts: 131 Location: Chennai
|
|
|
|
Hi,
The DFSORT version which I use is
Z/OS DFSORT V1R5 |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
Your description is very poor. Is the input description one or two records?
Is the output file one or two records?
Quote: |
It starts with 83 and ends with 252 in the input file. the length is 169.
|
This doesn't seem right. If 'something' starts in byte 83 and ends in byte 252, it's 170 bytes long. But then what is 'it' ?
Have you checked User Guide for DFSORT PTFs UK90007 and UK90006 @ ftp.software.ibm.com/storage/dfsort/mvs/sortpeug.pdf ? Check out he SQZ function - I think it'll do what you want.
Garry. |
|
Back to top |
|
|
karthi_ind
Active User
Joined: 24 Feb 2004 Posts: 131 Location: Chennai
|
|
|
|
Hi Garry,
It is 2 records.
Description
-------------
inv-type(4 spaces) inv-descr (10 spaces) inv-space (spaces) - 1 st record
(11 spaces) inv-descr (11 spaces)inv-type(spaces)inv-item - 2nd record
this is a field part of the input file so it starts with 83 and ends with 252. we can assume 1 to 170 also.
I tried using SQZ and i got the below error
INREC OVERLAY=(83:83,251,SQZ= (SHIFT=LEFT),83:83,251,
TRAN=LTOU) $
ICE006A 0 OPERAND DEFINER ERROR
ICE751I 0 C5-K05352 C6-Q95214 C7-K90000 C8-K05352 E7-K90000
My DFSORT version is V1R5. Not sure whether this works in this version.
Thanks. |
|
Back to top |
|
|
Guest
|
|
|
|
Hi Karthi,
From the way i understood the requirement the following job can be used:
Code: |
//STEP010 EXEC PGM=SORT
//SORTIN DD *
ABC DEF HKLINJ
ABC DEF HKLINJ
ABC DEF HKLINJ
ABC DEF HKLINJ
ABC DEF HKLINJ
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC BUILD=(1,6,7,13,SQZ=(SHIFT=LEFT,MID=C','))
/*
//SYSUDUMP DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
|
The output of the same will be:
Code: |
ABC DEF,HKLIN
ABC DEF,HKLINJ
ABC DEF,HKLINJ
ABC DEF,HKLINJ
ABC DEF,HKLINJ
|
you can modify the same to reach to your requirement.
Please correct me if i have not understood your requirement. |
|
Back to top |
|
|
karthi_ind
Active User
Joined: 24 Feb 2004 Posts: 131 Location: Chennai
|
|
|
|
Hi devil,
Thanks for your solution. I tried it but as i mentioned earlier the SQZ command is not working in my DFSORT installation. My version is
Z/OS DFSORT V1R5.
I am getting the below error
OPTION COPY
INREC BUILD=(1,6,7,13,SQZ=(SHIFT=LEFT,MID=C','))
$
ICE006A 0 OPERAND DEFINER ERROR
ICE751I 0 C5-K05352 C6-Q95214 C7-K90000 C8-K05352 E7-K90000
ICE052I 3 END OF DFSORT
Please let me know in case it can be achieved thru any other commands.
Thanks |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
Please use the code tags to show jobs and job output - otherwise, what you show as JCL, code or output may be misaligned.
The '$' usually aligns with where the error is found. I this case it seems to be at the INREC statement which suggests that you coded in column 1. If it were complaining of the SQZ parameter, the '$' would be aligned there.
Garry. |
|
Back to top |
|
|
karthi_ind
Active User
Joined: 24 Feb 2004 Posts: 131 Location: Chennai
|
|
|
|
Garry,
It is because of alignment problem, the actual issue is with SQZ. It is showing $ in SQZ only. Sorry about that.
Code: |
OPTION COPY
INREC BUILD=(1,6,7,13,SQZ=(SHIFT=LEFT,MID=C','))
$
|
|
|
Back to top |
|
|
karthi_ind
Active User
Joined: 24 Feb 2004 Posts: 131 Location: Chennai
|
|
|
|
Hi,
Is there any other command other than SQZ in sort to achieve the above requirement. Please guide me on this.
Hope my requirement is clear.
Thanks. |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
I think you'll probably have to wait for Frank or Kolusu for this. They are probably due to login soon....
Garry. |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
karthi_ind wrote: |
Hi,
Is there any other command other than SQZ in sort to achieve the above requirement. Please guide me on this.
Hope my requirement is clear.
Thanks. |
If you are getting an error using SQZ then you probably are way behind installing PTF's. As is z/OS DFSORT V1R5 is out of service and is no longer supported. You should be using one of the supported releases - z/OS DFSORT V1R10 or z/OS DFSORT V1R12. The SQZ function is available for both of those releases. |
|
Back to top |
|
|
karthi_ind
Active User
Joined: 24 Feb 2004 Posts: 131 Location: Chennai
|
|
|
|
Hi Kolusu,
Thanks for your reply.
My installation is internal to our organisation. So I can't use the version as mentioned in your reply.
Please let me know if there is anyother way to achieve this. (other than SQZ function)
Thanks |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
If there was another way with DFSORT, I reckon Kolusu would have
told you.
I suggest you try some other approach.
Garry. |
|
Back to top |
|
|
|