View previous topic :: View next topic
|
Author |
Message |
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Hi expat
Quote: |
Step 1 is the Extract step, Step 2 is the filter step, then three is the SORT step where we gets an PS flat file with
all the attributes (like DCB, DSN, DISP) coded in the JCl itself.
And i require the name of this PS flat file to pas on to my application code.
I do not want to make use of the DSN name generated in the Third step to create an new DSN for the next step.
i only need to store (or pass) that NAME so that i can apply few logical operations on that in my code.
|
It is not really important what program is used in step 3 for this discussion.
The second part of the quote means, that is what i see in it, that the TS
wants to use the dataset name for whatever processing in his program. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Peter,
Unless the OP can be bothered to actually tell us anything of any value we will never know what the requirement is or be able to offer any help whatsover. |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
expat,
that leaves only a few candidates for help, i guess. |
|
Back to top |
|
|
nemaji
New User
Joined: 29 May 2007 Posts: 22 Location: Pune
|
|
|
|
As suggested i have used IRXJCL to submit an REXX which will take the input file and will copy the PS file name into OUTSRCH step. Here i will be getting the value of &SFILE from the Previos step-3 which is the actual PS file name say AAA.BBB.
IN the beow PROC i have to capture the file name which is coming in &SFILE ..
Here is the JCL PROC
-----------------------------------------------------
//STEP1 PROC
//IRXJCL1 EXEC PGM=IRXJCL
//SYSEXEC DD DSN=AAA.PROCLIB(REXXPS),DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DSN=&SFILE,DISP=SHR
//&SFILE
//INSRCH DD DSN=&SFILE,
// DISP=SHR
//OUTSRCH DD DSN=AAA.BBB.OUT,
// DISP=(NEW,CATLG,DELETE),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0),
// SPACE=(10,(10,5),RLSE)
Here is the REXX (Well, this is going to be my First REXX Code, so there can be mistakes)..
---------------------------------------------
/* REXX */
"EXECIO * DISKR INSRCH(STEM IN.FINIS";
PARSE UPPER PULL DSN
SAY "DSN=" DSN
PS = SUBSTR(DSN,19,8)
SAY PS
SAY "HELLO"
QUEUE PS
"EXECIO * DISKW OUTSRCH (FINIS";
I am getting the error as "CC 3637" . Can you please help me resolving this ? |
|
Back to top |
|
|
nemaji
New User
Joined: 29 May 2007 Posts: 22 Location: Pune
|
|
|
|
Oh, i have missed a lot of post replies..
Actually, I have to code an SPLITTER in Natural language which will take an Big PS Flat file as an Input (This is the STEP-3 File we are talking here) and will Split it into the segments of 65535 (As this is further going to get downloaded as an CSV).
Now, I have my Natural Code ready which will READ the Input file and depending upon the number of records, it will generate the Segments and based in the Segment count (Say 4) it will generate number of IDCAMS step (From Natural). Here, i have the Problem.
When i am writing the IDCAMS Steps using Natural, i need to pass the Infile to it. (However i am generating the outFile programmatically in Natural).
So, Thats the reason i have started this POST so that i can pass the Input Big PS file to Natural.
Also, as this is going to be an generic SPLITTER so the JCL what i have coded is a PROC (Where i will call my Natural Module). So, whatever Job, which creates the Big PS Files and requires an SPLIT will directly Include This PROC in their JCL and will only Provide their InFile name as an input to this PROC. (As i have given the example in my previous post as AAA.BBB).
Now i think i have made my exact requirement very clear :-) |
|
Back to top |
|
|
nemaji
New User
Joined: 29 May 2007 Posts: 22 Location: Pune
|
|
|
|
I have also triedf all the ways to Pass this Infile to Natural (Using PARM, STACK) but i am unable to do this. So, thought of other options like, can get the Infile name captured within the JCL (In just prior step to my natural) so that i could copy that to an Work File and then i can read the work file from natural in the next step and get this Infile value there. |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
You can invoke LISTALC directly from within Natural (Using the TSO example in the supplied example library).
If you decide to retrieve the dataset name in a separate step (prior to Natural), you can later pass the value using work file.
BTW - from my experience, Natural won't be the first choice for HUGE file processing, simply because it is interpreted. SORT would do a much quicker job.
O. |
|
Back to top |
|
|
Bill Dennis
Active Member
Joined: 17 Aug 2007 Posts: 562 Location: Iowa, USA
|
|
|
|
How about making the DSN be a symbolic and STEP5 can receive it as a PARM rather than read a file?
Code: |
//MYNAME SET DSNAME3=MY.DATASET.NAME
//STEP03 EXEC PGM=Whatever
//DDNAME DD DSN=&dsname3,DISP=(,CATLG,DELETE),
// ...... etc etc
//STEP05 EXEC PGM=Whatever2,PARM='&dsname3' |
|
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Also, please remember that most IDCAMS opreations can be specified with DDNAME, not just DSNAME.
O. |
|
Back to top |
|
|
nemaji
New User
Joined: 29 May 2007 Posts: 22 Location: Pune
|
|
|
|
Thanks a lot Peter,expat,Dick,MBabu,ofer71,Bill ..
I have got this issue resolved.. Thanks 4 your help.. |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Well it would be nice to tell us your solution.
Everybody wants to know of course if his/her input was part of it. |
|
Back to top |
|
|
|