Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Is there any way to initialize a record with filler clause

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
Yuvaraj BP

New User


Joined: 12 Oct 2006
Posts: 12
Location: Bangalore

PostPosted: Sun Feb 04, 2007 10:16 pm    Post subject: Is there any way to initialize a record with filler clause
Reply with quote

Hai all,

Is there any way to nullify the entrapped data in the filler clause, I mean is there any way to initialize a record with filler clause so the the junk data entrapped in the filler cluase can also be nullified appropriately
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Sun Feb 04, 2007 10:25 pm    Post subject: Re: Cobol programming
Reply with quote

Yuvaraj BP wrote:
Is there any way to nullify the entrapped data in the filler clause, I mean is there any way to initialize a record with filler clause so the the junk data entrapped in the filler cluase can also be nullified appropriately
"entrapped data"? are you referring to the the data in working storage represented by the elementary filler item?
In working storage, before populating the record, you can "initialize" the entire record by moving spaces to the group or using the INITIALIZE verb.
If the garbage already exists in a file record, that can be cleaned up also but it will require reading and then writing the record.
Back to top
View user's profile Send private message
Yuvaraj BP

New User


Joined: 12 Oct 2006
Posts: 12
Location: Bangalore

PostPosted: Sun Feb 04, 2007 10:36 pm    Post subject:
Reply with quote

the verb INITIALIZE did not clean the entrapped data in the filler clause, but i cleared only the data in the data declared under the group item.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Sun Feb 04, 2007 10:43 pm    Post subject:
Reply with quote

Yuvaraj BP wrote:
the verb INITIALIZE did not clean the entrapped data in the filler clause, but i cleared only the data in the data declared under the group item.
Yup, I should have looked it up first.... icon_redface.gif
If the filler is PIC X stuff, you could move spaces to the whole thing and then initialize it if you wanted named numeric fields set correctly.

Does that help?
Back to top
View user's profile Send private message
Yuvaraj BP

New User


Joined: 12 Oct 2006
Posts: 12
Location: Bangalore

PostPosted: Sun Feb 04, 2007 10:47 pm    Post subject:
Reply with quote

sorry to ask you, i did not get this particular segment of your suggestion

"if you wanted named numeric fields set correctly."
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Sun Feb 04, 2007 10:51 pm    Post subject:
Reply with quote

Yuvaraj BP wrote:
sorry to ask you, i did not get this particular segment of your suggestion
"if you wanted named numeric fields set correctly."
That is the beauty if the INITIALIZE verb, chacter fields get filled with spaces while numeric fields, comp, comp3 and display, get zeros.
Back to top
View user's profile Send private message
Yuvaraj BP

New User


Joined: 12 Oct 2006
Posts: 12
Location: Bangalore

PostPosted: Sun Feb 04, 2007 10:55 pm    Post subject:
Reply with quote

so can i ask you again, how to initialize the filler clause variables, i am sorry because i could not follow that if you have answered in this thread.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Sun Feb 04, 2007 10:57 pm    Post subject:
Reply with quote

William Thompson wrote:
If the filler is PIC X stuff, you could move spaces to the whole thing.....
In other words, the overall group name....
Back to top
View user's profile Send private message
Yuvaraj BP

New User


Joined: 12 Oct 2006
Posts: 12
Location: Bangalore

PostPosted: Sun Feb 04, 2007 11:04 pm    Post subject:
Reply with quote

thank you,
i will try this, and again, i will meet you, bye
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Tue Feb 06, 2007 8:23 am    Post subject:
Reply with quote

Hi Yuvaraj,

The usual approach is to move spaces to the group level as Bill suggested, then INITIALIZE the group.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm
No new posts Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us