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

Initiliza a few fields of a Vsam using sort


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

New User


Joined: 22 Jun 2006
Posts: 44

PostPosted: Fri Feb 09, 2007 1:11 pm
Reply with quote

I have a requirement to intilize two fileds CHAR, nad PACKED DECIMAL.
Would someone please assist on this..
Back to top
View user's profile Send private message
manihcl85
Warnings : 1

New User


Joined: 11 Jan 2007
Posts: 52
Location: chennai

PostPosted: Fri Feb 09, 2007 2:06 pm
Reply with quote

Hi,

can u give in brief what ur actual requirment was.

Regards,
Mani
Back to top
View user's profile Send private message
rkprasanth_m

New User


Joined: 22 Jun 2006
Posts: 44

PostPosted: Fri Feb 09, 2007 5:31 pm
Reply with quote

My requirement is I have added 2 new fields x(02) and S9(03)v99 comp-3. I will ahve to intilize all these fields using a quick batch program, probable using SORT statements.

So I want those sort statements..and sytex if possable
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 Feb 09, 2007 10:01 pm
Reply with quote

Initialize to what? What is the starting position of each field? Are the VSAM record fixed length or variable length?
Back to top
View user's profile Send private message
rkprasanth_m

New User


Joined: 22 Jun 2006
Posts: 44

PostPosted: Tue Feb 13, 2007 4:46 pm
Reply with quote

It's a variable length VSAM.

Starting position of field 1 = 452, length = 2, PIC X(02)
Startign position of field 2 = 454, length = 3, PIC S999v99 comp-3

And Condition is (starting position = 39, length = 2, PIC X(02)) = '10'

The above two fields Occurs 5 times

Thanks..
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: Tue Feb 13, 2007 9:58 pm
Reply with quote

It's still not clear what you want to do which makes it difficult to help you.

What is the "condition" used for? Do you only want to initialize fields in records with that condition, or do you want to use the condition for something else.

You still haven't told us what values you want to use to initialize field1 and field2. Do you want to initialize field1 to '00' or spaces or what? Do you want to initialize field2 to PD 0 or something else?

What do you mean by "the above two fields occurs 5 times"? Do field1 and field2 occur 5 times in each record starting at position 452 or what?
Back to top
View user's profile Send private message
rkprasanth_m

New User


Joined: 22 Jun 2006
Posts: 44

PostPosted: Tue Feb 13, 2007 10:24 pm
Reply with quote

Please find below my answers

It's a variable length VSAM.

Starting position of field 1 = 452, length = 2, PIC X(02)
Wanted to initialize to SPACES
Startign position of field 2 = 454, length = 3, PIC S999v99 comp-3
Wanted to initialize to ZEROS
And Condition is (starting position = 39, length = 2, PIC X(02)) = '10'
Only I wanted to initialize the fields of a particular records which meets the condition above.
The above two fields Occurs 5 times
Above two fields comes under one group which occurs 5 times.

One more quistion..I haven't added 4 bytes to starting positions, scince this is VSAM file, I doubt we may need to add 4 to starting position.

Thanks..
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: Tue Feb 13, 2007 10:47 pm
Reply with quote

Hello,

Please post some real data that currently exists and show what you want the result to look like. You need to specify the starting position of each of the fields you want to initialize - all 10 of them.
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: Tue Feb 13, 2007 11:34 pm
Reply with quote

rkprasanth_m,

If I understand correctly what you want to do, then this DFSORT job will do what you asked for. Since this is a variable-length VSAM file, you must add +4 to the starting positions and specify TYPE=V.

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (VSAM V)
//SORTOUT DD DSN=...  output file
//SYSIN    DD    *
  RECORD TYPE=V
  OPTION COPY
  INREC IFTHEN=(WHEN=(43,2,CH,EQ,C'10'),
    OVERLAY=(456:5X'404000000C'))
/*
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 Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top