View previous topic :: View next topic
Author
Message
chandu_3777 New User Joined: 21 Sep 2005Posts: 3 Location: pune
Hi ,
This is my syncsort jcl i'm sorting a dataset and moving some records if the position of the filed in 25-28 is 200 or 250 then move the record from 25 th column to out rec (i,e out rec contains value from 25 th column into 1st column).Anybody please help me out....(record length is 5000 and fm=vb)
Code:
//STEP1 EXEC PGM=SORT
//SORTIN DD DSN=hhaaka.TEST.DATA,DISP=SHR
//SORTOUT DD DSN=hhaaka.TEST.OUT19,DISP=(NEW,CATLG)
//SORTOF01 DD DSN=hhaaka.TEST.OUTF19,DISP=(NEW,CATLG),
// DCB=(RECFM=VB,BLKSIZE=0)
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(11,13,CH,A,29,3,CH,D)
OUTFIL FILES=01,
INCLUDE=(29,3,CH,EQ,C'200',OR,29,3,CH,EQ,C'250'),
OUTFIL OUTREC=(5:3,5000)
/*
//
Back to top
chandu_3777 New User Joined: 21 Sep 2005Posts: 3 Location: pune
this is my input for above jcl
----+----1----+----2---- +----3----+
4023045011870010583 AS2000410010
4023045011870010583 AS250041001DL
4023045011870011587 AS2000410010
4023045011870011587 AS250041001DL
4023045011870012599 AS2000410010
need output
----+----1----+----2---- +----3----+
2000410010
250041001DL
2000410010
250041001DL
2000410010
Back to top
leo_sangha New User Joined: 11 Aug 2005Posts: 85 Location: England
Hi Chandu,
If I take this as an Input
000001 4023045011870010583 AS200041001
000002 4023045011870010583 AS250041001
000003 4023045011870011587 AS200041001
000004 4023045011870011587 AS250041001
000005 4023045011870012599 AS200041001
and make the input file VB of LRECL 35.
and if you want output file which is also VB of LRECL 35 like this
000001 200041001
000002 250041001
000003 200041001
000004 250041001
000005 200041001
This job will take will do it for you ....
//STEP010 EXEC PGM=SYNCSORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DISP=SHR,DSN=PT3720A.INPUT.VB.FILE
//SORTOUT DD DSN=PT3720A.OUTPUT.VB.FILE,
// DISP=(OLD,CATLG,CATLG),
// UNIT=SYSDA
//SYSIN DD *
SORT FIELDS=(11,13,CH,A)
INCLUDE COND=(27,3,CH,EQ,C'200',OR, /*23-26 SHOULD BE 200
27,3,CH,EQ,C'250') /*23-26 SHOULD BE 250
OUTREC FIELDS=(1:1,4,27,8) /*WRITE TO O/P FROM 23 ONWARDS
/*
The 4 byte gap is for the RDW in VB files.
Let me know if this works for you ....
Thanks
Manpreet Singh
leo_sangha@yahoo.com
Back to top
leo_sangha New User Joined: 11 Aug 2005Posts: 85 Location: England
Dont be confused.
000001
000002
000003
000004
000005
represent the line numbers .....
Thanks
Back to top
chandu_3777 New User Joined: 21 Sep 2005Posts: 3 Location: pune
Hi leo,
Thanks alot ..i solved my problem few days back but still i need ur help i have some values in particular position which i have to convert /replace packed decimal i,e comp-3 value to alphaneumeric, alphanumeric to neumeric, alpha neumeric to ZD, could you please help me with an example ...how can i do that.
Back to top
Please enable JavaScript!