Need one sort card



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Need one sort card

Postby vgupta54 » Fri May 08, 2009 5:25 pm

I have one VB file of 256 LRECL. I have to copy the data in another FB file with 98 LRECL.

Ex:
File 1 data:
gdfd dfgdf
fgd dfdfdf
fdgfh dgfj

So I need file 2 data:
gdfd d
fgdffg
d dfdf
dffdgf
h dgfj
vgupta54
 
Posts: 7
Joined: Fri Apr 17, 2009 11:45 am
Has thanked: 0 time
Been thanked: 0 time

Re: Need one sort card

Postby Frank Yaeger » Fri May 08, 2009 9:19 pm

Your example doesn't make much sense, but here's a DFSORT job that will do what you asked for in your description.

//S1    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (VB/256)
//SORTOUT DD DSN=...  output file (FB/98)
//SYSIN    DD    *
  OPTION COPY
  OUTFIL VTOF,BUILD=(5,98)
/*


For more information, see the "VB to FB conversion" Smart DFSORT Trick at:

http://www.ibm.com/systems/support/stor ... vs/tricks/
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: Need one sort card

Postby dick scherrer » Sat May 09, 2009 12:52 am

Hi Frank,

I may be way off, but i believe the goal is to "slice" off 98 bytes of data in the 256 lrecl file and then start the next 98 byte output starting with pos 99. When the "end" of a 256-byte record is reached, the last 46 bytes should start the next 98-byte record and the first bytes of the next 256-byte record should be appended so there are no breaks between byte 256 of the first record and byte 1 of the second record. . . Whew. . .

As i mentioned, i may be way off, but looking at the abbreviated sample data. . . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Need one sort card

Postby vgupta54 » Sat May 09, 2009 1:22 am

Hi Frank ,
Thanks for help but Dick Scherrer is on the right way . I need the o/p in the same way that Dick has suggested.
vgupta54
 
Posts: 7
Joined: Fri Apr 17, 2009 11:45 am
Has thanked: 0 time
Been thanked: 0 time

Re: Need one sort card

Postby Frank Yaeger » Sat May 09, 2009 2:38 am

Wow, I sure didn't get that from the original post.

Are the VB input records really all 256 bytes long or can some of them be shorter than 256 bytes?
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: Need one sort card

Postby vgupta54 » Sun May 10, 2009 10:09 am

Yes they have 256bytes long for all input records.......
vgupta54
 
Posts: 7
Joined: Fri Apr 17, 2009 11:45 am
Has thanked: 0 time
Been thanked: 0 time


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post