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

loading data into cobol table from the input seq.file


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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: 792
Location: Chennai, India

PostPosted: Thu Dec 06, 2007 2:59 pm
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
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: 792
Location: Chennai, India

PostPosted: Thu Dec 06, 2007 4:03 pm
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
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: 792
Location: Chennai, India

PostPosted: Thu Dec 06, 2007 6:11 pm
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
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: 792
Location: Chennai, India

PostPosted: Thu Dec 06, 2007 7:17 pm
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

Moderator Emeritus


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

PostPosted: Thu Dec 06, 2007 10:29 pm
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
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

Moderator Emeritus


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

PostPosted: Fri Dec 07, 2007 8:47 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 5
No new posts Store the data for fixed length COBOL Programming 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top