INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Converting VB to FB Using MVS

Converting VB to FB Using MVS

(OP)
Hello ...

I hope I am posting to the right forum and someone here can help.

I am trying to block a VB data set to FB, but the JCL I'm using (using both DFSORT and File-AID), but neither seems to perform the function I am looking for.

My input file is a variable length data set where the data starts in position 5 and ends in position 82.  The RDW is written in bytes 1-4 of the record.  Here is he sample format of my data:


CODE

   DATA 1             DATA 2             DATA 3             DATA 4             DATA 5             
BR*----------------*R*----------------*R*----------------*R*----------------*R*----------------*

The RDW (indicated as R in the example above), is after the first 82 bytes for 4 bytes, then the next set of data is written on the same record.  There are 49 sets of data per record.  I shortened the example above from 82 byte lengths.

Here is the JCL I've tried:

CODE

//S1     EXEC  PGM=SORT                               
//SYSOUT DD    SYSOUT=*                               
//SORTIN DD    DSN=MYINPUTFILE,       
//             DISP=SHR                               
//FBOUT  DD    DSN=MYOUTPUTFILE.FBOUT,
//             DISP=(NEW,CATLG,DELETE),               
//             UNIT=3390,SPACE=(CYL,(5,5))            
//SYSIN  DD    *                                      
  OPTION COPY                                         
  OUTFIL FNAMES=FBOUT,VTOF,OUTREC=(5,77)           
/*
                                                 

I have also tried this approach:

CODE

//FASTEP  EXEC PGM=FILEAID,REGION=0M                   
//SYSPRINT DD  SYSOUT=*                                 
//SYSLIST  DD  SYSOUT=*                                 
//DD01     DD  DSN=MYINPUTFILE,
//             DISP=SHR
//DD01O    DD  DSN= MYOUTPUTFILE.FBOUT,
//             DISP=(,CATLG,DELETE),                    
//             UNIT=RESDA,SPACE=(CYL,(500,100),RLSE),   
//             DCB=(RECFM=FB,LRECL=48,BLKSIZE=480)      
//SYSIN    DD  *                                        
$$DD01 USER MOVE=(1,82,5),                              
            MOVE=(1,82,87),                             
            MOVE=(1,82,169),                            
            MOVE=(1,82,251),                            
            MOVE=(1,82,333),                            
            MOVE=(1,82,415),                            
            MOVE=(1,82,497),                            
            MOVE=(1,82,579),                            
            MOVE=(1,82,661),                            
            MOVE=(1,82,743),                            
            MOVE=(1,82,825),                            
            MOVE=(1,82,907),
            MOVE=(1,82,989),
            MOVE=(1,82,1071),
            MOVE=(1,82,1153),
            MOVE=(1,82,1235),
            MOVE=(1,82,1317),
            MOVE=(1,82,1399),
            MOVE=(1,82,1481),
            MOVE=(1,82,1563),
            MOVE=(1,82,1645),
            MOVE=(1,82,1727),
            MOVE=(1,82,1809),
            MOVE=(1,82,1891),
            MOVE=(1,82,1973),
            MOVE=(1,82,2055),
            MOVE=(1,82,2137),
            MOVE=(1,82,2219),
            MOVE=(1,82,2301),
            MOVE=(1,82,2383),
            MOVE=(1,82,2465),
            MOVE=(1,82,2547),
            MOVE=(1,82,2629),
            MOVE=(1,82,2711),
            MOVE=(1,82,2793),
            MOVE=(1,82,2875),           
            MOVE=(1,82,2957),           
            MOVE=(1,82,3039),           
            MOVE=(1,82,3121),           
            MOVE=(1,82,3203),           
            MOVE=(1,82,3285),           
            MOVE=(1,82,3367),           
            MOVE=(1,82,3449),           
            MOVE=(1,82,3531),           
            MOVE=(1,82,3613),           
            MOVE=(1,82,3695),           
            MOVE=(1,82,3777),           
            MOVE=(1,82,3859),           
            MOVE=(1,82,3941),WRITE=DD01O
/*
                                      

The last approach works for the first set of data, but it only seems to have written the last DATA 5 block to my output.
My end result would look something like:

Input file:

CODE

   DATA 1             DATA 2             DATA 3             DATA 4             DATA 5             
BR*----------------*R*----------------*R*----------------*R*----------------*R*----------------*
Output file:

CODE

Data 1 (record 1) on Record 1
Data 2 (record 1) on Record 2
Data 3 (record 1) on Record 3
Data 4 (record 1) on Record 4
Data 5 (record 1) on Record 5
Data ...
Data 49 (record 2) on Record 49

Advance to next record and repeat:

Data 1 (record 2) on Record 50
Data 2 (record 2) on Record 51
Data 3 (record 2) on Record 52
Data 4 (record 2) on Record 53
Data 5 (record 2) on Record 54
Data ...
Data 49 (record 2) on Record 99

Advance to next record and repeat:

Data 1 (record 3) on Record 100
Data 2 (record 3) on Record 101
Data 3 (record 3) on Record 102
Data 4 (record 3) on Record 103
Data 5 (record 3) on Record 104
Data ...
Data 49 (record 3) on Record 149

Continue until all records have been read.
I would appreciate any feedback or assistance anyone could provide.

Thank you!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close