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

DFSORT output in CSV for data spans into multiple records


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
hiravibk
Warnings : 1

Active User


Joined: 14 Dec 2008
Posts: 107
Location: India

PostPosted: Tue Nov 13, 2018 7:55 pm
Reply with quote

Input File:
(Included line numbers for reference)
Code:

12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345
FOFAC001                                                            18310/0030
        ------------------------- AGENT INFORMATION  -------------------------
        Job Type: UNIX_JOB                                                   
        Agent:  LINUX_01ABHK                                                 
        Userid: UMIKE001                                                     
        --------------------------- TRIGGERED JOBS ----------------------------
           JOB=BOFAC001 SCHID=000      QTM=0100 LEADTM=0000 SUBMTM=0000       
           JOB=COFAC001 SCHID=000      QTM=0100 LEADTM=0000 SUBMTM=0000       
           JOB=DOFAC001 SCHID=000      QTM=0100 LEADTM=0000 SUBMTM=0000       
FOFAC002                                                            18309/1530
        ------------------------- AGENT INFORMATION  -------------------------
        Job Type: UNIX_JOB                                                   
        Agent:  LINUX_02ABHK                                                 
        Userid: UMIKE002                                                     
        --------------------------- TRIGGERED JOBS ----------------------------
           JOB=KOFAC001 SCHID=000      QTM=0100 LEADTM=0000 SUBMTM=0000       
           JOB=MOFAC001 SCHID=000      QTM=0100 LEADTM=0000 SUBMTM=0000       


Output:
(Included line numbers for reference)
Code:

12345678901234567890123456789012345678901234567890123456789012345678901234567890
JOBNAME ,LASTRUN   ,JOBTYPE ,AGENT       ,USERID  ,TRIGGERED JOBS           
FOFAC001,18310/0030,UNIX_JOB,LINUX_01ABHK,UMIKE001,BOFAC001;COFAC001;DOFAC001
FOFAC002,18309/1530,UNIX_JOB,LINUX_02ABHK,UMIKE002,KOFAC001;MOFAC001

I tried the below code and was able to group records and include corresponding jobname for each line and line number. Please help. Thank you.
Code:
//SYSIN    DD  *                                                   
  OPTION COPY                                                     
  INREC IFTHEN=(WHEN=GROUP,                                       
        BEGIN=(2,3,CH,NE,C' '),PUSH=(85:2,8))                     
  OUTREC IFTHEN=(WHEN=INIT,OVERLAY=(95:SEQNUM,3,ZD,RESTART=(85,8)))
/*


Sorry couldn't update my last post, simplifying the question and reposting it again. Thank you!
Back to top
View user's profile Send private message
hiravibk
Warnings : 1

Active User


Joined: 14 Dec 2008
Posts: 107
Location: India

PostPosted: Thu Nov 15, 2018 8:42 am
Reply with quote

I have the below input file with data for jobs spanning to multiple lines.
1) The file below has data for two jobs FOFAC001 and FOFAC002. Each job has two sections, 'AGENT INFORMATION' and 'TRIGGERED JOBS' sections.
2) I need Job Type, Agent and Userid from AGENT INFORMATION section and jobs in TRIGGERED JOBS section for each job in a CSV, along with the last run time of the job present in the first line of each job.
3) Only condition is each job can have several triggered jobs.
Please help. Thank you!
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Nov 15, 2018 12:54 pm
Reply with quote

DO NOT post the same question on multiple forums.

The responders on here are the same as those as on the other forum.

This topic has been locked

Also, this is a repeat post of a previous topic in this forum from which you did not receive any replies. Why do you think that reposting the exact same thing will illicit any more response. If we can help we will, if we can't we can't, one of the rules of forum life.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Thu Nov 15, 2018 4:59 pm
Reply with quote

Topic in beginner's forum deleted.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
Search our Forums:

Back to Top