Create a sequential file to be FTPed to Mainframe

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Mohammad_Danish
Participant
Posts: 4
Joined: Thu Sep 08, 2011 10:02 am
Location: Hyderabad

Create a sequential file to be FTPed to Mainframe

Post by Mohammad_Danish »

Hi,

My objective is to create a sequential file with following columns in Cobol format, please tell what setting to use in Complex Flat File Stageto accomplish this task:
Column Datatype Size
OutDate Integer 99
InDate Integer 999
CompanyNo Alphanumeric XX
OutletNo Numeric 9(5)
TransUnits Packed decimal S(9) Comp-3
TransUnits2 Packed decimal S(9) Comp-3
Sales Packed decimal S(9) V99 Comp-3
TrfUnits Packed decimal S(9) Comp-3
Space Alphanumeric XX


Please let me know what settings should be made in 'Record' tab of CFF stage to accomplish it.
Regards,
Danish
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

First tell us what YOU have tried.

We're not in the business of handing out solutions on a silver platter.

We're happy to help with problems.

(Actually some of us ARE in the business of handing out solutions, but that's only in exchange for professional fees.)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Mohammad_Danish
Participant
Posts: 4
Joined: Thu Sep 08, 2011 10:02 am
Location: Hyderabad

Post by Mohammad_Danish »

Hi Ray,

I have implemented using CFF stage by configuring it as follows:

Column Datatype Length Scale
OutDate Native Binary 99
InDate Native Binary 999
CompanyNo Varchar 2
OutletNo Native Binary 9 5
TransUnits Decimal 9
TransUnits2 Decimal 9
Sales Decimal 11 2
TrfUnits Decimal 9
Space Varchar 2


This is the configuration I have done, when I am checking the Layout Tab(COBOL) in the CFF I am not getting the Picture Clause as expected, as I have posted in post before, what additional settings I need to do to accomplish that.
Regards,
Danish
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

What Picture clause are you expecting to see and what are you actually seeing? Were you provided a layout to create, or given the freedom to provide one to the consumer?

Regards,
- james wiles


All generalizations are false, including this one - Mark Twain.
FranklinE
Premium Member
Premium Member
Posts: 739
Joined: Tue Nov 25, 2008 2:19 pm
Location: Malvern, PA

Post by FranklinE »

Danish, the disciplined way to approach this is for the mainframe system programmer to provide you with a Cobol copybook, the actual detailed schema of the file you are being asked to create.

DataStage has a very good Cobol data interface. Use the Table Definitions menu to load the copybook, and follow the prompts. If you are not familiar with Cobol, have a Cobol programmer help you with the prompts.

I've had excellent results with this.

Addendum:
Record level>>Record type=implicit
Field defaults>>Delimter=none
Type defaults>>General>>Character set=EBCDIC, Data format=binary
Type defaults>>Decimal>>allow all zeroes=yes

These should be your settings when reading from or writing to mainframe datasets under the Cobol formats. If your FTP is a separate step, then I suggest making sure any EBCDIC file be formatted as shown and read to FTP with those attributes. Having an accurate schema based on the Cobol copybook is critical, regardless of how else you approach this.
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson

Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
Post Reply