View previous topic :: View next topic
|
Author |
Message |
BRKS
New User
Joined: 20 Apr 2007 Posts: 14 Location: pune
|
|
|
|
Hi friends,
I have a file of LRECL=412 and RECFM=VB i want to copy the data from postion 13 to 412 and the ouput file should be in the FB format.
I tried using the SORT but it is not supporting when i am changing the output file format to FB it is throwing the error.
Regards,
BRKS. |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
BRKS,
This was discussed earlier. Whyd dont you search the forum? |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
BRKS,
As suggested, please search this forum using the Keyword VTOF. |
|
Back to top |
|
|
BRKS
New User
Joined: 20 Apr 2007 Posts: 14 Location: pune
|
|
|
|
Hi murmohk1
in that it was gvien for the two files using ICETOOL but in my case i am using one file
Reagrds,
BRKS |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi,
Try something like this..
Code: |
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=A123456.VBIN,DISP=SHR
//FBOUT DD DSN=A123456.FBOUT,DISP=(NEW,CATLG,DELETE),
// UNIT=3390,SPACE=(CYL,(5,5))
//SYSIN DD *
OPTION COPY
OUTFIL FNAMES=FBOUT,VTOF,OUTREC=(17,416)
/* |
|
|
Back to top |
|
|
BRKS
New User
Joined: 20 Apr 2007 Posts: 14 Location: pune
|
|
|
|
Hi Anuj,
I have tried with you JCL , i am getting the following Error
Code: |
ICE143I 0 BLOCKSET COPY TECHNIQUE SELECTED
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AN
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 00:00 ON TUE DEC
OPTION COPY
OUTFIL FNAMES=SORTOUT,VTOF,OUTREC=(13,396)
ICE201I E RECORD TYPE IS V - DATA STARTS IN POSITION 5
ICE226A 0 SORTOUT : BLKSIZE = 27998 IS INVALID (LRECL = 400)
ICE751I 0 C5-K26318 C6-K90007 C7-K90000 C8-K23476 E9-K90007 E7-K24705
ICE052I 3 END OF DFSORT
|
after adding the RDW also i am getting the same error as follows
Code: |
ICE143I 0 BLOCKSET COPY TECHNIQUE SELECTED
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AN
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 00:00 ON TUE DEC
OPTION COPY
OUTFIL FNAMES=SORTOUT,VTOF,OUTREC=(1,4,13,396)
ICE201I E RECORD TYPE IS V - DATA STARTS IN POSITION 5
ICE226A 0 SORTOUT : BLKSIZE = 27998 IS INVALID (LRECL = 400)
ICE751I 0 C5-K26318 C6-K90007 C7-K90000 C8-K23476 E9-K90007 E7-K24705
ICE052I 3 END OF DFSORT |
|
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Anuj,
Code: |
OUTFIL FNAMES=FBOUT,VTOF,OUTREC=(17,416) |
The actual data starts from position 5 in a VB file and hence the outrec should be OUTREC=(5,X) where X is the VB record length.
BRKS,
Quote: |
after adding the RDW also i am getting the same error as follows
|
Why did you add the RDW? noi point in adding the RDW in the output FB file.
For VB to FB conversion check the DFSORT trick topic "VB to FB conversion" at
www.ibm.com/servers/storage/support/software/sort/mvs/tricks/ |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
BRKS,
The below JCL converts a VB of LRECL 412 to FB of LRECL 408.
Code: |
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN= .VB.VB,DISP=SHR
//FBOUT DD DSN= .FBOUT,DISP=(NEW,CATLG,DELETE)
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FNAMES=FBOUT,VTOF,OUTREC=(5,408)
/*
|
What should be your final LRECL? You can add a step after this to write the data from 13 till 412.
Found a typo in my earlier post
Quote: |
The actual data starts from position 5 in a VB file and hence the outrec should be OUTREC=(5,X) where X is the VB record length.
|
Read it as X = (VB LRECL - 4) |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
BRKS,
Here's a DFSORT job that will do what you asked for. I assumed that when you said position 13, you meant data position 13 which would be starting position 17 when you count the RDW in positions 1-4. If you really meant starting position 13 counting the RDW then, change the job accordingly.
DO NOT specify any DCB attributes for the SORTOUT file ... let DFSORT set them automatically.
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file (VB/412)
//SORTOUT DD DSN=... output file (FB/396)
//SYSIN DD *
OPTION COPY
OUTFIL VTOF,BUILD=(17,396)
/*
|
|
|
Back to top |
|
|
BRKS
New User
Joined: 20 Apr 2007 Posts: 14 Location: pune
|
|
|
|
Thanks frank,
It solved my problem |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi Aaru,
Quote: |
i want to copy the data from postion 13 to 412 and the ouput file should be in the FB format. |
Due to this I've started from position 17 in my sort card. But was stupid enough in calculating the length |
|
Back to top |
|
|
Binaya
New User
Joined: 03 Jul 2007 Posts: 77 Location: Hyderabad
|
|
|
|
Hi Frank,
Is the BUILD=(17,416) instead of BUILD=(17,396).
Regards. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi,
What did you try? Was there any error message?
It should be BUILD=(17,396) as per the information from your previous post.
Quote: |
13 to 412 and the ouput file should be in the FB format. |
412- 12 = 400 (because you want output from position 13 of input)
400- 4 = 396 (minus four ..because of RDW) |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
Hi Frank,
Is the BUILD=(17,416) instead of BUILD=(17,396). |
396 is correct for the original poster's requirement. |
|
Back to top |
|
|
|