Extract Members from a XMIT File on PC



Post anything related to mainframes (IBM & UNISYS) if not fit in any of the above categories

Extract Members from a XMIT File on PC

Postby Dietmar » Tue Apr 30, 2019 2:48 pm

Hi,

I am trying to write a script that extracts members from a XMIT file on my PC. (I do know there are a couple of GUI programs out there...)

Currently I am struggling with the format in which the member names are stored.

It seems that very often between member names one finds x00 (or in this example x01...) x?? x?? x00

F   1  0  0  1  6        .  .  .  .  F  1  0  0  1  7        .  .  .  .  F  1  0  0  1  8
C6 F1 F0 F0 F1 F6 40 40 01 01 17 00 C6 F1 F0 F0 F1 F7 40 40 01 01 19 00 C6 F1 F0 F0 F1 F8 


But in some cases one can find also something like this

F   1  0  0  1  5        .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  F  1  0  0  3  4        .  Ú  F  1  0  0  1  6
C6 F1 F0 F0 F1 F5 40 40 01 01 15 00 00 00 00 00 00 00 00 00 00 00 00 08 01 00 C6 F1 F0 F0 F3 F4 40 40 00 FE C6 F1 F0 F0 F1 F6


Can anyone help me how to interpret the bytes between the member names correctly or maybe tell me where that is documented?

Best
Dietmar
Dietmar
 
Posts: 7
Joined: Tue Apr 30, 2019 1:42 pm
Has thanked: 3 times
Been thanked: 0 time

Re: Extract Members from a XMIT File on PC

Postby enrico-sorichetti » Tue Apr 30, 2019 4:21 pm

see here

http://00003481@bitbucket.org/00003481/unxmit.git
or
https://00003481@bitbucket.org/00003481/unxmit.git

tested recursively on ALL the cbt files
( only two failed because they were created with a different codepage )

tested on MAC OS[x]
different Linux flavours
FreeBSD
openBSD

I do not really care about windows

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Copyright Enrico Sorichetti 2019 - 2019
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
*/
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times

Re: Extract Members from a XMIT File on PC

Postby Dietmar » Tue Apr 30, 2019 7:14 pm

Hi Enrico,

thank you very much. I am still struggling reading the code. What kind of REXX have you developped this code on?

dietmar@df-laptop:~/c/bitbucket/unxmit$ rexx --version
rexx: REXX-Regina_3.9.1 5.00 5 Apr 2015 (64 bit)
dietmar@df-laptop:~/c/bitbucket/unxmit$ ./unxmit.rex
Error 36 running "/mnt/c/test/bitbucket/unxmit/unxmit.rex", line 19: Unmatched "(" in expression
dietmar@df-laptop:~/c/bitbucket/unxmit$


I think it should rather tell me to give an argument...
Dietmar
 
Posts: 7
Joined: Tue Apr 30, 2019 1:42 pm
Has thanked: 3 times
Been thanked: 0 time

Re: Extract Members from a XMIT File on PC

Postby enrico-sorichetti » Tue Apr 30, 2019 7:24 pm

:oops: my bad

open object rexx available at

https://sourceforge.net/projects/oorexx/
the binaries

svn checkout https://svn.code.sf.net/p/oorexx/code-0/main/trunk
the current source

ps.
still some changes under way, moving to OO coding style

that' the cause of the error

traditional way ...
lower = lower(string)

the OO way ...
lower = string~lower  


what system are You running ?
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort

These users thanked the author enrico-sorichetti for the post:
Dietmar (Fri May 17, 2019 4:44 pm)
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times

Re: Extract Members from a XMIT File on PC

Postby Dietmar » Tue Apr 30, 2019 8:12 pm

I am currently working with the Ubuntu subsystem of Windows 10. But I might be able to run things on a machine with MacOS and a real ubuntu those days.
Dietmar
 
Posts: 7
Joined: Tue Apr 30, 2019 1:42 pm
Has thanked: 3 times
Been thanked: 0 time

Re: Extract Members from a XMIT File on PC

Postby steve-myers » Wed May 01, 2019 12:27 am

The member entries are in PDS directory entry format.

PDS2NAME DS    CL8
PDS2TTRP DS    CL3
PDS2INDC DS    B


PDS2INDC may be followed by user data. Discard the three high order bits in PDS2INDC. Multiply the vale of the 5 low order bits in PDS2INDC by 2 to determine the number of bytes of user data. Add 12 to determine the length of the directory entry.

The data is is in a modified track image. A single directory record has an 8 byte "key" followed by 2 bytes that define the used bytes in the 256 data block followed directory entries. The key is ABPRT. The data length is 00F8 followed by the first member at offset 02A1. Obviously the member name is $DYNPGM. PDS2TTRP is 000120 and PDS2INDC is 2C. The user data length is C, C*2=18 so the length of the directory entry is c+18=24 and the next directory entry is at 2C5, You step along through the block until you have processed all the directory entries in the block. The key for the next block is at 03AD and it is processed the same way.

0280   640  00000000 00000000  00FF8000 00000000  *................*
0290   656  00000000 080100C1  C2D7D9E3 40404000  *.......ABPRT   .*
02A0   672  F85BC4E8 D5D7C7D4  40000120 2C000125  *8$DYNPGM .......*
02B0   688  00000000 00C3F300  02E802E8 00000088  *.....C3..Y.Y...h*
02C0   704  12000100 005BD7C7  D4C3C1D3 D3000120  *.....$PGMCALL...*
02D0   720  B1000125 00000000  00C3D300 02E802E8  *.........CL..Y.Y*
02E0   736  00014888 1A000000  005BC4E8 D5D7C7D4  *...h.....$DYNPGM*
02F0   752  4001005B D7C7D4C4  C5D34000 0120B100  * ..$PGMDEL .....*
0300   768  01250000 000000C3  D30002E8 02E80000  *.......CL..Y.Y..*
0310   784  C8881A00 0000005B  C4E8D5D7 C7D44001  *Hh.....$DYNPGM .*
0320   800  005BD7C7 D4D3D6C1  C4000120 B1000125  *.$PGMLOAD.......*
0330   816  00000000 00C3D300  02E802E8 00002888  *.....CL..Y.Y...h*
0340   832  1A000000 005BC4E8  D5D7C7D4 400100C1  *.....$DYNPGM ..A*
0350   848  C2C5D5C4 F0C3F300  31152C00 311A0000  *BEND0C3.........*
0360   864  00000003 F2000010  00100000 00880000  *....2........h..*
0370   880  010000C1 C2D7D9E3  40404000 311C2C00  *...ABPRT   .....*
0380   896  31210000 00000002  FF00E200 00800080  *..........S.....*
0390   912  00000088 00010100  00000000 00000000  *...h............*
03A0   928  00000000 00000000  00000801 00C1E2E3  *.............AST*
03B0   944  C1E3E240 4000FEC1  C4C4C1D3 C9C1E200  *ATS  ..ADDALIAS.*
03C0   960  01272C00 012C0000  000000C2 E3001000  *...........BT...*
03D0   976  10000000 00880001  010000C1 D3D3D6C3  *.....h.....ALLOC*
03E0   992  E5D6D300 3C282C00  3C2D0000 000000C2  *VOL............B*
03F0  1008  E3000890 08900000  00880201 010000C1  *T........h.....A*
0400  1024  D3E3C4C9 D9404000  460B2C00 46100000  *LTDIR  .........*
0410  1040  00000002 E2001578  15780000 00880001  *....S........h..*
0420  1056  010000C1 D5C1D3E3  E2E24000 012F2C00  *...ANALTSS .....*
0430  1072  02030000 00000002  E2002B68 29700000  *........S.......*
0440  1088  00880001 010000C1  D7C3C3C8 D2404000  *.h.....APCCHK  .*
0450  1104  02082C00 020E0000  00000002 E2002F30  *............S...*
0460  1120  2F300000 00880201  010000C1 E2D4E3D6  *.....h.....ASMTO*
0470  1136  E9C1D700 02112C00  02160000 00000002  *ZAP.............*
0480  1152  E2001000 100000FF  00000088 00010100  *S..........h....*
0490  1168  00C1E2E3 C1E3E240  40003F0F 2C003F14  *.ASTATS  .......*
04A0  1184  00000000 0002E200  1C001C00 00000088  *......S........h*
04B0  1200  00010100 00000000  00000000 00000000  *................*
04C0  1216  080100C2 D9D6D3C4  40404000 EEC2C3E2  *...BROLD   ..BCS*

I'm not sure how you step from block to block in this data, and I'm not going to do any more research.

Good luck.

These users thanked the author steve-myers for the post:
Dietmar (Fri May 17, 2019 4:44 pm)
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: Extract Members from a XMIT File on PC

Postby Dietmar » Fri May 17, 2019 4:57 pm

Thank you so much guys!

I have been quite busy lately, so I couldn't return here earlier.

I'd like to spend more time with that at some point in the future, but for now I have the information I was missing and have a much better picture of the whole XMIT thing.

I really appreciate your help!
Dietmar
 
Posts: 7
Joined: Tue Apr 30, 2019 1:42 pm
Has thanked: 3 times
Been thanked: 0 time


Return to All other Mainframe Topics

 


  • Related topics
    Replies
    Views
    Last post