Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
DFSORT output in CSV for data spans into multiple records

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: DFSORT output in CSV for data spans into multiple records
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    Post subject: Reply to: DFSORT output in CSV for data spans into multiple records
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: 8744
Location: Welsh Wales

PostPosted: Thu Nov 15, 2018 12:54 pm    Post subject:
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: 2123
Location: UK

PostPosted: Thu Nov 15, 2018 4:59 pm    Post subject: Reply to: DFSORT output in CSV for data spans into multiple records
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.    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Joining 2 records to 1 using Sort cmuncan DFSORT/ICETOOL 1 Sat Dec 08, 2018 8:53 am
No new posts To get the count of PDS data sets whi... Vignesh Sid JCL & VSAM 4 Fri Nov 30, 2018 8:38 pm
No new posts Single step to take backup of multipl... Vignesh Sid JCL & VSAM 1 Thu Nov 29, 2018 8:12 pm
No new posts Need advise in calling DFSORT from REXX ajithajt CLIST & REXX 9 Thu Nov 29, 2018 10:50 am
No new posts DB2 Unload / Load Multiple tables neo4u DB2 8 Tue Nov 27, 2018 3:43 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us