Packed decimal or computational fields

A

ArnoldJansen

Is it possible for Excel to write a dataset with specific formatting:
This dataset has to be transferred to a mainframe, and there they use
computaional fields, packed decimal fields, just like Cobol does.
Is it possible (and how) to convert data from an Excel sheet into these
formats before writing this dataset to our mainfarame?
Example of the Cobol-layout of the data the mainframe needs to have in
this dataset:

01 VERA-AANLEVERING-VOORLOOP.
03 RE-RECORD-TYPE PIC X(02).
03 RE-BRONNAAM PIC X(08).
03 RE-AANLEVER-NUMMER USAGE PACKED-DECIMAL
PIC
S9(08)V.
03 RE-VALUTAJAAR USAGE PACKED-DECIMAL
PIC
S9(04)V.
03 RE-AANLEVER-DATUM PIC X(08).
03 RE-PERIODE-NUMMER USAGE COMP-5
PIC
S9(04).
03 RE-VOLGNUMMER USAGE COMP-5
PIC
S9(04).
03 RE-AANLEVER-OMS PIC X(40).
03 FILLER PIC X(10).
 
S

swatsp0p

Arnold: You told us what it needs to look like at the end... but you
didn't tell us what the data looks like BEFORE. My best guess is the
use of concatenation and other text functions to construct your data
into the desire format.

More info, please...
 
D

Dave Peterson

I don't have access to a mainframe anymore, but I think that a lot of programs
that transfer from pc to mainframe convert characters along the way (broken
vertical bar becomes solid vertical bar, if I recall an example correctly).

If you get unlucky enough to have these ASCII characters in your data, you may
not get what you want on the mainframe.

I think if I had to do this, I'd transfer the data as plain old ASCII text and
then have a little COBOL program that would read in the data and write it in the
format I wanted.

You could even embed that step in your JCL(???) that you're running on the
mainframe.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top