Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Add a value to a symbolic constant where it defines a offset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
jzhardy

New User


Joined: 31 Oct 2006
Posts: 31
Location: brisbane

PostPosted: Thu Nov 02, 2006 11:06 am    Post subject: Add a value to a symbolic constant where it defines a offset
Reply with quote

two questions (looked thru the tutorial guides, but could not find any helpful examples) -

1. Is it possible to add a value to a symbolic constant where it defines an offset


eg, instead of

OVERLAY=(49:f1_c_w) ...

I would prefer (for readability) something that achieves :

OVERLAY=((f2_c+5):f1_c_w) ...


2. Suppose I have a file with a column for year (say at 10,4) defined as type char (YYYY). I want to add a constant to the year value where the record matches some criteria, but leave the result as CHAR.
how can this be done within an OVERLAY ?

eg -
....
IFTHEN=(WHEN=(44,1,CH,EQ,C'Z'),
OVERLAY= ???
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


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

PostPosted: Thu Nov 02, 2006 9:16 pm    Post subject:
Reply with quote

1. I'm not sure I understand what you're trying to do, but here's an example of using f2_c_p5 as a symbolic constant representing the position of f2_c + 5. Note that + is not allowed in symbols, so I used p5 (for plus 5) instead.

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SYMNAMES DD *
f1_c_w,5,8
f2_c,44
POSITION,f2_c
SKIP,5
f2_c_p5,*
/*
//SYMNOUT DD SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=...  output file
//SYSIN    DD    *
  OPTION COPY
  INREC OVERLAY=(f2_c_p5:f1_c_w)
/*


The INREC statement will be translated to:

Code:

  INREC OVERLAY=(49:5,8)


2. Just treat the 4-byte YYYY value as ZD.

Code:

   IFTHEN=(WHEN=(44,1,CH,EQ,C'Z'),
     OVERLAY=(10:10,4,ZD,ADD,+n,TO=ZD,LENGTH=4))


where +n is the constant (you must use +n and not n).
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Paasing symbolic parameter to instrea... Robert Sample JCL & VSAM 2 Thu Jul 27, 2017 1:22 pm
No new posts LISTCAT on a dataset with symbolic pa... shreya19 JCL & VSAM 5 Fri Apr 07, 2017 5:43 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm
No new posts INVALID FIELD OR CONSTANT IN SORTOF ?? Ron Klop DFSORT/ICETOOL 8 Wed Jan 11, 2017 3:44 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us