IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Syncsort merge extracted records and text in the end


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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

Superior Member


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

PostPosted: Wed May 12, 2010 10:05 pm
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
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
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

Moderator Emeritus


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

PostPosted: Thu May 13, 2010 7:51 am
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
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: 2481
Location: @my desk

PostPosted: Thu May 13, 2010 3:33 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to save SYSLOG as text data via P... All Other Mainframe Topics 1
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
Search our Forums:

Back to Top