IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Issues with outrec overlay while extracting req data frm rec


IBM Mainframe Forums -> SYNCSORT
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kvgreddy1

New User


Joined: 30 Mar 2021
Posts: 7
Location: India

PostPosted: Tue Mar 30, 2021 11:30 am
Reply with quote

Hi,

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


My Job :

Code:
//SORTIN   DD  DSN=*****.ALLUSER.SPILTST.F7,DISP=SHR                   
//*---------------------------------------------------------           
//SORTOUT  DD  DSN=*****.ALLUSER.SPILTST.F8,                           
//            DISP=(,CATLG,DELETE),                                   
//            UNIT=PRD,                                               
//            SPACE=(CYL,(100,150),RLSE),                             
//            DCB=(RECFM=FB,LRECL=133,BLKSIZE=0)                       
//SORTWK01 DD  UNIT=TSO,SPACE=(CYL,(10,5),RLSE)                       
//SYSOUT   DD  SYSOUT=*                                               
//SYSPRINT DD  SYSOUT=*                                               
//SYSIN    DD  *                                                       
 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'))   
/*
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1231
Location: Bamberg, Germany

PostPosted: Tue Mar 30, 2021 11:55 am
Reply with quote

Use code tags when presenting code or data! How complicated can your problem be if you fail the easiest steps?
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1231
Location: Bamberg, Germany

PostPosted: Tue Mar 30, 2021 12:47 pm
Reply with quote

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 ********************************
Back to top
View user's profile Send private message
kvgreddy1

New User


Joined: 30 Mar 2021
Posts: 7
Location: India

PostPosted: Tue Mar 30, 2021 5:27 pm
Reply with quote

Hi,

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
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Tue Mar 30, 2021 6:01 pm
Reply with quote

Option copy starting at column 1 is the problem I guess

Please post the complete sysout always

You have a SYNCSORT product moving to SYNCSORT forum

@Joerg


INREC + IFTHEN + BUILD should suffice for TS need
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1231
Location: Bamberg, Germany

PostPosted: Tue Mar 30, 2021 7:24 pm
Reply with quote

@Pandora-Box: The length was not clear, that's why I have chosen this flexible solution.
Back to top
View user's profile Send private message
kvgreddy1

New User


Joined: 30 Mar 2021
Posts: 7
Location: India

PostPosted: Tue Mar 30, 2021 8:04 pm
Reply with quote

Code:
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.

Thank you for your help
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3049
Location: NYC,USA

PostPosted: Tue Mar 30, 2021 9:36 pm
Reply with quote

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.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> SYNCSORT

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
No new posts JCL EXEC PARM data in C Java & MQSeries 2
Search our Forums:

Back to Top