For source, it's a piece of cake; you do need to adjust for RECFM and LRECL.
For load modules, it's much hairier. You need to adjust the TTR of the last text record and (for overlay) any TTR in a note list. As others have noted, you'll waste space unless you reblock, which you're probably not ready for. For program objects, the format is proprietary and you will need an NDA plus big bucks. If it were me I'd use IEBCOPY for load modules and program objects rather than RYO. -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 ________________________________________ From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> on behalf of Savor, Thomas (Alpharetta) <thomas.sa...@fiserv.com> Sent: Monday, January 7, 2019 5:55 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Pds Copy for Load Lib Members I'm trying to write a copy program for Source code or Load Data from one Pds to Another. The Source Code part seems to be working...no issues. The Load library code however, I cant seem to figure out how PDS2TTRT is populated. Here is an example: - DSN=ISPF.XXXX.LINKLIB,VOL=SER=DVL010 MEM=PDS$DMP1 ----------------- >dir pds$dmp1 PDS143I PDS$DMP1 DIRECTORY ENTRY, LENGTH=36 0000 D7C4E25B C4D4D7F1 01D9082C 01DA0400 *PDS$DMP1.R......* 0010 00000000 02E2001C C01CC000 00008812 *.....S..{.{...h.* 0020 01010000 *....* PDS262I LOC NAME VALUE DESCRIPTION PDS262I --- ---- ----- ----------- PDS262I 00 PDS2NAME PDS$DMP1 MEMBER NAME PDS262I 08 PDS2TTRP 01D908 TTR OF FIRST BLOCK OF DATA PDS262I 0B PDS2INDC 2C 1 TTRS FOLLOW; 12 HALFWORDS OF DATA PDS262I 0C PDS2TTRT 01DA04,00 TTR OF FIRST TEXT BLOCK PDS262I 10 PDS2TTRN 000000,00 (NOT USED FOR THIS MEMBER) PDS262I 14 PDS2ATR1 02 NOT REENTRANT; NOT REUS; NOT OVERLAY; NOT TEST PDS262I NOT ONLY LOAD; NOT SCATTER; EXEC; NOT 1 TEXT PDS262I 15 PDS2ATR2 E2 NOT DC; TEXT ORG=0; EP=0; HAS RLDS The data was written to PDS using WRITE Macro, the Directory using STOW Add. PDS2TTRT "seems" to be an offset as to where load member starts. But there doesn't seem to be a clear way to calculate this. I have looked at PDS from CBT, but I don't understand what's going on. Sometimes for the same member, the "offset" changes. Is there a simple way to figure out what this value should be ?? Thanks, Tom Savor ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN