Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

File Format of a PS File
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Vivek Wilson

New User


Joined: 27 Nov 2008
Posts: 26
Location: India

PostPosted: Thu Mar 26, 2009 9:04 am    Post subject: File Format of a PS File
Reply with quote

Hi, How can I determine the Format of a Mainframe PS file? I mean whether it's ASCII, Binary or others? I Tried Info, but I see no help there. Any help would be much appreciated. Thanks.

Wilson...
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Mar 26, 2009 9:29 am    Post subject:
Reply with quote

Hello,

Where did this file originate? Is the file now on dasd or is it a tape? What is the external definition of the content of the dataset(s)?

Which "info" did you try and what was shown to you from the file?

Typically a file transfer from Windows or UNIX causes the file to be converted from ascii to ebcdic. There can be exceptons, but normally, the conversion is handled by the file transfer.
Back to top
View user's profile Send private message
Vivek Wilson

New User


Joined: 27 Nov 2008
Posts: 26
Location: India

PostPosted: Thu Mar 26, 2009 9:33 am    Post subject:
Reply with quote

dick scherrer wrote:
Hello,

Where did this file originate? Is the file now on dasd or is it a tape? What is the external definition of the content of the dataset(s)?

Which "info" did you try and what was shown to you from the file?

Typically a file transfer from Windows or UNIX causes the file to be converted from ascii to ebcdic. There can be exceptons, but normally, the conversion is handled by the file transfer.


This PS File is the latest Generation in a GDG, created today. It's on DASD. I tried 'I' in front of the filename. I get File Type, LRECL etc, but no information whatsoever on the Format of the file. I'm not going to transfer it out to any other system, & it's not transferred in from any other system. What can I do to check the format of an existing Mainframe File?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Mar 26, 2009 9:42 am    Post subject:
Reply with quote

Hello,

Use copy/paste, and the "Code" tag to post what you use 3.4 and select I for this dataset. Please do not use a screenshot as they introduce a lot of clutter.

It may help it you also post part of the first record with HEX ON.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu Mar 26, 2009 9:44 am    Post subject:
Reply with quote

Vivek Wilson wrote:
What can I do to check the format of an existing Mainframe File?
"Format" word is kind of mis-leading here, if it's a output of some event on Mainframes (output of COBOL, SORT, PL/I etc) you must be having a layout . . .does not that help you?
Back to top
View user's profile Send private message
Vivek Wilson

New User


Joined: 27 Nov 2008
Posts: 26
Location: India

PostPosted: Thu Mar 26, 2009 10:03 am    Post subject:
Reply with quote

dick scherrer wrote:
Hello,

Use copy/paste, and the "Code" tag to post what you use 3.4 and select I for this dataset. Please do not use a screenshot as they introduce a lot of clutter.

It may help it you also post part of the first record with HEX ON.


Sorry, I didn't get what you meant. Can you explain?
Back to top
View user's profile Send private message
Vivek Wilson

New User


Joined: 27 Nov 2008
Posts: 26
Location: India

PostPosted: Thu Mar 26, 2009 10:05 am    Post subject:
Reply with quote

Anuj D. wrote:
Vivek Wilson wrote:
What can I do to check the format of an existing Mainframe File?
"Format" word is kind of mis-leading here, if it's a output of some event on Mainframes (output of COBOL, SORT, PL/I etc) you must be having a layout . . .does not that help you?


No, I don't have access to the job or the Layout. I have just the file. I need to know whether the file is ASCII, Binat=ry or some other format.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Mar 26, 2009 10:09 am    Post subject:
Reply with quote

Hello,

You need to post the information shown on 3.4 I (copy/paste - do not use a screenshot.

You also need to post some of the first record or 2 with HEX ON.
Back to top
View user's profile Send private message
Vivek Wilson

New User


Joined: 27 Nov 2008
Posts: 26
Location: India

PostPosted: Thu Mar 26, 2009 10:27 am    Post subject:
Reply with quote

Code:
Management class . . : PRDGDG1         Allocated cylinders : 20       
Storage class  . . . : PRD1000         Allocated extents . : 1         
 Volume serial . . . : 1GSMBS                                         
 Device type . . . . : 3390                                           
Data class . . . . . : ADDDSORG       Current Utilization             
 Organization  . . . : PS              Used cylinders  . . : 1         
 Record format . . . : FB              Used extents  . . . : 1         
 Record length . . . : 250                                             
 Block size  . . . . : 27750                                           
 1st extent cylinders: 20                                             
 Secondary cylinders : 5                                               
 Data set name type  :                 SMS Compressible  :   NO       
                                                                       
 Creation date . . . : 2009/03/25      Referenced date . . : 2009/03/25
 Expiration date . . : ***None***                                     


This is the Info I see. How can I identify the format from here?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Mar 26, 2009 10:30 am    Post subject:
Reply with quote

Hello,

Your file is a qsam file with 250-byte records. The blksize is 27750.

In addition to that info, you also need to:
Quote:
You also need to post some of the first record or 2 with HEX ON.
From the data, we can learn more about how the content is stored.
Back to top
View user's profile Send private message
Vivek Wilson

New User


Joined: 27 Nov 2008
Posts: 26
Location: India

PostPosted: Thu Mar 26, 2009 10:41 am    Post subject:
Reply with quote

dick scherrer wrote:
Hello,

Your file is a qsam file with 250-byte records. The blksize is 27750.

In addition to that info, you also need to:
Quote:
You also need to post some of the first record or 2 with HEX ON.
From the data, we can learn more about how the content is stored.


Sorry, I left out that bit deliberately. This file is currently in Production, & I can't post Production data here. Is there no other way then?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Mar 26, 2009 10:47 am    Post subject:
Reply with quote

Hello,

Quote:
I can't post Production data here. Is there no other way then?
Change something in the data before posting it so that it is no longer a problem.

The very high odds are that the file is a normal ebcdic file. There are very few ascii files on a mainframe.

The file may contain zoned-decimal, packed-decimal, and binary numeric values in addition to alphanumeric data.

Do you have a cobol layout for this file you can post?
Back to top
View user's profile Send private message
Vivek Wilson

New User


Joined: 27 Nov 2008
Posts: 26
Location: India

PostPosted: Thu Mar 26, 2009 11:03 am    Post subject:
Reply with quote

dick scherrer wrote:
Hello,

Quote:
I can't post Production data here. Is there no other way then?
Change something in the data before posting it so that it is no longer a problem.

The very high odds are that the file is a normal ebcdic file. There are very few ascii files on a mainframe.

The file may contain zoned-decimal, packed-decimal, and binary numeric values in addition to alphanumeric data.

Do you have a cobol layout for this file you can post?


People have been fired from my Company for doing this. I appreciate your willingness to help, but I honestly can't post additiona; info. Can you just tell me how I can distinguish between an EBCDIC File & an ASCII file? I'll do some more work by myself & determine teh format.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Thu Mar 26, 2009 12:40 pm    Post subject: Reply to: File Format of a PS File
Reply with quote

ASCII and EBCDIC do not exists in themselves
the only thing that exists are bytes which are made of bits

the classification ASCII EBCDIC or anything else You want
is a convention based on the use and/or the external representation

take for example the hex value 6B

with the ASCII convention it represents the letter k( lower case )

with the EBCDIC convention it represents the symbol , ( a comma )

but it could also represent the binary number 107

the question, as posed, does not have really any sense

by looking at the raw data You can tell just NOTHING

since you say that it is a production dataset
somewhere in your organization there should be a &COPYBOOK which describes it' s structure
( I hope for You )
as an alternative
consult the applcation documentation or ask Your peers
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7908
Location: Bellevue, IA

PostPosted: Thu Mar 26, 2009 5:14 pm    Post subject:
Reply with quote

Quote:
Hi, How can I determine the Format of a Mainframe PS file? I mean whether it's ASCII, Binary or others?
I love questions like this ... there's so many ways to answer...

1) The format can be considered ASCII, EBCDIC, binary, hexadecimal all at the same time.
2) You are confusing an encoding (ASCII, EBCDIC, etc) with format (binary). All files are binary (that is, they consist of a sequence of bits).
3) As enrico points out, there is absolutely no way to tell from internal inspection of a file whether it has ASCII data, EBCDIC data, both, or neither. Only the application that generated the file can provide this data.
Back to top
View user's profile Send private message
Vivek Wilson

New User


Joined: 27 Nov 2008
Posts: 26
Location: India

PostPosted: Fri Mar 27, 2009 10:02 am    Post subject:
Reply with quote

Code:
PICTURE X(04).
PICTURE X(08).
PICTURE 9(04).
PICTURE X(08).
PICTURE 9(06).
PICTURE X(06).
PICTURE X(02).
PICTURE X(10).


This is the definition of the fields contained in the Copybook for this file. I have left out the field names, but all the fields in the associated copybook are Alphanumeric & Decimal definitions. There are no Signed or Compressed variables.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Mar 27, 2009 10:11 am    Post subject:
Reply with quote

Hello,

From the fields you've now posted and the dataset info posted previously, you have a simple qsam file with fixed-length records.

What is the question? Why is there a problem?

Read the file in your program and do whatever is needed with the fields.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Mar 27, 2009 10:21 am    Post subject:
Reply with quote

And what's the origin of the question - what made you to think that way?
Back to top
View user's profile Send private message
Vivek Wilson

New User


Joined: 27 Nov 2008
Posts: 26
Location: India

PostPosted: Fri Mar 27, 2009 10:26 am    Post subject:
Reply with quote

Well, I was asked by my Client to determine whether the file stored in DASD was with an encoding of ASCII or otherwise. Truth be told, I didn't think encoding applied to a file on DASD because when you FTP it out to Windows, you can choose to have it as ASCII, Binary or Whatnot. Since I was given as explicit instruction to determine the format IN DASD, I thought there would be a way to specify that in MVS.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Mar 27, 2009 10:34 am    Post subject:
Reply with quote

Hello,

If you view the file in tso/ispf and the data is visable/readable, you have verified that the file is a simple sequential file ready for use in program code or utilities.

If the info appears garbled, look at the info in hex and post the hex of any one field or 2 and we should be able to clarify.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us