View previous topic :: View next topic
|
Author |
Message |
paul_007
New User
Joined: 03 Aug 2006 Posts: 33 Location: earth
|
|
|
|
i am havin an input file as a PDS menber with lrecl=80 and blksize=80
i converted it to a flat file using FILEAID utility(by JCL) havin lrecl=133 and blksize=27930
the problem is that in output file area from 80 to 133 are not spaces but some junk characters and i want them to be spaces
so how can i create a flat file which is empty(spaces) ?? |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Sort is handy for this, either to overlay the trailing junk or to do the initial convert (correctly). |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi There,
U can use the following sort card for this to make ur file empty one
Code: |
//SYSIN DD *
OPTION COPY
OMIT COND=ALL
/* |
|
|
Back to top |
|
|
paul_007
New User
Joined: 03 Aug 2006 Posts: 33 Location: earth
|
|
|
|
thnx guys for quick reply
@guptae..... do i have to use this control statement in IEBGENER |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
use SORT and OUTREC OVERLAY,
Ekta's job will empty your file, no records at all. I don't thing you want that. |
|
Back to top |
|
|
paul_007
New User
Joined: 03 Aug 2006 Posts: 33 Location: earth
|
|
|
|
Quote: |
use SORT and OUTREC OVERLAY,
Ekta's job will empty your file, no records at all. I don't thing you want that.
|
yes ur r right i tried it ...it is creatin an empty file
actually i dont want to sort the input file, i want the data in input file to be copied as it is in output file with spaces instead of junk |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Paul,
Use this -
Code: |
//SORTSTEP EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=YOUR.IPFILE,DISP=SHR
//SORTOUT DD DSN=YOUR.OPFILE,DISP=....
//SYSIN DD *
SORT FIELDS=COPY
OUTREC OVERLAY=(80:53C' ')
/* |
|
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
paul_007 wrote: |
actually i dont want to sort the input file, i want the data in input file to be copied as it is in output file with spaces instead of junk |
Have you looked at a sort manual, sort can copy without sorting and reformat your output changing the record length and filling the longer record with the characters of your choice. |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
OR YOU CAN USE-
Code: |
//SYSIN DD *
SORT FIELDS=COPY
OUTREC BUILD=(1,80,53X)
/* |
|
|
Back to top |
|
|
paul_007
New User
Joined: 03 Aug 2006 Posts: 33 Location: earth
|
|
|
|
jcl is abending with code S000
following error is generated
SYSIN :
SORT FIELDS=COPY
OUTREC BUILD=(1,80,53X)
*
WER161B ALTERNATE PARM USED
WER268A OUTREC STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000 |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Paul,
Try the one which I had provided. |
|
Back to top |
|
|
paul_007
New User
Joined: 03 Aug 2006 Posts: 33 Location: earth
|
|
|
|
Quote: |
Paul,
Try the one which I had provided. |
Murali,
i tried ur method also getting same error
here is my jcl:
//Togt65s1 JOB (00020,TSTT2KN,10E4),TEST,CLASS=V,
// NOTIFY=T0SPAXD,MSGCLASS=L
//SORTSTEP EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=CDS.TEST.UTILLIB(B7754TST),DISP=SHR
//SORTOUT DD DSN=T2T65S8.TSTMAIL.FILE.TEST,
// DISP=(NEW,CATLG,DELETE),
// UNIT=TST1,
// SPACE=(15476,(150,15),RLSE),
// DCB=(RECFM=FBA,LRECL=133,BLKSIZE=27930,DSORG=PS)
//SYSIN DD *
SORT FIELDS=COPY
OUTREC OVERLAY=(80:53C' ')
/*
// |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Paul,
Your shop is using SYNCSORT. But the commands we had provided was DFSORT ones.
Sorry I dint check your error messages before I did my post earlier |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
The thing is you are using SYNCSORT and we have given control cards for DFSORT.( happens quite frequently on this forum )
If it is just a PDS member then-
Code: |
C ALL 81 133 P'=' ' ' |
This should work for you.
I will recite a dialog from 'Entrapment' (One of my fav movies)
"DONT USE A SWORD TO KILL A MOSQUITO'
Thats what we were doing here. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
paul_007 wrote: |
jcl is abending with code S000 |
Have you looked at you sort manual for the proper format of the OUTREC?
OUTREC FIELDS=(1,80,53X) |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
agkshirsagar wrote: |
If it is just a PDS member then-
Code: |
C ALL 81 133 P'=' ' ' |
This should work for you. |
Isn't that a bit difficult to do when the PDS member has an lrecl of 80? |
|
Back to top |
|
|
paul_007
New User
Joined: 03 Aug 2006 Posts: 33 Location: earth
|
|
|
|
//SYSIN DD *
SORT FIELDS=COPY
C ALL 81 133 P'=' ' '
/*
so this is how i shud put control card |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
William Thompson wrote: |
agkshirsagar wrote: |
If it is just a PDS member then-
Code: |
C ALL 81 133 P'=' ' ' |
This should work for you. |
Isn't that a bit difficult to do when the PDS member has an lrecl of 80? |
Did I sound like I want to edit PDS member itself..?
We were giving solution considering it a FLAT file with LRECL=133
What I meant is, content of this flat file will be of a PDS member.
Genarally PDS members are relatively small in size.. agree?, we can open it in edit mode easily.
so open flat file in edit mode and give that command.
Hope I made it clear this time. |
|
Back to top |
|
|
paul_007
New User
Joined: 03 Aug 2006 Posts: 33 Location: earth
|
|
|
|
thr is some confusion it seems:
i will tell u my complete requirements:
there is an i/p file(pds mem) lrecl 80 blksize 80
i want to convert to flat file of lrecl 133 and blksize 27930
and this output file have to be used immediately in next step after this conversion so i cant do it manually
so i have 2 methods in my mind
1) create the output file and somehow remove junk in area between 80 to 133
2)first create an empty file having spaces completely of lrecl 133 and then copy into it
i guess first method is not workin for me
so cud u pls tell me how can i create an empty file of lrecl 133 and blksize 27930 |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
Code: |
//SORTSTEP EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=DPDS.my(member),DISP=SHR
//SORTOUT DD DSN=Dflat.OPFILE,DISP=(NEW,CATLG,DELETE),
// LRECL=133,BLKSIZE=27930
//SYSIN DD *
SORT FIELDS=COPY
OUTREC FIELDS=(1,80,53X)
|
This works in SYNCSORT too, just change BUILD TO FIELDS as suggested by Bill. Did you give this a try? |
|
Back to top |
|
|
|