When I am trying to do for the conversion of ',' into '-', the out is showing ivalid value. Can we replac comma with other char in anyway using the below JCL and options.
//FILEAI6 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD *
./ I'LL BE CHANGED
/. I WON'T BE
/. I WON'T BE
//DD01O DD SYSOUT=*
//SYSIN DD *
$$DD01 COPYALL IF=(1,EQ,C'./'),R=(1,C'!/'),
ORIF=(4,EQ,C'I'),R=(4,C'U')
/*
//*
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD *
./ I'LL BE CHANGED
/. I WON'T BE
/. I WON'T BE
//DD01O DD SYSOUT=*
//SYSIN DD *
$$DD01 COPYALL IF=(1,EQ,C'./'),R=(1,C'!/'),
ORIF=(4,EQ,C'I'),R=(4,C'U')
/*
//*
The ouput is
****************************
!/ U'LL BE CHANGED
/. U WON'T BE
/. U WON'T BE
****************************
Error message for comma usage:
F I L E - A I D V8.9.5 07 - JUL - 2008 13.35.27 *CONTROL CARD LIST
INSTALLATION STANDARD CHARTERED BANK 083338 RELEASE 02/27/0
PROGRAM AND ALL MATERIAL COPYRIGHT 1980,2006 BY COMPUWARE CORPORATION
1...5...10...15...20...25...30...35...40...45...50...55...60...65...70...75...
DD01 DSN=SRLSBPD.SRLSBPDB.JOB06248.D0000101.? OPENED AS PS,
RECFM=FB,LRECL=80,BLKSIZE=80,VOL=SYSOUT
DD01O DSN=SRLSBPD.SRLSBPDB.JOB06248.D0000105.? OPENED AS PS,
RECFM=FB,LRECL=80,BLKSIZE=80,VOL=SYSOUT
$$DD01 COPYALL IF=(5,EQ,C','),R=(1,C'-'),
1...5...10...15...20...25...30.
INVALID DATA ELEMENT FORMAT IN IF, CHECK DATA STARTING IN COLUMN 31
.....SKIPPING TO NEXT $$DD CARD RC=4
0 RECORDS WRITTEN TO DD01O-SRLSBPD.SRLSBPDB.JOB06248.D0000105.?
VOL=
INSTALLATION STANDARD CHARTERED BANK 083338 RELEASE 02/27/0
PROGRAM AND ALL MATERIAL COPYRIGHT 1980,2006 BY COMPUWARE CORPORATION
1...5...10...15...20...25...30...35...40...45...50...55...60...65...70...75...
DD01 DSN=SRLSBPD.SRLSBPDB.JOB06248.D0000101.? OPENED AS PS,
RECFM=FB,LRECL=80,BLKSIZE=80,VOL=SYSOUT
DD01O DSN=SRLSBPD.SRLSBPDB.JOB06248.D0000105.? OPENED AS PS,
RECFM=FB,LRECL=80,BLKSIZE=80,VOL=SYSOUT
$$DD01 COPYALL IF=(5,EQ,C','),R=(1,C'-'),
1...5...10...15...20...25...30.
INVALID DATA ELEMENT FORMAT IN IF, CHECK DATA STARTING IN COLUMN 31
.....SKIPPING TO NEXT $$DD CARD RC=4
0 RECORDS WRITTEN TO DD01O-SRLSBPD.SRLSBPDB.JOB06248.D0000105.?
VOL=