Mianframe

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
kab123
Participant
Posts: 92
Joined: Tue May 18, 2004 4:05 pm

Mianframe

Post by kab123 »

Hi,

Is there any stage in DataStage PX that we can use to pull a COBOL fmt file from main frame to UNIX...?
or is there any stage in PX, that can read COBOL file..?I think we dont have any in DS server

Thanks
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Kab123,

both Server and Parallel Extender have several ways of reading COBOL type files. See the "Complex Flat File" in this forum as well as in the documentation as a starter.

There is no generic mainframe access stage, there are just too many options and possibilities there. The simplest method is to use the FTP stage in order to copy files, as most hosts have an ftp implementation. Once the file is "visible" to the server (either FTP, mounted drives, or local copies) it can be processed.
kab123
Participant
Posts: 92
Joined: Tue May 18, 2004 4:05 pm

Post by kab123 »

Thanks Arnd,

Its a good idea to use FTP stage...
does it holds good for compressed files too...?
bcarlson
Premium Member
Premium Member
Posts: 772
Joined: Fri Oct 01, 2004 3:06 pm
Location: Minnesota

Post by bcarlson »

If you have a copy of the COBOL copybook, you can use readcobol (in the <your Ascential Root Dir>/DataStage/PXEngine/bin/ directory). That will convert the copybook to a schema which can then be imported into DataStage Manager (Import/Table Definitions/Orchestrate Table Definitions...). You can also go into DataStage Manager and import it directly with Import/Table Definitions/COBOL File Definitions. (Note: This will use readcobol internally)

Warnings: readcobol does not handle redefines, just delete those lines or comment them out. Also, make sure there is an 01 line defining the start of the record. If there isn't, then add one.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Kab123,

FTP can be used for files with non character binary data (i.e. COMP fields); just do a binary FTP transfer and then do the EBCDIC-ASCII conversion within DS. As noted, if you have PL/1 or COBOL copybook or include files you can let DS parse them into appropriate metadata definitions.
Post Reply