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
 

 

loading data into cobol table from the input seq.file

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

New User


Joined: 09 Dec 2005
Posts: 17
Location: Tirupathi

PostPosted: Thu Dec 06, 2007 1:53 pm    Post subject: loading data into cobol table from the input seq.file
Reply with quote

Hi All,

I have the following seq.file to read and load into the table. i have to construct the table as same as my input file below.

A[;]B[;]LIA[;]LIA_TY[;]LIA_DES[;]LIA_LBL1[;]LIA_LBL2[;].......Z[;]

1[;]12[;]3[;]45[;]21[;]20[;]5[;].......2[;].

A,B,LIA,LIA_TY....Z are the variables and this [;] will seperate each variable.

1, 12, 3----------2 are the values for my variables.

Colud anyone please give me the sample code??


Regards
Nitya
Back to top
View user's profile Send private message

Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 788
Location: Chennai, India

PostPosted: Thu Dec 06, 2007 2:59 pm    Post subject:
Reply with quote

What is the REC LEN and how many fields are there in a Record?

Do you want to load entire file into COBOL table?
Back to top
View user's profile Send private message
nitya
Warnings : 2

New User


Joined: 09 Dec 2005
Posts: 17
Location: Tirupathi

PostPosted: Thu Dec 06, 2007 3:53 pm    Post subject:
Reply with quote

hi,

i Have 129 variables in my seq.file and i want to to load all the variables and values into table.

record length is 3000 bytes.
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 788
Location: Chennai, India

PostPosted: Thu Dec 06, 2007 4:03 pm    Post subject:
Reply with quote

All the fields of a record are numeric and same data type?
Back to top
View user's profile Send private message
nitya
Warnings : 2

New User


Joined: 09 Dec 2005
Posts: 17
Location: Tirupathi

PostPosted: Thu Dec 06, 2007 5:49 pm    Post subject:
Reply with quote

i have both the variables NUM & Alphanumeric.

all 129 variables are different from each other and it occurs only one time.

for ex: STD_LBL_AFF PIC 9(01).
LIA_DEST_TY PIC 9(01).
LIA_DEST_LBL1 PIC X(40).
----------------ETC.

Regards
nitya.
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 788
Location: Chennai, India

PostPosted: Thu Dec 06, 2007 6:11 pm    Post subject:
Reply with quote

How will you declare table with different types of data type?
Back to top
View user's profile Send private message
nitya
Warnings : 2

New User


Joined: 09 Dec 2005
Posts: 17
Location: Tirupathi

PostPosted: Thu Dec 06, 2007 7:12 pm    Post subject:
Reply with quote

hi,


we can declare it , i have seen some examples .
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 788
Location: Chennai, India

PostPosted: Thu Dec 06, 2007 7:17 pm    Post subject:
Reply with quote

Nitya,

Here you mean table as COBOL table(Array like)???
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Dec 06, 2007 10:29 pm    Post subject:
Reply with quote

Hello,

Your request is not clear. . . If it were, you would receive more replies.

Quote:
we can declare it , i have seen some examples .
Please post an example that you have seen.

Once it is better understood what you need to accomplish, we will be able to offer more suggestions. Keep in mind that while your requirement is completely clear to you, it may not be to others who read it.
Back to top
View user's profile Send private message
nitya
Warnings : 2

New User


Joined: 09 Dec 2005
Posts: 17
Location: Tirupathi

PostPosted: Fri Dec 07, 2007 4:10 pm    Post subject:
Reply with quote

hi,

My requirement is to read the testfile and upload into the table After This control the format of data in the business file such as format and length of the variables. the testfile looklike above. but i have no odea of how to construct the table according the input file , once i will have a clear discussion & understading i will post it.

i am sorry for the inconvience.

Regards
Nitya
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Dec 07, 2007 8:47 pm    Post subject:
Reply with quote

Hello,

Quote:
My requirement is to read the testfile and upload into the table
I believe we understand this part of your requirement.

Quote:
This control the format of data in the business file such as format and length of the variables. the testfile looklike above.
This remains unclear (at least to me).

If you post your real input data (several actual data records), we may understand the requirement better and be able to offer suggestions on how to load the data into a COBOL array.
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm


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