View previous topic :: View next topic
|
Author |
Message |
vicharapusrinu Warnings : 1 New User
Joined: 04 Dec 2006 Posts: 63 Location: Hyderabad
|
|
|
|
Hi
I have coped data from SORTIN to SORTOUT with some conditions, data is copied as per the my conditions, BUT
I have noticed that in SORTOUT there is extra space/values(I am able to see value 4040404040404040.... if I do HEX ON on output file.) after completion of the record etch record till end of the file,
these values (4040404040404040.... if I do HEX ON) is not there in SORTIN,
what extra condition I have to code (if i don't want 4040404040404040.... if I do HEX ON)
would you help me out please?
Regards,
Srini |
|
Back to top |
|
|
sureshpathi10
Active User
Joined: 03 May 2010 Posts: 158 Location: Kuala Lumpur
|
|
|
|
Basically 40 is the hex value for SPACE.
It would be better to help you further if you post your code here. |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
As suresh said , It would be great if you could paste your code here.
Also let us know the LRECL for input & output files |
|
Back to top |
|
|
vicharapusrinu Warnings : 1 New User
Joined: 04 Dec 2006 Posts: 63 Location: Hyderabad
|
|
|
|
Hi All,
PFB code which is adding spaces at end of every record.
Code: |
SORT FIELDS=COPY
OUTFIL IFTHEN=(WHEN=INIT,
BUILD=(1:1,303)),
IFTHEN=(WHEN=((10,2,ZD,EQ,71),AND,(85,8,ZD,EQ,20140606)),
OVERLAY=(236:C'Y'))
OPTION DYNALLOC
END |
[/img][/b][/code] |
|
Back to top |
|
|
vicharapusrinu Warnings : 1 New User
Joined: 04 Dec 2006 Posts: 63 Location: Hyderabad
|
|
|
|
Input file is ISAM file.
Regards,
Srini |
|
Back to top |
|
|
sureshpathi10
Active User
Joined: 03 May 2010 Posts: 158 Location: Kuala Lumpur
|
|
|
|
You haven't given us LRECL for input & output files. |
|
Back to top |
|
|
vicharapusrinu Warnings : 1 New User
Joined: 04 Dec 2006 Posts: 63 Location: Hyderabad
|
|
|
|
LRECL of input file is 299, and the same also expected in out put, here I am getting problem with padding of spaces at end of etch record in output file.
May I know how I can add image? unfortunately- I am having sort card, input file, output file is in image format only |
|
Back to top |
|
|
sureshpathi10
Active User
Joined: 03 May 2010 Posts: 158 Location: Kuala Lumpur
|
|
|
|
Input file LRECL is 299, but in your sort card
SO, What happens to the data from 300 to 303 ?
What is the LRECL specified for output file in the JCL ? |
|
Back to top |
|
|
vicharapusrinu Warnings : 1 New User
Joined: 04 Dec 2006 Posts: 63 Location: Hyderabad
|
|
|
|
I am treating it as VB(299+4RDW digits), I am able over riding at 234th(with OVERLAY=(236:C'Y'))) position, but I am getting problem with padding of spaces at end of etch record. |
|
Back to top |
|
|
vicharapusrinu Warnings : 1 New User
Joined: 04 Dec 2006 Posts: 63 Location: Hyderabad
|
|
|
|
I have used LIKE para meter in output file, so that it will properties of input file |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Remove the IFTHEN=(WHEN=INIT with the BUILD. It is making all your records fixed-length, and will pad with space. Are any of the records you are OVERLAYing shorter than that column value? |
|
Back to top |
|
|
vicharapusrinu Warnings : 1 New User
Joined: 04 Dec 2006 Posts: 63 Location: Hyderabad
|
|
|
|
I am trying to replace value in 236, but total length of the IAM file is 303(here I have included RDW values while giving positions)
would you please give sort card for the same |
|
Back to top |
|
|
vicharapusrinu Warnings : 1 New User
Joined: 04 Dec 2006 Posts: 63 Location: Hyderabad
|
|
|
|
Quote: |
Are any of the records you are OVERLAYing shorter than that column value? |
----- YES |
|
Back to top |
|
|
vicharapusrinu Warnings : 1 New User
Joined: 04 Dec 2006 Posts: 63 Location: Hyderabad
|
|
|
|
I am OK, If I will get solution in 3 or 4 steps also...
Regards,
Srini. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
If you are happy extending any short records which meet your criteria, then this should do:
Code: |
OPTION DYNALLOC,COPY
INREC IFTHEN=(WHEN=((10,2,ZD,EQ,71),AND,(85,8,ZD,EQ,20140606)),
OVERLAY=(236:C'Y')) |
If you don't want to have the Y on any short records:
Code: |
OPTION DYNALLOC,COPY
INREC IFTHEN=(WHEN=((1,2,BI,GE,236), * Checking the record-length
AND,
(10,2,ZD,EQ,71),
AND,
(85,8,ZD,EQ,20140606)),
OVERLAY=(236:C'Y')) |
Since there is only one thing to do, I can't see how to do it in two or more steps.
If this is not want you want, you need to describe what you do want more clearly. |
|
Back to top |
|
|
vicharapusrinu Warnings : 1 New User
Joined: 04 Dec 2006 Posts: 63 Location: Hyderabad
|
|
|
|
Thanks a lot Bill Woodger, it is working fine !!!!!
May I know how I can add/post image, (All my sortcard ,I/P,O/P will be in image format, it will help me for next posts)
Thanks a lot for all, for your kind support.
Regards,
Srini |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
If you mean the Code tags, click on the Quote button in the top right of a post which is Coded and you will see how it is done.
Above the Post a reply box you will see a lot of buttons. Highlight some text, click a button, is the easiest way.
Please do not post actual images if that is what you mean. Just copy/paste from your emulator screen, and Code the text pasted into the box. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
May I know how I can add/post image, (All my sortcard ,I/P,O/P will be in image format, it will help me for next posts) |
To repeat what Bill has said:
Attached images/screen shots waste space and do not work well.
Using copy/paste and the Code tag will give the appearance Very similar to the scree. To see how your post will appear, use the Preview. Make changes as needed and when the post looks as you want it, Submit. |
|
Back to top |
|
|
|