Reformat input file



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

Reformat input file

Postby deva_048 » Tue May 21, 2013 8:15 pm

Hi ,

I have extracted the two job information in one input dataset. Below information contains the input

00.29.28 JOB45648 ---- TUESDAY,   21 MAY 2013 ---- 
00.29.29 JOB45648  IEF403I AAA10000 - STARTED       
00.30.29 JOB45648  IEF404I AAA10000 - ENDED         
00.41.24 JOB45749 ---- TUESDAY,   21 MAY 2013 ---- 
00.41.24 JOB45749  IEF403I BBB20000 - STARTED       
00.41.43 JOB45749  IEF404I BBB20000 - ENDED


Output file should looks like

Job information
Job Name        Date            START Time   End Time
AAA10000 21 MAY 2013       00.29.29        00.30.29
BBB20000  21 MAY 2013       00.41.24        00.41.43


My syncsort version is
SYNCSORT FOR Z/OS 1.3.2.1R

Please help me to proceed further.
deva_048
 
Posts: 72
Joined: Thu Feb 02, 2012 9:28 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Reformat input file

 

Re: Reformat input file

Postby steve-myers » Tue May 21, 2013 8:45 pm

  1. Your input appears to be JESMSGLG data. How do you propose to send this data to Syncsort?
  2. I would suggest SMF data would be a more appropriate data source. SMF type 30, subtype 5 records would be the best source, though I cannot imagine how you can persuade Syncsort to analyze them.
steve-myers
Global moderator
 
Posts: 1885
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 197 times

Re: Reformat input file

Postby deva_048 » Tue May 21, 2013 8:51 pm

Yes, I have extracted JESMSGLG information into ps file. The PS file should be reformat like above output and to be written in new dataset.
deva_048
 
Posts: 72
Joined: Thu Feb 02, 2012 9:28 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Reformat input file

Postby Akatsukami » Tue May 21, 2013 9:08 pm

Would you not be better off writing a COBOL program rather than trawling for Syncsort control cards? :roll:
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1053
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: Reformat input file

Postby NicC » Wed May 22, 2013 1:27 am

What was wrong with posting in the Sycsort forum? Moved.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: Reformat input file

Postby BillyBoyo » Wed May 22, 2013 4:52 am

00.29.28 JOB45648 ---- TUESDAY, 21 MAY 2013 ----
00.29.29 JOB45648 IEF403I AAA10000 - STARTED
00.30.29 JOB45648 IEF404I AAA10000 - ENDED
00.41.24 JOB45749 ---- TUESDAY, 21 MAY 2013 ----
00.41.24 JOB45749 IEF403I BBB20000 - STARTED
00.41.43 JOB45749 IEF404I BBB20000 - ENDED

You're going to need:

 OPTION COPY
 INREC IFTHEN=(WHEN=GROUP,BEGIN=(start,4,CH,EQ,C'----'),PUSH=(134:startofdate,lengthofdate)),
      IFTHEN=(WHEN=GROUP,BEGIN=(start,7,CH,EQ,C'STARTED'),PUSH=(150:1,8))


This will get your third record of the "group" of three for a JOB containing all the information you need. The date will appear at position 134 on all the three records, the start time on the second and third record. You then include only the record with ENDED, and just rearrange your information to what you want.

You'll then need:

  OUTFIL REMOVECC,HEADER1=(C'your first header',/,
                          C'your second header'),
         INCLUDE=(start,5,CH,EQ,C'ENDED'),
         BUILD=(your data in the order that you want it)


That should get you started.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Reformat input file

Postby deva_048 » Wed May 22, 2013 7:18 am

Thanks a lot Billy. Let me have a try and let you know soon...

I am not sure the above sort card contains only the start,end and date information. The job name not included in the sort card. Please correct me if i am wrong.
deva_048
 
Posts: 72
Joined: Thu Feb 02, 2012 9:28 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Reformat input file

Postby deva_048 » Wed May 22, 2013 7:21 am

Hi Akatsukami

Please let me know the idea or logic to implement the same in cobol just draft logic.

Thanks in advance.
deva_048
 
Posts: 72
Joined: Thu Feb 02, 2012 9:28 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Reformat input file

Postby BillyBoyo » Wed May 22, 2013 11:47 am

The Job name is on both the STARTED and ENDED records.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Reformat input file

Postby deva_048 » Wed May 22, 2013 7:43 pm

Thanks it works for me...
deva_048
 
Posts: 72
Joined: Thu Feb 02, 2012 9:28 pm
Has thanked: 1 time
Been thanked: 0 time

Next

Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post