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.
Create a sequential file to be FTPed to Mainframe
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 4
- Joined: Thu Sep 08, 2011 10:02 am
- Location: Hyderabad
Create a sequential file to be FTPed to Mainframe
Regards,
Danish
Danish
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.)
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 4
- Joined: Thu Sep 08, 2011 10:02 am
- Location: Hyderabad
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.
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
Danish
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.
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
"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