View previous topic :: View next topic
|
Author |
Message |
gprerna
New User
Joined: 21 Mar 2007 Posts: 38 Location: US
|
|
|
|
Hi,
I have below data in my i/p file:
Code: |
SAV0000000010470615
INV000000000000W86348368
INV00000W86348368
AID000062970611910610423
|
Expected o/p:
Code: |
SAV000000000000000000000010470615
INV000000000000000000000W86348368
INV000000000000000000000W86348368
AID000000000000062970611910610423
|
I have used the below sort card:
SORT FIELDS=COPY
OPTION COPY
INREC BUILD=(1,19,20,30,UFF,M11,LENGTH=30)
This is washing out the alphabets i have in between.
Can anyone help how to get the above o/p. I want to have field from position 20 pre-appended with ZEROES and make it 30 byte field. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Here's a DFSORT job that will do what I think you asked for. Your description of your data doesn't really match the input example you showed, so I guessed what you meant (see //SORTIN below). At any rate, you can't use UFF here because your values are not all numeric. But JFY and TRAN=ALTSEQ will do the trick.
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
SAV 0000000010470615
INV 000000000000W86348368
INV 00000W86348368
AID 000062970611910610423
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
ALTSEQ CODE=(40F0)
INREC OVERLAY=(20:20,30,JFY=(SHIFT=RIGHT),
20:20,30,TRAN=ALTSEQ)
|
SORTOUT would have:
Code: |
SAV 000000000000000000000010470615
INV 000000000000000000000W86348368
INV 000000000000000000000W86348368
AID 000000000000062970611910610423
|
If I guessed wrong about what your input records look like, show what they do look like or describe them better. |
|
Back to top |
|
|
gprerna
New User
Joined: 21 Mar 2007 Posts: 38 Location: US
|
|
|
|
Getting below error:
Code: |
OPTION COPY
ALTSEQ CODE=(40F0)
INREC OVERLAY=(20:20,30,JFY=(SHIFT=RIGHT),20:20,30,TRAN=ALTSEQ)
*
WER268A INREC STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
|
Here is the input file with positions:
Code: |
----+----1----+----2----+----3----+----4----+----
***************************** Top of Data *******
55356298077201 CCA000074923014073187
40011503116201 CCA0074923014165306
40070535931201 CCA0000000ABC23014193209
35027190403201 CCA74923014194546
|
and expected output is:
Code: |
----+----1----+----2----+----3----+----4----+----
***************************** Top of Data *******
55356298077201 CCA00000000000000074923014073187
40011503116201 CCA00000000000000074923014165306
40070535931201 CCA000000000000000ABC23014193209
35027190403201 CCA00000000000000074923014194546
|
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
The job works fine with DFSORT which has had the JFY function since April, 2006. But the WER messages indicate you're using Syncsort, not DFSORT.
I'm a DFSORT developer. DFSORT and Syncsort are competitive products. I'm happy to answer questions on DFSORT and DFSORT's ICETOOL, but I don't answer questions on Syncsort.
You should post Syncsort questions in the JCL Forum, not in the DFSORT Forum. I'm moving this thread over there. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
'WER' shows that you are using SYNCSORT not DFSORT! |
|
Back to top |
|
|
gprerna
New User
Joined: 21 Mar 2007 Posts: 38 Location: US
|
|
|
|
Sorry for that Frank. We dont have DFSORT in our shop.
Can anyone please help to do this using SYNCSORT? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
JFY is supported in the current Syncsort release (1.3).
Suggest you talk with your system support to have the current release installed. |
|
Back to top |
|
|
|