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
 

 

Initializing the 01 LEVEL field, filler also initialized

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Satheeshkumar

New User


Joined: 20 Feb 2009
Posts: 51
Location: Chennai

PostPosted: Tue Mar 31, 2009 12:16 pm    Post subject: Initializing the 01 LEVEL field, filler also initialized
Reply with quote

Currently our program writes the output file. The layout for the file was

Code:
01  WS-INTL-REPORT.                           
    05 IP-SEQUENCE-NUM               PIC 9(03).
    05 IP-TRANS-DT                   PIC X(09).
    05 IP-ACTION                     PIC X(04).

As we want to insert comma after every field. We cahanged the layout to

Code:
01  WS-INTL-REPORT.                           
    05 IP-SEQUENCE-NUM               PIC 9(03).
    05 FILLER                             PIC X(1) VALUE ','
    05 IP-TRANS-DT                   PIC X(09).
    05 FILLER                             PIC X(1) VALUE ','
    05 IP-ACTION                     PIC X(04). 

while initializing the 01 LEVEL field the filler also initialized with space. We cannot each field sperately sicnce we have 50 fields. Can any one help me out

Edited: Please use BBcode when You post some code/error, that's rather readable, Thanks... Anuj
Back to top
View user's profile Send private message

Succor

New User


Joined: 20 Feb 2009
Posts: 96
Location: Bangalore :)

PostPosted: Tue Mar 31, 2009 1:44 pm    Post subject: Reply to: Initializing the 01 LEVEL field, filler also initi
Reply with quote

Satheesh,
I am not sure ,why it is happening in this case. The fillers do retain their initial values even after being initialized.

Probably you can create a equivalent structure as that of WS-INTL-REPORT with spaces (for char) , "," for fillers and zeroes for numeric. Do not initialize it .
And move this to your initial storage( WS-INTL-REPORT)whenever required to initialize. Its just a workaround and also not an efficient way to achieve what you want.

WTF
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Mar 31, 2009 2:36 pm    Post subject: Re: Initializing the 01 LEVEL field, filler also initialized
Reply with quote

Satheeshkumar wrote:
while initializing the 01 LEVEL field the filler also initialized with space.
I do not agree, please show us the code...
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Mar 31, 2009 3:54 pm    Post subject:
Reply with quote

in what SECTION of your program is <01 WS-INTL-REPORT> defined?

are your 'VALUE' clauses receiving any kind of error/info msg in the compile listing?
Back to top
View user's profile Send private message
Jose Villafranca

New User


Joined: 12 Nov 2008
Posts: 4
Location: Monterrey

PostPosted: Thu Apr 02, 2009 2:23 am    Post subject:
Reply with quote

Try ending it with POINTS
05 FILLER PIC X(1) VALUE ',' . <---
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am
No new posts 2 byte YEAR from Y'DATE2' field tecnokrat DFSORT/ICETOOL 2 Tue Feb 07, 2017 12:05 pm
No new posts Sort two file having same field, one ... himanshu malik DFSORT/ICETOOL 7 Thu Feb 02, 2017 10:09 am


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