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
 

 

How to update Trailer count for a VB File

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
manas121

New User


Joined: 05 Jan 2012
Posts: 15
Location: India

PostPosted: Tue Oct 13, 2015 10:09 pm    Post subject: How to update Trailer count for a VB File
Reply with quote

Hi All,

There is a VB File of Length 2048 Bytes. In Trailer Record, From 52-56 Position in below given code (I am not refering 4 bytes padding which usually present in start of each record in VB File), Trailer count is present.

Code:

=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
013614   LNTA600  OMDSEORD   l   k êÌ      MDSE ORDER DATA
       FFDDECFFF44DDCECDDC11091109157013000DCEC4DDCCD4CCEC000324444444444444444
       FF35316000064425694505350421284660014425069459041310005C0000000000000000
-------------------------------------------------------------------------------


Currently Record count is 13612 (Without Header and Trailer).On Position 55, The Hex Value '352C' is equivalent to 13612.

In a sort processing, 10 records have been removed (Header and Trailer still Exists). So now Total 13602 Records are present (Without header and Trailer). How to update the Trailer count 13602 on 52 - 56 Position by SORT Utility.

Thanks a lot.
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Tue Oct 13, 2015 10:58 pm    Post subject: Reply to: How to update Trailer count for a VB File
Reply with quote

Have you looked at IFTRAIL on OUTFIL?
Back to top
View user's profile Send private message
RahulG31

Active User


Joined: 20 Dec 2014
Posts: 331
Location: USA

PostPosted: Tue Oct 13, 2015 11:02 pm    Post subject: Reply to: How to update Trailer count for a VB File
Reply with quote

This seems to be a straightforward case of updating a trailer record.

Use IFTRAIL and TRLUPD and please spend some time in reading the DFSORT documentation.

.
Back to top
View user's profile Send private message
manas121

New User


Joined: 05 Jan 2012
Posts: 15
Location: India

PostPosted: Tue Oct 13, 2015 11:18 pm    Post subject: Re: Reply to: How to update Trailer count for a VB File
Reply with quote

Bill Woodger wrote:
Have you looked at IFTRAIL on OUTFIL?


Yes Bill. I have looked.

Actually The Trailer and Header record structure are almost same except on Position 27:

Header:

Code:

  LNTA600  OMDSEORD   l     êÌ      MDSE ORDER DATA
00DDECFFF44DDCECDDC11090000157013120DCEC4DDCCD4CCEC00000
00353160000644256945053000012846650044250694590413100000


Trailer

Code:

  LNTA600  OMDSEORD   l   k êÌ      MDSE ORDER DATA
FFDDECFFF44DDCECDDC11091109157013000DCEC4DDCCD4CCEC00032
FF35316000064425694505350421284660014425069459041310005C


I tried a code with OUTFIL, IFTRAIL, TRLID, TRLUPD condition but it was not working. I am trying to understand these concepts in more details. Could you please help me out how to write Sortcard for above situation.

Thanks a lot.
Back to top
View user's profile Send private message
RahulG31

Active User


Joined: 20 Dec 2014
Posts: 331
Location: USA

PostPosted: Tue Oct 13, 2015 11:36 pm    Post subject: Reply to: How to update Trailer count for a VB File
Reply with quote

Quote:
Actually The Trailer and Header record structure are almost same except on Position 27

Then why don't you make use of this condition in identifying trailer?

.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Tue Oct 13, 2015 11:37 pm    Post subject: Reply to: How to update Trailer count for a VB File
Reply with quote

Can you show what you tried and explain what about it didn't work?
Back to top
View user's profile Send private message
manas121

New User


Joined: 05 Jan 2012
Posts: 15
Location: India

PostPosted: Wed Oct 14, 2015 11:29 pm    Post subject: Re: Reply to: How to update Trailer count for a VB File
Reply with quote

Bill Woodger wrote:
Can you show what you tried and explain what about it didn't work?


Hi Bill,

While testing the IFTRAIL Sort card, Today I got to know that instead of DFSORT, SYNCSORT is installed on the Prod Environment where i need to implement it. Actually in Test region, DFSORT is installed and in production, SYNCSORT is installed. Now I am trying to find it out how to achive the desired result by SYNCSORT.

Thanks.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

PostPosted: Thu Oct 15, 2015 2:14 am    Post subject:
Reply with quote

Why don't you type 'Update trailer count on vb file syncsort' in a Google and find tons of ways to do it? Please try.
Quote:

Actually in Test region, DFSORT is installed and in production, SYNCSORT is installed

why for?
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Thu Oct 15, 2015 3:05 am    Post subject: Reply to: How to update Trailer count for a VB File
Reply with quote

Well, that's an odd, pointless and potentially dangerous thing to do. It means, effectively, you are putting your SORT Control Cards into Production untested. Mention that to your boss, please.

You can try IFTRAIL in SyncSORT if you are up-to-date. Sometimes things are implemented but not documented.

If that fails (probably will, I don't know) then add a sequence number to each record and when you identify the trailer, subtract two from the sequence number, giving you your trailer count. You'll need to drop off the sequence number.

For a variable-length record, you need to add the sequence number at the beginning of each record, BUILD=(1,4,SEQNUM,2,BI,5) and to strip it later, BUILD=(1,4,7).
Back to top
View user's profile Send private message
manas121

New User


Joined: 05 Jan 2012
Posts: 15
Location: India

PostPosted: Tue Nov 03, 2015 5:59 pm    Post subject: Re: Reply to: How to update Trailer count for a VB File
Reply with quote

Bill Woodger wrote:
Well, that's an odd, pointless and potentially dangerous thing to do. It means, effectively, you are putting your SORT Control Cards into Production untested. Mention that to your boss, please.

You can try IFTRAIL in SyncSORT if you are up-to-date. Sometimes things are implemented but not documented.

If that fails (probably will, I don't know) then add a sequence number to each record and when you identify the trailer, subtract two from the sequence number, giving you your trailer count. You'll need to drop off the sequence number.

For a variable-length record, you need to add the sequence number at the beginning of each record, BUILD=(1,4,SEQNUM,2,BI,5) and to strip it later, BUILD=(1,4,7).



Thanks a lot Bill. As per your suggestion, i created below given sortcard and worked fine.

Code:

SORT FIELDS=COPY
  INREC  IFTHEN=(WHEN=INIT,BUILD=(1,4,SEQNUM,2,BI,5)),
         IFTHEN=(WHEN=(7,2,CH,EQ,X'FFFF'),
                 OVERLAY=(61:5,2,BI,SUB,+2,BI,LENGTH=2))
  OUTREC BUILD=(1,4,7)
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Tue Nov 03, 2015 6:39 pm    Post subject: Reply to: How to update Trailer count for a VB File
Reply with quote

Bear in mind that this means you have a limited number of records which can appear on the file. You can double the limit with FI instead of BI, but otherwise you'll have to increase the size of the count field if you can have more than 32k-1 or 64k-1 records.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts -913/-911 Deadlock during UPDATE stat... NoSleep319 DB2 5 Fri Nov 18, 2016 12:37 am
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm


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