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 merge extracted records and text in the end

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

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Wed May 12, 2010 8:08 pm    Post subject: Syncsort merge extracted records and text in the end
Reply with quote

Operation i need to do is -
1- extract data from I/P file(400 FB) position 62:16 and write it into O/P file(80 FB).

2- After extracting all above records I have to add a note in the bottom. For eg- " Above records are erroneous"

Pls let me know if i can refer an existing topic somewhere.
Back to top
View user's profile Send private message

Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Wed May 12, 2010 10:05 pm    Post subject:
Reply with quote

Ok, so what you have tried?
Back to top
View user's profile Send private message
t5590ag

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Wed May 12, 2010 10:10 pm    Post subject:
Reply with quote

as per my knowledge i have an option to use SORT first and then merge two DS (extracted and text) in another step. But can we do it in a single step, in single sort ? and avoiding another DS with hardcoded text. That i can include in SORT card if i can do it in SORT step only using OUTREC and positioning my text in the end somehow.
Back to top
View user's profile Send private message
t5590ag

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Thu May 13, 2010 1:38 am    Post subject:
Reply with quote

am trying something like this-
Code:
//SYSIN   DD *             
   SORT FIELDS=COPY       
   OUTFIL FNAMES=SORTOUT, 
   OUTREC FIELDS=(1:62,16),
   TRAILER1=(18:'HII')     
/*                         
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu May 13, 2010 7:51 am    Post subject:
Reply with quote

Hello,

So, what hapened?
Back to top
View user's profile Send private message
t5590ag

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Thu May 13, 2010 1:00 pm    Post subject:
Reply with quote

SYNTAX ERROR is there and usage of TRAILER is not correct perhaps-

Code:
 SYSIN :                                       
    SORT FIELDS=COPY                           
    OUTFIL FNAMES=SORTOUT,                     
    OUTREC FIELDS=(1:62,16),                   
    *                                           
    TRAILER1=(18:'HII')                         
    *                                           
 WER268A  OUTFIL STATEMENT  : SYNTAX ERROR     
 WER275A  NO KEYWORDS FOUND ON CONTROL STATEMENT
 WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000 
 WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE 
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Thu May 13, 2010 3:33 pm    Post subject:
Reply with quote

Code:
 SORT FIELDS=COPY                               
 OUTFIL REMOVECC,BUILD=(62,16),TRAILER1=('HII') 
Try this. You might need to increase the data record length to the length of the trailer text by filling the rest of the places with spaces in the BUILD statement.
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 Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts Inserting records based on conditions vickey_dw DFSORT/ICETOOL 9 Wed Feb 22, 2017 1:33 pm
No new posts To Merge mutliple records into a sing... anandgbe DFSORT/ICETOOL 6 Wed Feb 22, 2017 8:49 am


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