View previous topic :: View next topic
|
Author |
Message |
ajay_udl
New User
Joined: 10 Oct 2006 Posts: 29
|
|
|
|
Hello all,
I have one query on OUTREC fields.
One dataset with LRECL '258' is there i have to add two new fields at the end, both are of S9(9). ie; 18bytes will be added and the file LRECL will be increased to 276. The new fields should be filled with zeros, containing a Sign digit.
i have given the SYSIN command as below.
SYSIN DD *
SORT FIELDS =COPY
OUTREC FIELDS=(1:1,258,C'000000000000000000')
*/
The above sysin works but it will fill zeros in the fields, no sign digit were appeared.
How do we give a sign thru OUTREC fields??
it's urgent any one please resond on the same, since it seems to be simple, but i'm not that good in SORT fields.. kindly help me.
Thanks
Ajay. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
The above sysin works but it will fill zeros in the fields, no sign digit were appeared. |
S9(9) is a 9-byte ZD field. The sign of F (F0 in the last byte) is valid for ZD, but given what you've said, I guess you want a C sign, not an F sign.
You can use this DFSORT job to get what you want:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file
//SORTOUT DD DSN=... output file
//SYSIN DD *
SORT FIELDS=COPY
OUTREC OVERLAY=(259:+0,TO=ZDC,LENGTH=9,+0,TO=ZDC,LENGTH=9)
/*
|
|
|
Back to top |
|
|
ajay_udl
New User
Joined: 10 Oct 2006 Posts: 29
|
|
|
|
Thanks for ur quick reply frank, but it still giving a syntax error on OUTREC.
My output file will be having the fields filled with zeros, as shown below.
-----------------
PT-FORFED DISPLAY 00000000{
9/SNUM 0
PT-LATMT DISPLAY 00000000{
9/SNUM 0
-----------------
Actually as per you said 'ZDC' should work, but here OUTREC is creating a syntax error.
It will be helpful if ur gving ur valuable comments on this matter.
Many thanks
Ajay. |
|
Back to top |
|
|
ajay_udl
New User
Joined: 10 Oct 2006 Posts: 29
|
|
|
|
Here i'm using SYNCSORT.
Is that the problem, so that i'm getting syntax error on OUTREC?
"WER268A OUTREC STATEMENT : SYNTAX ERROR "
that was the msg populated in SYSOUT.
IF ur finding any solution please reply.
Thanks
Ajay. |
|
Back to top |
|
|
surya_pathaus
Active User
Joined: 28 Aug 2006 Posts: 110
|
|
|
|
Hi Ajay,
I think in your shop, Overlay is not supported.
You can use the following code:
Slight modification of your code.
Code: |
//jobname JOB ...............
//*
//STEP001 EXEC PGM=SORT
//SORTIN DD DSN=input ddname
//SORTOUT DD DSN=output ddname
//SYSIN DD *
SORT FIELDS=COPY
OUTREC FIELDS=(1:1,258,8X'F0',X'C0',8X'F0',X'C0')
//SORTOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
|
|
|
Back to top |
|
|
ajay_udl
New User
Joined: 10 Oct 2006 Posts: 29
|
|
|
|
Hai Surya,
First of all the above thing really worked, thanks for ur support.
If my file is of 344 LRECL and i need to add two s9(9) COMP-3 (5bytes each)at the end, the file length will increase to 354.
what will be the sort condition for COMP-3 variable??
I think the procedure would be same, but syntax will be different rt??
I just need to fill zero in those fields.
Could you please help me in this regard.
Thanks
Ajay. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
Thanks for ur quick reply frank, but it still giving a syntax error on OUTREC. |
The job works fine with DFSORT.
Quote: |
Here i'm using SYNCSORT.
Is that the problem, so that i'm getting syntax error on OUTREC? |
Yes, that's the problem. |
|
Back to top |
|
|
ajay_udl
New User
Joined: 10 Oct 2006 Posts: 29
|
|
|
|
Hi Surya,
Can you please provide an update for the above given qtn on Comp-3 varible.?
it would helpful for me if i'm getting an answer from you.
Thanks
Ajay. |
|
Back to top |
|
|
surya_pathaus
Active User
Joined: 28 Aug 2006 Posts: 110
|
|
|
|
ajay,
This is for comp-3.
Code: |
OUTREC FIELDS=(1:1,344,4X'00',X'0C',4X'00',X'0C')
|
|
|
Back to top |
|
|
|