IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Removing junk characters from a dataset.


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kalais

New User


Joined: 18 Apr 2006
Posts: 22

PostPosted: Fri Aug 24, 2007 3:53 pm
Reply with quote

Hi,

I need to remove the junk characters from a dataset which opens in browse mode only. I could not do it in REXX using ISREDIT as it is not opening in EDIT mode.
The command we are using in MACRO is
"CHANGE P'.' ' ' ALL"

Is there any way in COBOL for doing this?


Thanks,
Kalai
Back to top
View user's profile Send private message
shreevamsi

Active User


Joined: 23 Feb 2006
Posts: 305
Location: Hyderabad,India

PostPosted: Fri Aug 24, 2007 3:59 pm
Reply with quote

You need to initiliaze before writing to output file.
Back to top
View user's profile Send private message
kalais

New User


Joined: 18 Apr 2006
Posts: 22

PostPosted: Fri Aug 24, 2007 4:06 pm
Reply with quote

Ya I tried it. It doesnt work as the input file itself contains the junk values.

Thanks,
Kalai
Back to top
View user's profile Send private message
shreevamsi

Active User


Joined: 23 Feb 2006
Posts: 305
Location: Hyderabad,India

PostPosted: Fri Aug 24, 2007 4:11 pm
Reply with quote

OK,

Check out the offset where ur getting the Junt value. U can more spaces in those offset. For this u don't need to write a cobol pgm but a simple sort will do.

~Vamsi
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Aug 24, 2007 4:37 pm
Reply with quote

what exactly is the situation? What is the source of this dataset? Why is it that you want to remove the non-display (P'.') char? How large is the dataset, what is the lrecl?

depending upon what,where,how and why there are many things that can be done. But, if you open a dataset in browse, witiswyg (what is there is what you get).

Can you open in VIEW mode, then an edit macro (or a simple chgall) can replace the non-display char. The nice thing about VIEW is that you can not accidently SAVE; you can only REPLACE, which would require intention.

you could also process the dataset with a REXX Script (invoke the rexx script which would massage the dataset, outputing to a temp ds which the rexx could invoke a browse).
Back to top
View user's profile Send private message
kalais

New User


Joined: 18 Apr 2006
Posts: 22

PostPosted: Fri Aug 24, 2007 5:35 pm
Reply with quote

The dataset contains junk values at random positions. So I can not use SORT to remove it. Also I could not able to open in VIEW mode.

I need to load a table using this dataset , So I need to remove unwanted chatacters.


Sample data in Browse mode, Where the dots gets displayed in the place of a junk value.

MOVE '.........00001 ' TO DFHEIV0
[b]<some data>

MOVE '..}............00001 ' TO DFHEIV0[/b]


Thanks,
Kalai
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Aug 24, 2007 5:47 pm
Reply with quote

that looks like post compiled CICS API's. Why are you moving a compiler listing to a table? What are you doing?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Allocated cylinders of a dataset DB2 12
Search our Forums:

Back to Top