MVSFORUMS.com A Community of and for MVS Professionals
View previous topic :: View next topic
Author
Message
sivafdms Intermediate Joined: 29 May 2007 Posts: 165 Topics: 77
Posted: Tue Nov 18, 2008 3:47 am Post subject: Copy alternate records & format the output file
Hi All,
I have following data in input file
Code:
0NONVSAM ------- UUS0002.PCCOM.COMAT.US0002.DDF28.D080101
IN-CAT --- SYS3C.ICFCAT.USERID01
0NONVSAM ------- UUS0002.PCCOM.COMAT.US0002.DDF28.D080102
IN-CAT --- SYS3C.ICFCAT.USERID01
0NONVSAM ------- UUS0002.PCCOM.COMAT.US0002.DDF28.D080103
IN-CAT --- SYS3C.ICFCAT.USERID01
0NONVSAM ------- UUS0002.PCCOM.COMAT.US0002.DDF28.D080104
IN-CAT --- SYS3C.ICFCAT.USERID01
0NONVSAM ------- UUS0002.PCCOM.COMAT.US0002.DDF28.D080401
IN-CAT --- SYS3C.ICFCAT.USERID01
I need the output data in following way
Code:
UUS0002.PCCOM.COMAT.US0002.DDF28.D080401
UUS0002.PCCOM.COMAT.US0002.DDF28.D080104
UUS0002.PCCOM.COMAT.US0002.DDF28.D080103
UUS0002.PCCOM.COMAT.US0002.DDF28.D080102
UUS0002.PCCOM.COMAT.US0002.DDF28.D080101
Thanks,
Siva
Back to top
callanand Beginner Joined: 12 Jun 2007 Posts: 23 Topics: 2
Posted: Tue Nov 18, 2008 7:24 am Post subject:
Hi Siva,
Use the sort card as below(UNTESTED)
SORT FIELDS=(52,6,ZD,D) Assuming your date startes at col 52
OMIT COND=(7,5,CH,EQ,C'IN-CAT')
OUTREC FILEDS=(19,30) Assuming your dataset UUSS002 starts at col 19 and is of 30 bytes long
Back to top
callanand Beginner Joined: 12 Jun 2007 Posts: 23 Topics: 2
Posted: Tue Nov 18, 2008 7:31 am Post subject:
Here is the exact code. Assuming data starts at column 1
Code:
//STEP05 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
0NONVSAM ------- UUS0002.PCCOM.COMAT.US0002.DDF28.D080101
IN-CAT --- SYS3C.ICFCAT.USERID01
0NONVSAM ------- UUS0002.PCCOM.COMAT.US0002.DDF28.D080102
IN-CAT --- SYS3C.ICFCAT.USERID01
0NONVSAM ------- UUS0002.PCCOM.COMAT.US0002.DDF28.D080103
IN-CAT --- SYS3C.ICFCAT.USERID01
0NONVSAM ------- UUS0002.PCCOM.COMAT.US0002.DDF28.D080104
IN-CAT --- SYS3C.ICFCAT.USERID01
0NONVSAM ------- UUS0002.PCCOM.COMAT.US0002.DDF28.D080401
IN-CAT --- SYS3C.ICFCAT.USERID01
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OMIT COND=(7,5,CH,EQ,C'IN-CAT')
SORT FIELDS=(52,6,ZD,D)
OUTREC FIELDS=(18,40)
/*
Back to top
sivafdms Intermediate Joined: 29 May 2007 Posts: 165 Topics: 77
Posted: Tue Nov 18, 2008 8:56 am Post subject:
Thaks callanand ...
Back to top
sivafdms Intermediate Joined: 29 May 2007 Posts: 165 Topics: 77
Posted: Wed Nov 19, 2008 4:41 am Post subject:
Callanand,
The above jcl is working fine , thanks for that. But the below file is my original file
and i want to select only records containing NONVSAM.Input file is VB file
Code: 1IDCAMS SYSTEM SERVICES TIME: 22:20:21 11/12/08 PAGE1
0
LISTCAT LEVEL ('UUS0002.PCCOM.COMAT.US0002.DDF28')
1IDCAMS SYSTEM SERVICES TIME: 22:20:21 11/12/08 PAGE1
- LISTING FROM CATALOG -- SYS3C.ICFCAT.USERI
0NONVSAM ------- UUS0002.PCCO 1MAT.US0002.DDF28.D080101
IN-CAT --- SYS3C.ICFCAT.USERID01
0NONVSAM ------- UUS0002.PCCOM.COMAT.US0002.DDF28.D080102
IN-CAT --- SYS3C.ICFCAT.USERID01
0NONVSAM ------- UUS0002.PCCOM.COMAT.US0002.DDF28.D080103
IN-CAT --- SYS3C.ICFCAT.USERID01
0NONVSAM ------- UUS0002.PCCOM.COMAT.US0002.DDF28.D080104
IN-CAT --- SYS3C.ICFCAT.USERID01
0NONVSAM ------- UUS0002.PCCOM.COMAT.US0002.DDF28.D080401
IN-CAT --- SYS3C.ICFCAT.USERID01
I have used following jcl to include NONVSAM records
Code:
//JSTN0010 EXEC PGM=SORT
//SORTWK01 DD UNIT=SYSDA,SPACE=(CYL,(10),RLSE)
//SORTIN DD DSN=ISDXFJT.TEST.DATA6,DISP=SHR
//SORTOUT DD DSN=ISDXFJT.TEST.DATA7,DISP=(NEW,CATLG),
// DCB=(*.SORTIN),
// SPACE=(TRK,(1,1),RLSE),
// UNIT=SYSDA
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(05,08,CH,EQ,C'0NONVSAM')
/*
but it is giving error message as
INSERT 0, DELETE 1
INCLUDE/OMIT FIELD BEYOND RECORD
SYNCSMF CALLED BY SYNCSORT; RC=0000
SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
Please help in this.
Thanks,
Siva
Back to top
callanand Beginner Joined: 12 Jun 2007 Posts: 23 Topics: 2
Posted: Wed Nov 19, 2008 9:53 am Post subject:
Hi Siva,
I guess your input and output file is a VB file. In this case the SORT becomes a bit different. Use
OPTION VLSHRT
as your first statement in SYSIN. Then code the usual copy and include statement.
Back to top
sivafdms Intermediate Joined: 29 May 2007 Posts: 165 Topics: 77
Posted: Wed Nov 19, 2008 10:31 am Post subject:
Callanand,
That worked fine
Thanks ,
Siva
Back to top
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum