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 Help :- Insert/Adding a record.

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

Active User


Joined: 05 Jan 2007
Posts: 101
Location: chennai (India)

PostPosted: Tue Jun 28, 2011 4:40 pm    Post subject: SyncSort Help :- Insert/Adding a record.
Reply with quote

Hi All,

How can i insert/Add a record in a Flat File using SyncSort ?
For Example
Input File:-
00019890
00019891
00018991
18987611

And my Output file should be :-
00019890
00019891
00018991
18987611
99999999 ==> Need to add '99999999' at the end.

Consider Record Length = 10 and Record Form is FB.

Thanks
Trinadh
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Tue Jun 28, 2011 4:47 pm    Post subject: Reply to: SyncSort Help :- Insert/Adding a record.
Reply with quote

did You search the forums on how to add a trailer record
( most of the topics will deal with trailer record with some kind of counter )
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Tue Jun 28, 2011 4:59 pm    Post subject: Reply to: SyncSort Help :- Insert/Adding a record.
Reply with quote

I am in a very good mood today
here is a snippet

Code:
 000007 //S1      EXEC PGM=SORT                                                 
 000008 //SYSPRINT  DD SYSOUT=*                                                 
 000009 //SYSOUT    DD SYSOUT=*                                                 
 000010 //SORTIN    DD *                                                       
 000011 DETAIL 01                                                               
 000012 DETAIL 02                                                               
 000013 DETAIL 03                                                               
 000014 DETAIL 04                                                               
 000015 DETAIL 05                                                               
 000016 DETAIL 06                                                               
 000017 //SORTOUT   DD SYSOUT=*,                                               
 000018 //             DCB=(RECFM=FB,LRECL=80)                                 
 000019 //SYSIN     DD *                                                       
 000020   SORT   FIELDS=COPY                                                   
 000021   OUTFIL TRAILER1=(1:C'TRAILR'),REMOVECC

that will produce
Code:
********************************* TOP OF DATA **********************************
DETAIL 01                                                                       
DETAIL 02                                                                       
DETAIL 03                                                                       
DETAIL 04                                                                       
DETAIL 05                                                                       
DETAIL 06                                                                       
TRAILR                                                                         
******************************** BOTTOM OF DATA ********************************


modify according to Your need

anyway nothing that You could not find yourself by searching the forums, or even googling
Back to top
View user's profile Send private message
bodatrinadh

Active User


Joined: 05 Jan 2007
Posts: 101
Location: chennai (India)

PostPosted: Tue Jun 28, 2011 5:00 pm    Post subject:
Reply with quote

Thanks Enrico. I used Trailer record concept and it worked.
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 Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm
No new posts Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm
No new posts Record Not found in AlX but record re... mukun264 COBOL Programming 7 Fri Mar 24, 2017 9:28 am


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