Glad to hear that, Dzięki for the kind words. Certainly I will check out the beautiful city when I have a chance!
Original Message:
Sent: Tue January 23, 2024 05:27 AM
From: Piotr Synowiec
Subject: Compiling library and creating XMIT
Hi Roy,
it all works great.
Thanks a lot.
If you ever come to Krakow, Poland let me know.
psynowiec@gmail.com
Regards,
Piotr
------------------------------
Piotr Synowiec
Original Message:
Sent: Mon January 15, 2024 01:30 PM
From: Roy Bae
Subject: Compiling library and creating XMIT
You need to preallocate a dataset($USER.TEST.XMIT) where the result XMIT file(TEST.XMIT) in USS is copied into. It needs to have the same attribute as the one $USER.TEST.XMIT (sender).
I leave my work log below. By the way, I had to use a JCL to receive a dataset. I could not find any workaround.
# ! IMPORTANT - Before trying, please back up your datasets !
> cp -B "//'ROYBAE.XMITDS'" ./ROYBAE.USS
> tso "delete XMITDS2" # clean up
> tso "allocate dsn('ROYBAE.XMITDS2') space(6000 2000) tracks lrecl(80) dsorg(PS) dsntype(LARGE) blksize(3200) recfm(F B) new"
> cp -B ./ROYBAE.USS "//'ROYBAE.XMITDS2'"
> tso "delete TEST.O2" # clean up
> cat a.jcl # create this JCL
//ROYBAE1 JOB
//STEP1 EXEC PGM=IKJEFT01
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
RECEIVE INDSN('ROYBAE.XMITDS2')
DATASET('ROYBAE.TEST.O2')
/*
> /bin/submit a.jcl
> tsocmd "LISTDS TEST.O2" MEMBERS
------------------------------
Roy Bae
Original Message:
Sent: Mon January 15, 2024 10:51 AM
From: Piotr Synowiec
Subject: Compiling library and creating XMIT
Hi Roy,
on testing XMIT file I hit the wall.
I managed to copy XMIT file back to XMIT dataset (dataset deleted and created from scratch) by cp -v -B TEST.XMIT "//'$USER.TEST.XMIT'"
Now I have no idea how to copy this XMIT (PS) dataset to O (PO) dataset to ensure that I have all the object files
Regards,
Piotr
------------------------------
Piotr Synowiec
Original Message:
Sent: Fri January 12, 2024 05:57 PM
From: Roy Bae
Subject: Compiling library and creating XMIT
Hello Piotr,
I am sorry to hear that. I was able to reproduce the same error and managed to figure it out - the second allocation command needs 'DIR(...)'
https://www.ibm.com/docs/en/zos/2.4.0?topic=sets-checklist-2-creating-data-set-allocate-command
I leave a list of commands I actually tried on my system and their actual output. Note that I didn't check the functionality of files in the XMIT dataset. Please run your own testing.
A list of commands:
> ls *.o
> tso "delete TEST.O"; USER=ROYBAE tso "allocate dsn('$USER.TEST.O') dir(10) space(2000 1000) tracks lrecl(255) dsorg(PO) dsntype(PDS) blksize(3200) recfm(V B) new"
> cp -B -S d=.o $(ls *.o) "//'ROYBAE.TEST.O'"
> tso "delete XMITDS"; USER=ROYBAE tso "allocate dsn('$USER.XMITDS') space(6000 2000) tracks lrecl(80) dsorg(PS) dsntype(LARGE) blksize(3200) recfm(F B) new"
> tsocmd "xmit YOURHOST.ROYBAE da('ROYBAE.TEST.O') outdsn('ROYBAE.XMITDS')"
Actual output:
> ls *.o
c.o d.o
> tso "delete TEST.O"; USER=ROYBAE tso "allocate dsn('$USER.TEST.O') dir(10) space(2000 1000) tracks lrecl(255) dsorg(PO) dsntype(PDS) blksize(3200) recfm(V B) new"
delete TEST.O
IDC0550I ENTRY (A) ROYBAE.TEST.O DELETED
allocate dsn('ROYBAE.TEST.O') dir(10) space(2000 1000) tracks lrecl(255) dsorg(PO) dsntype(PDS) blksize(3200) recfm(V B) new
> cp -B -S d=.o $(ls *.o) "//'ROYBAE.TEST.O'"
> tsocmd "LISTDS TEST.O" MEMBERS
LISTDS TEST.O MEMBERS
ROYBAE.TEST.O
--RECFM-LRECL-BLKSIZE-DSORG
VB 255 3200 PO
--VOLUMES--
LABW37
--MEMBERS--
C
D
> tso "delete XMITDS"; USER=ROYBAE tso "allocate dsn('$USER.XMITDS') space(6000 2000) tracks lrecl(80) dsorg(PS) dsntype(LARGE) blksize(3200) recfm(F B) new"
delete XMITDS
IDC0550I ENTRY (A) ROYBAE.XMITDS DELETED
allocate dsn('ROYBAE.XMITDS') space(6000 2000) tracks lrecl(80) dsorg(PS) dsntype(LARGE) blksize(3200) recfm(F B) new
> tsocmd "xmit YOURHOST.ROYBAE da('ROYBAE.TEST.O') outdsn('ROYBAE.XMITDS')"
xmit YOURHOST.ROYBAE da('ROYBAE.TEST.O') outdsn('ROYBAE.XMITDS')
INMX000I 0 message and 5 data records sent as 89 records to YOURHOST.ROYBAE
INMX001I Transmission occurred on 01/12/2024 at 17:49:02.
------------------------------
Roy Bae
Original Message:
Sent: Fri January 12, 2024 11:55 AM
From: Piotr Synowiec
Subject: Compiling library and creating XMIT
Hi Roy,
I managed to create
tso "allocate dsn('$USER.TEST.XMIT') space(2000 1000) tracks lrecl(80) dsorg(PS) dsntype(LARGE) blksize(3200) recfm(F B) new"
tso "allocate dsn('$USER.TEST.O') space(2000 1000) tracks lrecl(255) dsorg(PO) dsntype(PDS) blksize(3200) recfm(V B) new"
but not sure if the second data set is created properly as when I run
cp -B -S d=.o $(ls /u/ibmuser/o/*.o) "//'$USER.TEST.O'"
I got errors for every file
cp: !IBMUSER.TEST.O(ZCCAV): close failed: EDC5091I The requested function could not be performed because a system utility failed.
and when I list my data set I have only 20 members
I have around 1500 object files where file size varies from 4kB to 25kB
That I need to copy to XMIT them
------------------------------
Piotr Synowiec
Original Message:
Sent: Thu January 11, 2024 02:31 PM
From: Roy Bae
Subject: Compiling library and creating XMIT
Hello Piotr,
I didn't really try below myself with object files and libraries you described so you need to run an experiment if it looks okay. I hope it gives some idea.
1. allocate $USER.XMITDS data set with the following characteristics:
tsocmd "listds '$USER.XMITDS'"
$USER.XMITDS
--RECFM-LRECL-BLKSIZE-DSORG
FB 80 3120 PS
use large primary and secondary extents when transferring
large files such as SCEERUN2. Example of how to do it from USS:
tso "allocate dsn('$USER.XMITDS') space(6000 2000) tracks lrecl(80) dsorg(PS) dsntype(LARGE) blksize(3200) recfm(F B) new"
2. copy USS files/objects into a desired data set
3. in USS xmit desired data set in 2 into the xmit data set allcated in 1.:
tsocmd "xmit $HOSTNAME.$USER da('$USER.DATASET.TOBE.XMITED') outdsn('$USER.XMITDS')"
4. in USS copy xmit data set into USS file:
cp -B "//'$USER.XMITDS'" ./$USER.XMITDS
------------------------------
Roy Bae
Original Message:
Sent: Wed January 10, 2024 12:18 PM
From: Piotr Synowiec
Subject: Compiling library and creating XMIT
I'm working on Unix shell not TSO terminal
I have following case.
I compile several C routines into the object files and later on I merge them to single file as library.
This works perfect in shell as I can compile any Cobol program with that library and it all works.
Now new problem arise.
I need to create XMIT file for delivery.
It looks like the XMIT file has to contain all compiled objects.
Question is how I can create XMIT file on Unix shell ?
Could anyone help me with command syntax to do it ?
------------------------------
Piotr Synowiec
------------------------------