I am planning to prepare one report based on input data. but i am not able to extract it. Can some one let me know that i am doing it correctly. Please check the attachment to get the exact input data.
Input :
Code:
2021/02/23 03:57:02 SDT AAAAAAAA CHC0129I The latest scraped data
2021/02/23 03:57:02 SDT BBBBBBBB CHC0129I The latest scraped data
2021/02/23 03:57:03 SDT CCCCCCCC CHC0129I The latest scraped data
2021/02/23 03:57:03 SDT DDDDDDDD CHC0129I The latest scraped data
2021/02/23 03:57:03 SDT EEEEEEEE CHC0129I The latest scraped data
2021/02/23 03:57:03 SDT FFFFFFFF CHC0129I The latest scraped data
2021/02/23 03:57:04 SDT GGGGGGGG CHC0129I not scraped data
expected
Output :
Code:
AAAAAAAA subscription is in mirroring mode
BBBBBBBB subscription is in mirroring mode
CCCCCCCC subscription is in mirroring mode
DDDDDDDD subscription is in mirroring mode
EEEEEEEE subscription is in mirroring mode
FFFFFFFF subscription is in mirroring mode
GGGGGGGG subscription is not in mirroring mode
Joined: 15 Aug 2015 Posts: 1335 Location: Bamberg, Germany
Code:
//WHATEVER EXEC PGM=ICEMAN
//SORTIN DD *
2021/02/23 03:57:02 SDT AAAAAAAA CHC0129I The latest scraped data
2021/02/23 03:57:02 SDT BBBBBBBB CHC0129I The latest scraped data
2021/02/23 03:57:03 SDT CCCCCCCC CHC0129I The latest scraped data
2021/02/23 03:57:03 SDT DDDDDDDD CHC0129I The latest scraped data
2021/02/23 03:57:03 SDT EEEEEEEE CHC0129I The latest scraped data
2021/02/23 03:57:03 SDT FFFFFFFF CHC0129I The latest scraped data
2021/02/23 03:57:04 SDT GGGGGGGG CHC0129I not scraped data
/*
//SYSOUT DD SYSOUT=*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC IFTHEN=(WHEN=INIT,
FINDREP=(INOUT=(C'The latest scraped data',
C'subscription is in mirroring mode',
C'not scraped data',
C'subscription is not in mirroring mode'))),
IFTHEN=(WHEN=INIT,
PARSE=(%01=(STARTAFT=C' SDT ',ENDAT=BLANKS,FIXLEN=8),
%=(ENDAT=BLANKS,FIXLEN=9),
%02=(FIXLEN=40)),
BUILD=(%01,X,%02))
END
/*
Output:
Code:
********************************* TOP OF DATA **********************************
AAAAAAAA subscription is in mirroring mode
BBBBBBBB subscription is in mirroring mode
CCCCCCCC subscription is in mirroring mode
DDDDDDDD subscription is in mirroring mode
EEEEEEEE subscription is in mirroring mode
FFFFFFFF subscription is in mirroring mode
GGGGGGGG subscription is not in mirroring mode
******************************** BOTTOM OF DATA ********************************
tried this code and it's not working with these records. It's not able to find the records.
Input:
Code:
2021/02/23 03:57:02 SDT AAAAAAAA CHC0129I THE LATEST SCRAPED DATA WAS WRITTEN
2021/02/23 03:57:02 SDT BBBBBBBB CHC0129I THE LATEST SCRAPED DATA WAS WRITTEN
2021/02/23 03:57:03 SDT CCCCCCCC CHC0129I THE LATEST SCRAPED DATA WAS WRITTEN
2021/02/23 03:57:03 SDT DDDDDDDD CHC0129I THE LATEST SCRAPED DATA WAS WRITTEN
2021/02/23 03:57:03 SDT EEEEEEEE CHC0129I THE LATEST SCRAPED DATA WAS WRITTEN
2021/02/23 03:57:03 SDT FFFFFFFF CHC0129I THE LATEST SCRAPED DATA WAS WRITTEN
2021/02/23 03:57:04 SDT GGGGGGGG CHC0129I THE LATEST SCRAPED DATA WAS WRITTEN
2021/02/23 03:57:04 SDT HHHHHHHH CHC0129I THE LATEST SCRAPED DATA WAS WRITTEN
2021/02/23 03:57:04 SDT IIIIIIII CHC0129I NOT SCRAPED DATA WAS WRITTEN
JOB :
Code:
//STEP01 EXEC PGM=ICEMAN
//SORTIN DD DSN=*****.ALLUSER.SPILTST.F8,DISP=SHR
//SYSOUT DD SYSOUT=*
//*---------------------------------------------------------
//SORTOUT DD DSN=*****.ALLUSER.SPILTST.F9,
// DISP=(,CATLG,DELETE),UNIT=PRD,
// SPACE=(CYL,(10,15),RLSE),
// DCB=(RECFM=FB,LRECL=133,BLKSIZE=0)
//SYSIN DD *
OPTION COPY
INREC IFTHEN=(WHEN=INIT,
FINDREP=(INOUT=(C'THE LATEST SCRAPED DATA',
C'SUBSCRIPTION IS IN MIRRORING MODE',
C'NOT SCRAPED DATA',
C'SUBSCRIPTION IS NOT IN MIRRORING MODE'))),
PARSE=(%01=(STARTAFT=C' SDT ',ENDAT=BLANKS,FIXLEN=8),
%=(ENDAT=BLANKS,FIXLEN=9),
%02=(FIXLEN=40)),
BUILD=(%01,X,%02))
END
/*
Error Message :
Code:
WER813I INSTALLATION OPTIONS IN MFX LOAD LIBRARY WILL BE USED
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
SORT FIELDS=COPY
OUTREC IFTHEN=(WHEN=(45,23,CH,EQ,C'THE LATEST SCRAPED DATA'),
OVERLAY=(1:25,8,6X,15:C'SUBSCRIPTION IN MIRRORING MODE'))
IFTHEN=(WHEN=NONE,
OVERLAY=(1:25,8,6X,15:C'SUBSCRIPTION IS NOT IN MIRRORING MODE'))
This one worked fine for me. I am able to pull the report without any issues.
kvgreddy1, Glad it worked. Going forward, I would suggest you to search this forum before posting and give a try with that found information and then post if you can't get it work. This exercise will avoid duplicates and provide you more learnings.
ibmmainframes.com/about47590.html ibmmainframes.com/about6082.html
.
..
Many more.