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

Structure of existing files


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Martin303

New User


Joined: 23 Feb 2004
Posts: 2

PostPosted: Mon Feb 23, 2004 7:44 pm
Reply with quote

Hello everybody

Im new here im from slovakia and till now i worked on AS400 with ILE COBOL v3r7. Now i must work in VS COBOL II on ibm mainframe 390. Im searching for an alternate thing to COPY DDS-ALL-FORMATS statement in AS400 cobol. This statement copying structure of file to a cobol program with all created indexes without logical files. Second question : Is there possibility create some indexes without using DB2 tool ? I made on as400 physical and logical files. Im asking before reading a book because i tryied also links written in second or third statement overall and now i must buy some.
Back to top
View user's profile Send private message
Johore

Specialist


Joined: 12 Sep 2003
Posts: 19

PostPosted: Wed Feb 25, 2004 9:19 am
Reply with quote

Hi Martin ,

****COBOL II uses a COPY XXX stmt to copy the structure /copybook XXX into the program. XXX will be as follows

01 GROUP-NAME PIC X(01)
05 A PIC X(01)

and so on.

*****If you are using DB2 and want to copy DB2 tables , You have to first create the corresponding cobol copybook frm DB2 tables using DCL GEN, here all the DB2 column names will be converted to COBOL names and made in the above format. Then ushould use
INCLUDE XXX in your cobol program.

HTH
Johore
Back to top
View user's profile Send private message
Martin303

New User


Joined: 23 Feb 2004
Posts: 2

PostPosted: Wed Feb 25, 2004 5:23 pm
Reply with quote

thank you johore

This was what i need to know. I used dcl gen to create copybook and include this copybook to a program. Its only one step more like on AS400. AS400 have support for DB2 mounted in the system, so you dont need create copybooks. Program can retrieve structure right from the physical file what is another name for dataset.
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 Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Adding first / last acct numerber to ... DFSORT/ICETOOL 7
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
No new posts Joinkeys - 5 output files DFSORT/ICETOOL 7
Search our Forums:

Back to Top