Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

SYNCSORT date and time in detail records

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
priyanka.msharma
Warnings : 1

New User


Joined: 28 Jan 2009
Posts: 12
Location: India

PostPosted: Thu Feb 19, 2009 1:51 pm    Post subject: SYNCSORT date and time in detail records
Reply with quote

I have a seq file that has header, detail and trailer record. Header contains date & time that i want to write in details record of o/p file

Input file:

H02162009052933001
D1234567890C11234567BOTHabc@gmail.com
D1234567890C11234567BOTHpqr@gmail.com
T0005602162009052933001

Desired Output file
D1234567890C11234567BOTHabc@gmail.com02162009
D1234567890C11234567BOTHpqr@gmail.com02162009
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Feb 19, 2009 1:54 pm    Post subject:
Reply with quote

Please DO NOT post the same topic twice.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2276
Location: @my desk

PostPosted: Thu Feb 19, 2009 1:58 pm    Post subject:
Reply with quote

Hello,

Welcome to the forums.

What is your input and output RECFM/LRECL?
At what position in the output you want to 'attach' the date extracted from header?
Back to top
View user's profile Send private message
priyanka.msharma
Warnings : 1

New User


Joined: 28 Jan 2009
Posts: 12
Location: India

PostPosted: Thu Feb 19, 2009 3:10 pm    Post subject:
Reply with quote

Input RECFM is FB and LRECL is 88

Output RECFM is FB and LRECL is 150

I want to write date and time (from header) from 90th Position.

-------------------------------------------------------------------------------

Expat,

I apologize for writing the same Q again coz this was my first post and I was not aware ppl wud take it as an offense.

I wud have appriciated if u cud have answered or atleast tried to answer my Q rather than giving ur mind in telling me that Q is repeated.

Its a mistake...n humans can/may/will do mistakes at some point of life.

Thanks anyways. Bye
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10254
Location: italy

PostPosted: Thu Feb 19, 2009 4:18 pm    Post subject: Reply to: SYNCSORT date and time in detail records
Reply with quote

Quote:
I apologize for writing the same Q again coz this was my first post and I was not aware ppl wud take it as an offense.
I wud have appriciated if u cud have answered or atleast tried to answer my Q rather than giving ur mind in telling me that Q is repeated.
Its a mistake...n humans can/may/will do mistakes at some point of life.


but they will find hard to read Your posts if You keep up with a script kiddie language

as an alternative have Your keyboard fixed icon_smile.gif
Back to top
View user's profile Send private message
priyanka.msharma
Warnings : 1

New User


Joined: 28 Jan 2009
Posts: 12
Location: India

PostPosted: Thu Feb 19, 2009 4:27 pm    Post subject:
Reply with quote

Thanks for ur valuable comments.

post edited to take away unpolite remarks (e.s.)
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Fri Feb 20, 2009 2:14 am    Post subject:
Reply with quote

If you want the HEADER and TRAILER records included in the output, then here is one way of achieving your desired output using SyncSort for z/OS 1.3.2:
Code:

//SORT1 EXEC PGM=SORT                                 
//SORTIN  DD *                                       
H02162009052933001                                   
D1234567890C11234567BOTHABC@GMAIL.COM               
D1234567890C11234567BOTHPQR@GMAIL.COM               
T0005602162009052933001                             
//SORTOUT DD SYSOUT=*                               
//SYSOUT  DD SYSOUT=*                               
//SYSIN   DD *                                       
 SORT FIELDS=COPY 
 OUTREC IFTHEN=(WHEN=GROUP,BEGIN=(1,1,CH,EQ,C'H'),   
        PUSH=(38:2,8)),                             
        IFTHEN=(WHEN=(1,1,CH,EQ,L(C'H',C'T')),       
        OVERLAY=(38:8X))                                                       
/*   


However, if you only want the DETAIL records, then try this instead:
Code:

//SYSIN   DD *                                           
  INREC IFTHEN=(WHEN=GROUP,BEGIN=(1,1,CH,EQ,C'H'),       
        PUSH=(38:2,8))                                   
  SORT FIELDS=COPY                                       
  OUTFIL OUTREC=(1,80),INCLUDE=(1,1,CH,NE,L(C'H',C'T')) 
/*               


You will obviously need to modify the positions and field lengths to match your actual data.
Back to top
View user's profile Send private message
priyanka.msharma
Warnings : 1

New User


Joined: 28 Jan 2009
Posts: 12
Location: India

PostPosted: Fri Feb 20, 2009 4:43 pm    Post subject:
Reply with quote

Hi Alissa,

Thankyou for providing solution to my problem. Unfortunately my application supports SyncSort for z/OS 1.3.0.1 and so it does not identifies keywords like GROUP, PUSH etc.

One of my friend tried doing this with JOINKEYS but unfortunately his version was SyncSort for z/OS 1.3.1.0

It wud be really helpful if you could provide solution on version SyncSort for z/OS 1.3.0.1

Thanks again icon_smile.gif
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2276
Location: @my desk

PostPosted: Fri Feb 20, 2009 5:33 pm    Post subject:
Reply with quote

You can achieve the same by creating a symbol for date/time in step1 and then use the same in your step2.

But what is the length of your date-time field? As per your previous posts, you need to insert the date-time field at 90th pos. Do you want to fill the rest of the positions till 155 with spaces?
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2276
Location: @my desk

PostPosted: Fri Feb 20, 2009 5:48 pm    Post subject:
Reply with quote

Hello,

The SYMNAMES approach works with SyncSort for z/OS 1.2.1.0(my version).
Code:
//STEP1    EXEC PGM=SORT                     
//SYSOUT   DD SYSOUT=*                       
//SORTIN   DD DSN= Input file                             
//SORTOUT  DD DSN=&&S1,DISP=(,PASS)         
//SORTOUT  DD SYSOUT=*                       
//SYSIN    DD *                             
  INCLUDE COND=(1,1,CH,EQ,C'H')             
  INREC BUILD=(C'DATE-X,''',2,14,C'''',80:X)
  SORT FIELDS=COPY                           
//STEP2    EXEC PGM=SORT                     
//SYSOUT   DD SYSOUT=*                       
//SORTIN   DD DSN= Input file                             
//SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)
//SORTOUT  DD DSN= Output file ---> FB/LRECL=155               
//SYSIN    DD *                       
  OMIT COND=(1,1,SS,EQ,C'H,T')         
  INREC OVERLAY=(90:DATE-X,155:X)           
  SORT FIELDS=COPY
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts DSNACCOX (can it be run on 1 db/ts, t... SRICOBSAS DB2 3 Sat May 06, 2017 12:59 am
No new posts LISTIDR compiled date/time jerryte IBM Tools 3 Thu Apr 20, 2017 7:37 pm
No new posts Application not run by time HH:MM tri... jzhardy IBM Tools 1 Sun Apr 09, 2017 3:22 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us