View previous topic :: View next topic
|
Author |
Message |
Sysaron
New User
Joined: 28 Sep 2005 Posts: 55 Location: USA
|
|
|
|
Could anyone please help me setup ICEMAN or DFSORT to change a value in a column based on what is in the 'parm card'? Even if I have to concat the parm to the SORTIN. Thank you for any advice you can give.
Code: |
Parm
05200 KKK 000 -03 -02 -01 0000000000000 |
Input
Code: |
SERVER.100.1100
Someones_password
CD /NewDirectory
PUT 'SYSXX.SOMTHING.DATA1’ THEIRQQQ.SOMETHING1.txt
PUT 'SYSXX.SOMTHING.DATA2’ THEIRQQQ.SOMETHING2.txt
PUT 'SYSXX.SOMTHING.DATA3’ THEIRQQQ.SOMETHING3.txt
Dir
QUIT |
Output
Code: |
SERVER.100.1100
Someones_password
CD /NewDirectory
PUT 'SYSXX.SOMTHING.DATA1’ THEIR333.SOMETHING1.txt
PUT 'SYSXX.SOMTHING.DATA2’ THEIR333.SOMETHING2.txt
PUT 'SYSXX.SOMTHING.DATA3’ THEIR333.SOMETHING3.txt
Dir
QUIT |
Problematic Sort Cards
Code: |
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=(8,3,CH,EQ,C'KKK')),
OUTREC OVERLAY=(WHEN=(47,3,EQ,C'QQQ')),
BUILD=(47,3,C'333') |
Code'd for you this time |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3048 Location: NYC,USA
|
|
|
|
You have been here for 11 years and don't know how to make use of code tags? I have done it and see now how easy for everyone it is to understand it, please make a hobbit of using BB codes next time. |
|
Back to top |
|
|
Sysaron
New User
Joined: 28 Sep 2005 Posts: 55 Location: USA
|
|
|
|
Yes, you are right Rohit.
Code: |
Next time I will do that |
|
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3048 Location: NYC,USA
|
|
|
|
If 'KKK' is in the parm then you wanted '333' at the final SORTOUT and input dataset already have 'QQQ' in it ,right then why do you need OVERLAY for 'QQQ'? |
|
Back to top |
|
|
magesh23586
Active User
Joined: 06 Jul 2009 Posts: 213 Location: Chennai
|
|
|
|
Sysaron
Your parm doesn't have any 333 value.
How did you get the output updated with 333.
Code: |
PUT 'SYSXX.SOMTHING.DATA1’ THEIR333.SOMETHING1.txt
PUT 'SYSXX.SOMTHING.DATA2’ THEIR333.SOMETHING2.txt
PUT 'SYSXX.SOMTHING.DATA3’ THEIR333.SOMETHING3.txt
|
You have to tell us what has to be reflected in the output from the parm. |
|
Back to top |
|
|
Sysaron
New User
Joined: 28 Sep 2005 Posts: 55 Location: USA
|
|
|
|
Hi Magesh,
The parm with KKK is used for many many other jobs, so it needs to stay KKK.
But if it is used with this DFSORT (that I am trying to create), I would like the Sortin QQQ in column 47 to be replaced with 333 in column 47 in the Sortout file.
Other times the parm will have FFF and the QQQ will be replaced with 686 (in another job with other sort cards).
Thanks for your help! |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2010 Location: USA
|
|
|
|
1. This code
Code: |
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=(8,3,CH,EQ,C'KKK')),
OUTREC OVERLAY=(WHEN=(47,3,EQ,C'QQQ')),
BUILD=(47,3,C'333') |
would cause SYNTAX ERROR, and it is senseless.
Please clarify more clearly the roles of KKK, QQQ, and 333?
2. Parameters for SORT can be passed as follows
Code: |
//PARMSORT EXEC PGM=SORT,PARM='JP1"KKK",JP2"QQQ",JP3"333"'
//SYSOUT DD SYSOUT=*
//SYMNOUT DD SYSOUT=*
//SORTIN DD . . . . . . . . .
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=(8,3,CH,EQ,JP1)),
OUTREC OVERLAY=(WHEN=(47,3,EQ,JP2)),
BUILD=(47,3,JP3)
|
but the statements under SYSIN DD * are absolutely senseless from SORT syntax point of view... |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3048 Location: NYC,USA
|
|
|
|
Right, JP2 should be '333' and there is not need of JP3. |
|
Back to top |
|
|
Sysaron
New User
Joined: 28 Sep 2005 Posts: 55 Location: USA
|
|
|
|
Yes, they are senseless. But I believe I can do something with what you suggested.
I just have to figure a way to put that 'parm=' coding into a dataset that I can change the parm literals with each run, so I don't need to keep re-implementing the JCL every time I need to change the parm values.
Thanks for your help. |
|
Back to top |
|
|
Sysaron
New User
Joined: 28 Sep 2005 Posts: 55 Location: USA
|
|
|
|
I guess the best way to explain is that JP1 and JP3 are variable with every job run. |
|
Back to top |
|
|
mistah kurtz
Active User
Joined: 28 Jan 2012 Posts: 316 Location: Room: TREE(3). Hilbert's Hotel
|
|
|
|
Quote: |
I just have to figure a way to put that 'parm=' coding into a dataset |
You can use SYMNAMES for that. Check this link. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2010 Location: USA
|
|
|
|
mistah kurtz wrote: |
Quote: |
I just have to figure a way to put that 'parm=' coding into a dataset |
You can use SYMNAMES for that. Check this link. |
SYMNAMES does not support JCL parameters as required. |
|
Back to top |
|
|
mistah kurtz
Active User
Joined: 28 Jan 2012 Posts: 316 Location: Room: TREE(3). Hilbert's Hotel
|
|
|
|
What I was thinking that the TS can follow a two steps solution. In first step build the SYMBOLS, using the parm data and then in next step use that as needed. |
|
Back to top |
|
|
Sysaron
New User
Joined: 28 Sep 2005 Posts: 55 Location: USA
|
|
|
|
YES Mistah!
That will work Perfectly!
Thanks again so much for your assistance everyone |
|
Back to top |
|
|
|