Discussion:
SFTP issue with GDG Dataset
(too old to reply)
venkat kulkarni
8 years ago
Permalink
Hello Group,



I have requirement to send GDG file to unix system using SFTP, but OPUT
command was not accepting this, So, I thought of adding one more
additional step into Job for coping GDG dataset to PS file and then PS file
copy unix directory and then use SFTP to transfer file to other system .



Now, I used below JCL to create GDG and then copying the dataset.





//DEFGDG JOB 7330,'TEST',

// MSGCLASS=T,NOTIFY=&SYSUID,REGION=4096K

//BUILD EXEC PGM=IDCAMS

//SYSPRINT DD SYSOUT=*

//SYSIN DD *

DEFINE GDG (NAME(TEST.TEST.TEMP) -

SCRATCH -

NOEMPTY -

LIM(7))

/*

//STEP1 EXEC PGM=IEFBR14

//SYSPRINT DD SYSOUT=*

//SYSUT2 DD DSN=TEST.TEST.TEMP(+1),

// DISP=(NEW,CATLG,DELETE),DCB=(LRECL=80,RECFM=VB,BLKSIZE=800),

// SPACE=(TRK,(2,20),RLSE),UNIT=3390

//SYSIN DD DUMMY

/*







//TESTSOL JOB (7330),MSGCLASS=X,CLASS=A,NOTIFY=&SYSUID

//STEP1 EXEC PGM=SORT

//SYSPRINT DD SYSOUT=*

//SORTIN DD DSN=TEST.TEST.TEMP(0),UNIT=3390,

// VOL=SER=TSO020

//SORTOUT DD DSN=TEST.TEST.TEMP.TEST,UNIT=3390,

// VOL=SER=TSO020

//SYSIN DD *

SORT FIELDS=COPY



OR below JOB



//OP117SOL JOB (7330),MSGCLASS=X,CLASS=A,NOTIFY=&SYSUID ,TYP

//STEP1 EXEC PGM=IDCAMS

//SYSPRINT DD SYSOUT=*

//INDD DD DSN=TEST.TEST.TEMP(+1),UNIT=3390,

// VOL=SER=TSO020

//OUTDD DD DSN=TEST.TEST.TEMP,UNIT=3390,

// VOL=SER=TSO020

//SYSIN DD *

REPRO -

INFILE(INDD) -

OUTFILE(OUTDD)

/*



Both of these above job produce same error is



IEF286I OP117SOL STEP1 SORTIN - DISP FIELD INCOMPATIBLE WITH DSNAME

IEF272I OP117SOL STEP1 - STEP WAS NOT EXECUTED.



Please correct me, where I am wrong in this whole proess.


Regards
Venkat

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Edward Finnell
8 years ago
Permalink
JCL 101.

It's telling you the DISP parameter doesn't match what you're asking it to
do. Default is (NEW,CATLG,DELETE).


In a message dated 4/30/2017 11:47:33 P.M. Central Daylight Time,
***@GMAIL.COM writes:

Please correct me, where I am wrong in this whole proess.



----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
venkat kulkarni
8 years ago
Permalink
Hello,

Thanks for reply. JCL mentioned in my previous email for creating GDG



//DEFGDG JOB 1130,'TEST',

// MSGCLASS=T,NOTIFY=&SYSUID,REGION=4096K

//BUILD EXEC PGM=IDCAMS

//SYSPRINT DD SYSOUT=*

//SYSIN DD *

DEFINE GDG (NAME(TEST.TEST.TEMP) -

SCRATCH -

NOEMPTY -

LIM(7))

/*

//STEP1 EXEC PGM=IEFBR14

//SYSPRINT DD SYSOUT=*

//SYSUT2 DD DSN=TEST.TEST.TEMP(+1),

// DISP=(NEW,CATLG,DELETE),DCB=(LRECL=80,RECFM=VB,BLKSIZE=800),

// SPACE=(TRK,(2,20),RLSE),UNIT=3390

//SYSIN DD DUMMY

/*



produces below GDG dataset.



TEST.TEST.TEMP

TEST.TEST.TEMP.G0001V00



But, issue comes when I try to copy this GDG into PS file using below JCL.



//SOLTSSO JOB (1130),MSGCLASS=X,CLASS=A,NOTIFY=&SYSUID ,TYP

//STEP1 EXEC PGM=IDCAMS

//SYSPRINT DD SYSOUT=*

//INDD DD DSN=TEST.TEST.TEMP(+1),UNIT=3390,

// VOL=SER=TSO020

//OUTDD DD DSN=TEST.TEST.TEMP,UNIT=3390,

// VOL=SER=TSO020

//SYSIN DD *

REPRO -

INFILE(INDD) -

OUTFILE(OUTDD)

/*



Both of these above job produce same error is

IEF286I SOLTSSO STEP1 SORTIN - DISP FIELD INCOMPATIBLE WITH DSNAME

IEF272I SOLTSSO STEP1 - STEP WAS NOT EXECUTED.



Please correct me, where I am wrong in this whole process and not able to
find reason of this copy failure.




On 01-May-2017 8:05 AM, "Edward Finnell" <
0000000248cce9f3-dmarc-***@listserv.ua.edu> wrote:

JCL 101.

It's telling you the DISP parameter doesn't match what you're asking it to
do. Default is (NEW,CATLG,DELETE).


In a message dated 4/30/2017 11:47:33 P.M. Central Daylight Time,
***@GMAIL.COM writes:

Please correct me, where I am wrong in this whole proess.



----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Gibney, Dave
8 years ago
Permalink
As stated. In your second job, you are using the default DISP (because you aren't specifying it at all) for both INDD and OUTDD
...
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Lizette Koehler
8 years ago
Permalink
A few comments

1) You only need to run the Define GDG once. So that should not be run again after the you create the GDG

2) The z/OS environment no longer needs the parms of DCB=(lrecl,Blksize,..) they can all be specified individually. So you can code // UNIT=SYSDA,LRECL=xx,BLKSIZE=xxxx,RECFM=xx and so forth

3) IDCAMS does not copy the Dataset attributes from the Input to the OUTPUT dataset. You may be able to use LIKE= in the jcl. But LIKE will not use a GDG for this function. So you cannot code LIKE=GDG(0). You can code LIKE=MYDATASET

4) You may wish to use IEBGENER instead of IDCAMS to copy the file. It can copy the dataset attributes. There are many examples of how to code IEBGENER on the internet and in www.ibm.com.

5) If you wish to use IDCAMS, then on the output DD include the dataset attributes, including SPACE, LRECL, BLKSIZE, etc...

6) You do not need IEFBR14 to create the GDG generation. It is done for you when you code GDG(+1)

7) If your dataset is controlled by the SMS ACS functions, then it will land in an SMS pool and not on the volume you specify. If your dataset is not controlled by SMS ACS code, it will land on the VOLSER you specify


Hope this helps

Lizette
...
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Carmen Vitullo
8 years ago
Permalink
Very good pointers from Lizette, I'm confused, I don't see any SORTIN DD where you got your JCL ERROR


----- Original Message -----

From: "Lizette Koehler" <***@MINDSPRING.COM>
To: IBM-***@LISTSERV.UA.EDU
Sent: Monday, May 1, 2017 9:46:12 AM
Subject: Re: SFTP issue with GDG Dataset

A few comments

1) You only need to run the Define GDG once. So that should not be run again after the you create the GDG

2) The z/OS environment no longer needs the parms of DCB=(lrecl,Blksize,..) they can all be specified individually. So you can code // UNIT=SYSDA,LRECL=xx,BLKSIZE=xxxx,RECFM=xx and so forth

3) IDCAMS does not copy the Dataset attributes from the Input to the OUTPUT dataset. You may be able to use LIKE= in the jcl. But LIKE will not use a GDG for this function. So you cannot code LIKE=GDG(0). You can code LIKE=MYDATASET

4) You may wish to use IEBGENER instead of IDCAMS to copy the file. It can copy the dataset attributes. There are many examples of how to code IEBGENER on the internet and in www.ibm.com.

5) If you wish to use IDCAMS, then on the output DD include the dataset attributes, including SPACE, LRECL, BLKSIZE, etc...

6) You do not need IEFBR14 to create the GDG generation. It is done for you when you code GDG(+1)

7) If your dataset is controlled by the SMS ACS functions, then it will land in an SMS pool and not on the volume you specify. If your dataset is not controlled by SMS ACS code, it will land on the VOLSER you specify


Hope this helps

Lizette
...
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
J R
8 years ago
Permalink
"
//SORTIN DD DSN=TEST.TEST.TEMP(0),UNIT=3390,

// VOL=SER=TSO020

DISP defaults to NEW,DELETE. GDG (0) requires OLD or SHR.

Sent from my iPhone
Post by Carmen Vitullo
Very good pointers from Lizette, I'm confused, I don't see any SORTIN DD where you got your JCL ERROR
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Carmen Vitullo
8 years ago
Permalink
Thanks, that must have been snipped from some responses -
Carmen

----- Original Message -----

From: "J R" <***@HOTMAIL.COM>
To: IBM-***@LISTSERV.UA.EDU
Sent: Monday, May 1, 2017 10:31:36 AM
Subject: Re: SFTP issue with GDG Dataset

"
//SORTIN DD DSN=TEST.TEST.TEMP(0),UNIT=3390,

// VOL=SER=TSO020

DISP defaults to NEW,DELETE. GDG (0) requires OLD or SHR.

Sent from my iPhone
Post by Carmen Vitullo
Very good pointers from Lizette, I'm confused, I don't see any SORTIN DD where you got your JCL ERROR
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
J R
8 years ago
Permalink
Yep, my first response was returned because it began with a slash. Listserv thought it might be a command.

Sent from my iPhone
Post by Carmen Vitullo
Thanks, that must have been snipped from some responses -
Carmen
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
venkat kulkarni
8 years ago
Permalink
After adding disp parameter to indd and outdd dd stmt and I was able to
copy this gdg into PS file and sorry for this silly mistake.
Thanks for all support.
Post by J R
Yep, my first response was returned because it began with a slash.
Listserv thought it might be a command.
Sent from my iPhone
Post by Carmen Vitullo
Thanks, that must have been snipped from some responses -
Carmen
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Edward Finnell
8 years ago
Permalink
Sometimes listserv is too smart.
//INDD DD DSN=TEST.TEST.TEMP(1),DISP=SHR
or
//INDD DD DSN=TEST.TEST.TEMP.G0001V00,DISP=SHR
or
//INDD DD DSN=TEST.TEST.TEMP.DISP=SHR
//OUTDD DSN=TEST.TEST.TEMPPS, needs DCB and SPACE parameters with
DISP=(NEW,CATLG)




In a message dated 5/1/2017 2:46:33 A.M. Central Daylight Time,
***@WSU.EDU writes:

As stated. In your second job, you are using the default DISP (because you
aren't specifying it at all) for both INDD and OUTDD


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Paul Gilmartin
8 years ago
Permalink
Post by venkat kulkarni
I have requirement to send GDG file to unix system using SFTP, but OPUT
command was not accepting this, So, I thought of adding one more
additional step into Job for coping GDG dataset to PS file and then PS file
copy unix directory and then use SFTP to transfer file to other system .
Why not use IEBGENER rather than struggling with OPUT?
Post by venkat kulkarni
...
//INDD DD DSN=TEST.TEST.TEMP(+1),UNIT=3390,
// VOL=SER=TSO020
...
I've never used GDGs. But still, incrementing the generation number on
an input data set seems strange to me.

Don't GDGs depend on catalog services? Doesn't specifying UNIT and
VOL bypass the catalog?

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Loading...