easytrieve - is this binary field

Ask/Clarify the questions on EASYTRIEVE

Moderators: DikDude, Moderator Group

Post Reply
GJFNH
Member
Posts: 3
Joined: Wed Dec 07, 2011 12:57 am

easytrieve - is this binary field

Post by GJFNH » Wed Dec 07, 2011 1:55 am

Using easytrieve to create smaller file to pass to excel...

I have a file and layout.
There are some fields defined as comp-3, but I think maybe they are binary?
How do I define them in my ezt code to get the data legible?

paste of the 3 fields (in hex):

---+----2---
---+----F---
---+----2---
-----------
...ÿ...ÿ...@
311D311D3107
F18FF18FF20C

From the cobol copybook:
15 EFFECTIVE-DATE PIC S9(07) COMP-3.
15 CHANGE-EFFECTIVE-DATE PIC S9(07) COMP-3.
15 EXPIRATION-DATE PIC S9(07) COMP-3.

If I look at them with FileAid, they are appear to be julian dates - like 2011189 - which would be fine if I could see them that way.

I'm getting effective dates like
1,058,085,087
or split out
63 17 24 33-

Any help appreciated.

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Wed Dec 07, 2011 10:54 am

When posting data (or code or jcl etc) it is important to use the "Code" tags:

Code: Select all

---+----2--- 
---+----F--- 
---+----2--- 
----------- 
...ÿ...ÿ...@ 
311D311D3107 
F18FF18FF20C 

Code: Select all

15 EFFECTIVE-DATE PIC S9(07) COMP-3. 
15 CHANGE-EFFECTIVE-DATE PIC S9(07) COMP-3. 
15 EXPIRATION-DATE PIC S9(07) COMP-3. 
The 3 values posted are not packed-decimal from what i can see.

1,058,085,087 is indeed the decimal number given when 3F1118DF is converted to decimal (using the Windows calculator).

What has fileaid been told about the format of these fields?
Have a good one

GJFNH
Member
Posts: 3
Joined: Wed Dec 07, 2011 12:57 am

Post by GJFNH » Thu Dec 08, 2011 3:32 am

When I FTPd the file from a different mainframe to ours, apparantly the FTP decided to split just some of the records into 2. So...the date fields that I was getting a s0c7 on were acually some other field(s) - on that "2nd" record. At least I read up on binary and how it works!

so here's a big NEVER MIND.

Now I'm trying to figure out how to fix my FTP - There's got to be a glitch with VB records or something...

Thanks for your help!!!
Glad I found this site!

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Fri Dec 09, 2011 2:26 am

You're welcome - there is usually someone around (or will be fairly soon) when there are questions.

Suggest you check with your ftp support and see how ftp is configured at each end. You might try building a very small variable file and dump the file before transmitting it and after the data is received on the target system.

When i transmit data to a mainframe, i pre-allocate the receiving file.

You also need to determine which mode of transmission is being used.

Good luck :)
Have a good one

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Fri Dec 09, 2011 2:39 am

DikDude wrote:When i transmit data to a mainframe, i pre-allocate the receiving file.
hard to go wrong if you follow that advice.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

GJFNH
Member
Posts: 3
Joined: Wed Dec 07, 2011 12:57 am

Post by GJFNH » Fri Dec 09, 2011 3:20 am

It's a SAS FTP run on the mainframe.
Yeah, had tried pre-allocating, different variations of V, VB, F, lrecls, blksizes, binary...but what it needed was:

Code: Select all

S370V PROMPT RCMD='SITE RDW';


Didn't think it was going to work, but it did, and that's all that matters!

So glad I found this forum - Thank you!

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Fri Dec 09, 2011 3:53 am

Good to hear it is working - thank you for the folllow-up 8)

dd

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others