IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Can we change the parm card


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Venkata Ramayya

New User


Joined: 03 Dec 2007
Posts: 49
Location: United States

PostPosted: Thu Dec 06, 2007 10:08 pm
Reply with quote

I have two parm cards

Parm card 1 - *
*
97 - 3rd record

Parm card 2 - DEMAND,JOB=AAAAAAAA,SCHID=99
/LOGOFF

I have to keep '97' from the Parm card 1 to the postion of '99' in the Parm card 2.

Output of Parm card 2 should be

DEMAND,JOB=AAAAAAAA,SCHID=97
/LOGOFF

Thanks
Venkat
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Dec 07, 2007 12:24 am
Reply with quote

Hello Venkat and welcome to the forums,

Is this a sort question?

Please post some(?) of your actual input records and the output you want from the posted input.

Please also include the recfm and lrecl of the file(s).

A more clear definition of your requirement will also work in your favor.
Back to top
View user's profile Send private message
Venkata Ramayya

New User


Joined: 03 Dec 2007
Posts: 49
Location: United States

PostPosted: Fri Dec 07, 2007 12:47 am
Reply with quote

Thanks for quick response.

I do not say it is a sort question. How can we go without program?

Parm card 1 - it is a member of dataset, the value on 11th row varies based on special case. I need to take this value '97' from 11th row of the Parm card 1 and keep in Parm card 2

0004 * SCHID VALUE SPECIAL CASE
0005 * ----------- ------------
0006 * 97
0007 *
0008 * 98
0009 *
0010 *---+----1----+----2----+----3----+----4----+----5----+----6----+----
0011 97

Parm card 2 -
000001 DEMAND,JOB=XXXXXXXX,SCHID=99
000002 /LOGOFF

Please note Parm card 1 and 2 are members of PDS. I should update the Parm card 2 as
000001 DEMAND,JOB=XXXXXXXX,SCHID=97
000002 /LOGOFF

Can we input Parm card 1 and 2 to some utility and update Parm card2?

Thanks
Venkat
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Dec 07, 2007 1:43 am
Reply with quote

Hello,

Quote:
I do not say it is a sort question
Posting the question in DFSORT/ICETOOL implies a sort question.

Quote:
How can we go without program?
Even without a program, there will still have to be jcl and documentation and probably the process "promoted" to production.

How often will this process be done? Will parm card 1 and parm card 2 always have the same number of lines? Will there ever be more than one value to (i.e. 97) work with? Will the values always be in the same positions in the line?

As we learn more about what your requirement really is, we may have more questions.
Back to top
View user's profile Send private message
Venkata Ramayya

New User


Joined: 03 Dec 2007
Posts: 49
Location: United States

PostPosted: Fri Dec 07, 2007 2:14 am
Reply with quote

Posting the question in DFSORT/ICETOOL implies a sort question.- As I am the new user so I did not know this.

This process is done for every quater.
Yes, Parm card 1 and 2 have same number of lines always. In the parm card 1 can have two values either 97 or 98 in the same position (11th row, column 1 and 2). The value in the parm card 1 would be entered by the user for every quarter.

Whenver the use enters the value(97 or 98) that value should be reflected on parm card 2
000001 DEMAND,JOB=XXXXXXXX,SCHID=97
000002 /LOGOFF

Thanks
Venkat
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Dec 07, 2007 3:53 am
Reply with quote

Venkat,

You can use a DFSORT job like the following to do what you asked for. I assumed the value in parm card 1 you want is in positions 1-2 of the 11th record. I assumed the value you want to replace in parm card 2 is in positions 27-28 of the record with 'SCHID=' starting in position 21. You can change the job as needed.

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=userid.pds(m1),DISP=SHR
//SORTOUT DD DSN=&&S1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//SYSIN    DD    *
  OPTION COPY,SKIPREC=10
  OUTREC BUILD=(C'TARG,''',1,2,C'''',80:X)
/*
//S2    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)
//SORTIN DD DSN=userid.pds(m2),DISP=SHR
//SORTOUT DD DSN=userid.pds(m3),DISP=OLD
//SYSIN    DD    *
  OPTION COPY
  INREC IFTHEN=(WHEN=(21,6,CH,EQ,C'=SCHID'),OVERLAY=(27:TARG))
/*
Back to top
View user's profile Send private message
Venkata Ramayya

New User


Joined: 03 Dec 2007
Posts: 49
Location: United States

PostPosted: Sat Dec 08, 2007 12:25 am
Reply with quote

Hi Frank,

It worked out. Thanks a lot!!

I have one question in the first step

OUTREC BUILD=(C'TARG,''',1,2,C'''',80:X).
Can you please explain me the each parameter in the above syntax?

Thanks
Venkat
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Sat Dec 08, 2007 12:38 am
Reply with quote

Code:

   OUTREC BUILD=(C'TARG,''',1,2,C'''',80:X).


This OUTREC statement builds an 80-byte DFSORT Symbol record of the form:

TARG,'xx'

C'TARG,''' - builds a constant of TARG, and a starting apostrophe -> TARG,' -> Note that we need '' to get ' inside the character constant.

1,2 - copies the characters from input positions 1-2 (e.g. 97)

C'''' - builds the ending apostrophe

80:X - pads with blanks from after the ending apostrophe up to and including position 80 (gives us an 80-byte record).

If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

Use [URL] BBCode for External Links
Back to top
View user's profile Send private message
Venkata Ramayya

New User


Joined: 03 Dec 2007
Posts: 49
Location: United States

PostPosted: Sat Dec 08, 2007 12:56 am
Reply with quote

Frank,

Thanks for great explanation and suggestion too.

Thanks
Venkat
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Sat Dec 08, 2007 1:47 am
Reply with quote

Glad I could help.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Binary File format getting change whi... All Other Mainframe Topics 7
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts JCL EXEC PARM data in C Java & MQSeries 2
No new posts Need to specify PARM='POSIX(ON) Java & MQSeries 4
No new posts How to pass the PARM value to my targ... COBOL Programming 8
Search our Forums:

Back to Top