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 INVALID FIELD OR CONSTANT IN SORTOF ?? Ron Klop DFSORT/ICETOOL 8 Wed Jan 11, 2017 3:44 pm
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 31 Tue Dec 06, 2016 8:04 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm


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