Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum 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: 8787
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: 2253
Location: Hampshire, 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 Identifying Packed Decimal data in a ... sojivarkey TSO/ISPF 2 Sat Dec 07, 2019 5:36 am
No new posts Reading the CSV data in COBOL and mov... wik123 COBOL Programming 4 Tue Dec 03, 2019 5:13 pm
No new posts Is multiple program names allowed in ... Sakthidevi PL/I & Assembler 1 Tue Nov 19, 2019 11:12 pm
No new posts RegEx Support in DFSORT (z/OS 2.4) Joerg.Findeisen DFSORT/ICETOOL 3 Thu Nov 14, 2019 7:44 am
No new posts Extract data from n DB2 Views automat... esmeraldo All Other Mainframe Topics 5 Wed Nov 13, 2019 12:32 am

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