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
 

 

Having record length in first 2 bytes of a VB file

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

New User


Joined: 26 Apr 2005
Posts: 87
Location: Hyderabad

PostPosted: Wed Aug 21, 2013 5:37 pm    Post subject: Having record length in first 2 bytes of a VB file
Reply with quote

Dear Friends,

I do have a requirement that I need to have the record length of every record in a VB file in first 2 bytes with the actual record preceeding that, copied to another VB file.

Is this possible in SORT?

Thanks for your time.

Regards
Tanden
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Aug 21, 2013 6:37 pm    Post subject:
Reply with quote

Unless I am mistaken,

The record length is always in the first two bytes of a VB record.
Using sort, the record length is pos 1 len 2 format BI

Or perhaps you want something different ???
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Wed Aug 21, 2013 6:56 pm    Post subject: Reply to: Having record length in first 2 bytes of a VB file
Reply with quote

Can you run this and post the sysout from the step in the Code tags, please.

Code:
//S1 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN DD *
Nothing to do with the solution, just for your SORT level
/*
//SORTOUT DD DUMMY
//SYSIN   DD   *
  OPTION COPY
/*


Also please show a small example input and expected output.

It is not clear exactly what you want.
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Wed Aug 21, 2013 7:36 pm    Post subject:
Reply with quote

Is this for Microfocus load files by any chance?

I have to do the same thing for all of the Filemanager unloads on the mainframe. This is what I use:

Code:
//SYSIN     DD *                                   
 SORT FIELDS=COPY                                 
 OUTFIL OUTREC=(1,4,1,2,BI,SUB,+2,TO=BI,LENGTH=2,5)


It takes the first two byes in a VB file, subtracts 2 from that number, then put the answer as the first two "real" bytes int he output record, then it takes the rest of the data and adds it to the output record.

If you don't need to subtract two bytes, then make it like:
Code:
//SYSIN     DD *                                   
 SORT FIELDS=COPY                                 
 OUTFIL OUTREC=(1,4,1,2,5)


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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Wed Aug 21, 2013 9:43 pm    Post subject: Reply to: Having record length in first 2 bytes of a VB file
Reply with quote

Yes, Ed. The only difficulty is in exactly what this (emphasis added) means...

Quote:
I need to have the record length of every record in a VB file in first 2 bytes with the actual record preceeding that
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Wed Aug 21, 2013 10:37 pm    Post subject:
Reply with quote

Count the actual record bytes with imaginary numbers? icon_smile.gif
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 CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


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