Ralfh
Ralfh

Reputation: 1

Error in replacing a tag information in a variable block XML file using DFSORT in JCL. ICE007A 1 SYNTAX ERROR

I have wrote a JCL using DFSORT to replace a tag information in a variable block XML file. the tag can appear in any place and N number of times.

Below is the JCL

jobcard
//SORT01 EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SYSOUT   DD SYSOUT=*
//SORTIN   DD DSN=X.ABC.REPL.INPUT,
//            DISP=SHR
//SORTOUT  DD DSN=X.ABC.REPL.OUTPUT,
//            DISP=(NEW,CATLG,DELETE),
//            SPACE=(CYL,(50,50),RLSE),
//            DCB=*.SORTIN
//SYSIN    DD *
OPTION COPY
INREC IFTHEN=(WHEN=INIT,
    PARSE=(%01=(STARTAFT=C'<D:DATA>',FIXLEN=8))),
    IFTHEN=(WHEN=(%01),OVERLAY=(%01:C'22222222'))

Below is the error message

*********************************************************************************

ICE805I 1 JOBNAME: ABCD , STEPNAME: SORT01
ICE802I 0 BLOCKSET     TECHNIQUE IN CONTROL 
ICE143I 0 BLOCKSET     COPY  TECHNIQUE SELECTED
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES
ICE000I 1 - CONTROL STATEMENTS FOR 5655-ZOS, Z/OS DFSORT V3R1  - 10:43 ON MON
OPTION COPY
INREC IFTHEN=(WHEN=INIT,
         PARSE=(%01=(STARTAFT=C'<D:DATA>',FIXLEN=8))),
IFTHEN=(WHEN=(%01),OVERLAY=(%01:C'22222222'))
              Å
ICE007A 1 SYNTAX ERROR
ICE751I 0 C5-NONE   C6-NONE   C7-NONE   C8-NONE   E7-NONE
ICE052I 3 END OF DFSORT
***************************************************************************************

I have also tried the below sysin

//SYSIN    DD *
OPTION COPY
INREC IFTHEN=(WHEN=INIT,
    PARSE=(%01=(STARTAFT=C'<D:DATA>',FIXLEN=8))),
    IFTHEN=(WHEN=INIT,OVERLAY=(%01:C'22222222'))

Below is the error message

************************************************************************************

ICE000I 1 - CONTROL STATEMENTS FOR 5655-ZOS, Z/OS DFSORT V3R1  - 10:55 ON MON
OPTION COPY
INREC IFTHEN=(WHEN=INIT,
         PARSE=(%01=(STARTAFT=C'<D:DATA>',FIXLEN=8))),
IFTHEN=(WHEN=INIT,OVERLAY=(%01:C'22222222'))
                              Å
ICE007A 1 SYNTAX ERROR
ICE751I 0 C5-NONE   C6-NONE   C7-NONE   C8-NONE   E7-NONE
ICE052I 3 END OF DFSORT

*************************************************************************************

Note: the tag information will always be 8 characters.

Could you please help here to replace a tag information in an variable XML file?

Upvotes: 0

Views: 55

Answers (1)

Kolusu
Kolusu

Reputation: 566

Use the following DFSORT JCL which will give you the desired results. I am just showing instream data so that you can see the contents before and after the change is done. You can just point your vb XML file to the ddname SORTIN and the job will work fine.

//STEP0100 EXEC PGM=SORT                              
//SYSOUT   DD SYSOUT=*                                
//SORTIN   DD *                                       
ABC <D:DATA>12345678< AJHIOFL;F;<D:DATA>AAAAAAAA<     
<D:DATA>BBBBBBBB< AJHIOFL;F;<D:DATA>CCCCCCCC<         
//SORTOUT  DD SYSOUT=*                                
//SYSIN    DD *                                       
  OPTION COPY                                         
  INREC FINDREP=(SHIFT=NO,                            
                 INOUT=(C'<D:DATA>',                  
                        C'<D:DATA>11111111'))         
/*     

                                           

The output is

ABC <D:DATA>11111111< AJHIOFL;F;<D:DATA>11111111<  
<D:DATA>11111111< AJHIOFL;F;<D:DATA>11111111<      

Upvotes: 0

Related Questions