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

How to add sequence number for VB record length file?


IBM Mainframe Forums -> SYNCSORT
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vicharapusrinu
Warnings : 1

New User


Joined: 04 Dec 2006
Posts: 63
Location: Hyderabad

PostPosted: Mon Sep 15, 2014 6:20 pm
Reply with quote

Hi All,

May I know how I can add sequence number at 8206 th position of my VB file.

My VB file is having max length 8205.

I am using Syncsort.

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

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Sep 15, 2014 6:23 pm
Reply with quote

It is usual practice to insert the sequence number at the start of VB files.
Back to top
View user's profile Send private message
vicharapusrinu
Warnings : 1

New User


Joined: 04 Dec 2006
Posts: 63
Location: Hyderabad

PostPosted: Mon Sep 15, 2014 6:51 pm
Reply with quote

My file(VB) has 8205 length.

When I am trying add sequence number at end/start of the data set it is giving error


Code:
SYSIN :                                                               
  SORT FIELDS=COPY                                                   
  OUTREC FIELDS=(1,4,5:SEQNUM,5,ZD,5,8205)                           
WER276B  SYSDIAG= 283592, 1458670, 1458670, 1169100                   
WER164B  8,792K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,   
WER164B     0 BYTES RESERVE REQUESTED, 920K BYTES USED               
WER146B  104K BYTES OF EMERGENCY SPACE ALLOCATED                     
WER108I  SORTIN   : RECFM=VBM  ; LRECL=  8205; BLKSIZE= 27998         
WER073I  SORTIN   : DSNAME=FNCCSTN.QTRSTMQR.IMF2.OND.G0031V00         
WER230A  OUTREC   FIELD OUTSIDE RANGE                                 
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                         
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE   





Code:
SYSIN :                                                             
  SORT FIELDS=COPY                                                 
  OUTREC FIELDS=(5,8205,8206:SEQNUM,5,ZD),CONVERT                   
WER276B  SYSDIAG= 261968, 2725375, 2725375, 5557425                 
WER164B  8,792K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED, 
WER164B     0 BYTES RESERVE REQUESTED, 920K BYTES USED             
WER146B  104K BYTES OF EMERGENCY SPACE ALLOCATED                   
WER108I  SORTIN   : RECFM=VBM  ; LRECL=  8205; BLKSIZE= 27998       
WER073I  SORTIN   : DSNAME=FNCCSTN.QTRSTMQR.IMF2.OND.G0031V00       
WER230A  OUTREC   FIELD OUTSIDE RANGE                               
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                       
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                       
                 


Thanks
Srini
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Sep 15, 2014 7:08 pm
Reply with quote

Quote:
May I know how I can add sequence number at 8206 th position of my VB file.


adding a field (whatever kind it might be ) at the end of a variable record will make it a FIXED length record of the maximum length,
nullifying the objective of having a VARIABLE length record
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Sep 15, 2014 7:37 pm
Reply with quote

Not sure if it will work as I'm not on a mainfrane at this contract

Instead of
Code:

  SORT FIELDS=COPY                                                   
  OUTREC FIELDS=(1,4,5:SEQNUM,5,ZD,5,8205)


try
Code:

  SORT FIELDS=COPY                                                   
  OUTREC FIELDS=(1,4,5:SEQNUM,5,ZD,10:5)


Fairly sure that by just giving the start position of 5 and no length it will include the data until EOR
Back to top
View user's profile Send private message
vicharapusrinu
Warnings : 1

New User


Joined: 04 Dec 2006
Posts: 63
Location: Hyderabad

PostPosted: Mon Sep 15, 2014 10:05 pm
Reply with quote

Hi Expat

Thanks for your post, it is working fine, but sequence number is coming till 4 th position and 5 th digit is coming as junk. I am expecting 5 digits of sequence number with out any junk value

I have got below output.
Code:
----+----1---
0001!..L
0002!. L
0003!.OL
0004!..L

Thanks
Srini.
Back to top
View user's profile Send private message
mistah kurtz

Active User


Joined: 28 Jan 2012
Posts: 316
Location: Room: TREE(3). Hilbert's Hotel

PostPosted: Tue Sep 16, 2014 3:55 pm
Reply with quote

I got the desired results with the sort card that expat provided. Can you post the complete SYSOUT from your job?
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 -> SYNCSORT

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Store the data for fixed length COBOL Programming 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
Search our Forums:

Back to Top