View previous topic :: View next topic
|
Author |
Message |
narendraanchala
New User
Joined: 03 Oct 2006 Posts: 7
|
|
|
|
I have a variable like s9(7)v99. I would like to covert it 9(7)v99.
Could anyone please help me how to get this?
Thanks
Narendra.
Title Changed |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Is this a sort question or a programming question?
If it is a sort question, please post some example input data and what you would like the output to look like.
If yo have some JCL set up, please post that as well. |
|
Back to top |
|
|
narendraanchala
New User
Joined: 03 Oct 2006 Posts: 7
|
|
|
|
Hi Dick,
This is a SORT question, not programming one.
The following is the data in the file with S9(7)V99.
00000460{
00000230{
00000230{
00000460{
00000460{ |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
I think DFSORT Smart Tricks has that one, have you looked there? |
|
Back to top |
|
|
narendraanchala
New User
Joined: 03 Oct 2006 Posts: 7
|
|
|
|
William,
Could you please send the link of that one. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
I have a variable like s9(7)v99. I would like to covert it 9(7)v99.
The following is the data in the file with S9(7)V99.
00000460{
|
S9(7)v99 and 9(7)v99 are both 9-byte ZD values as far as DFSORT is concerned. I think what you're really asking is how to convert a ZD value with a C sign ('00000460{' = X'F0F0F0F0F0F4F6F0C0') to a ZD value with an F sign ('000004600' = X'F0F0F0F0F0F4F6F0F0').
Here's a DFSORT job that will do it. I assumed your 9-byte ZD value starts in position 11.
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file
//SORTOUT DD DSN=... output file
//SYSIN DD *
OPTION COPY
INREC OVERLAY=(11:11,9,ZD,TO=ZD,LENGTH=9)
/*
|
|
|
Back to top |
|
|
narendraanchala
New User
Joined: 03 Oct 2006 Posts: 7
|
|
|
|
Frank,
I am using the following JCL. Both input and output files has lrecl=135. I am getting error. Could you please correct me if anything is missed in the following JCL.
//STEP010 EXEC PGM=ICEMAN
//SORTIN DD DSN=input
//SORTOUT DD DSN=output
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC OVERLAY=(25:25,9,ZD,TO=ZD,LENGTH=9)
/* |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Do you have at least one space in front of your control cards? |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
I am getting error. |
Whenever you say this, you need to show the messages you received.
In this case, I can guess that you're missing the leading blank before OPTION and the leading blank before INREC, but it would only be a guess.
When I run your statements with the leading blanks, DFSORT does not give an error. |
|
Back to top |
|
|
narendraanchala
New User
Joined: 03 Oct 2006 Posts: 7
|
|
|
|
Frank,
I gave one leading space before Option and Inrec but still I am getting the following error
SYSIN :
OPTION COPY
INREC OVERLAY=(25:25,9,ZD,TO=ZD,LENGTH=9)
*
WER268A INREC STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
Could you help me why I am getting this error? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello narendraanchala,
From your error messages, you are running Syncsort, not DFSORT.
I don't have the Syncsort manual available here. If you reply that you are still looking for the cause of the error, i'll have the material available in the morning and will check it out. |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi There,
For sync sort please use the following sort card. I have checked it & its working fine .
Code: |
//SYSIN DD *
OPTION COPY
INREC FIELDS=(25:25,9,ZD,M1,LENGTH=9)
/* |
|
|
Back to top |
|
|
narendraanchala
New User
Joined: 03 Oct 2006 Posts: 7
|
|
|
|
Thanks Ekta.
Its working fine now.
Thanks to every one for your help guys. |
|
Back to top |
|
|
narendraanchala
New User
Joined: 03 Oct 2006 Posts: 7
|
|
|
|
Here is one more JCL
SORT FIELDS=COPY
OUTREC FIELDS=(1:1,24,
25:25,9,ZD,EDIT=(TTTTTTTTT),
34:34,102),CONVERT
Thanks to all for helping me. |
|
Back to top |
|
|
|