Parameter getting truncated using stanzaget


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Parameter getting truncated using stanzaget
# 1  
Old 03-22-2015
Linux Parameter getting truncated using stanzaget

Hi,

My script reading parameters from a parameter file using stanzaget. (runs on ksh).

One of the paramter is collection of unique numbers separated by comma and it is lengthy.

Parameter file looks as below,

Code:
GLOBAL:
           ACTIVE_STORES = 00001,00002, ----- up to 01000

wc -c gives result 6000 (1000 5 digit stores separated by comma and a space in beginning)

In script, below expression is executed,
Code:
'stanza get "paramet file" GLOBAL ACTIVE_STORES'

ACTIVE_STORES variable has value from 00001 .... up to 00166,001

wc -c gives result of 1000

My question are,
Why only 1000 characters?
What limits the parameter length reading from a file?
What is the maximum length of string constant?
Which limit i can refer in getconf?

Please suggest what is the better way to read complete store numbers from parameter file.


Thanks,
Gajendra

Last edited by Don Cragun; 03-22-2015 at 03:35 AM.. Reason: Add CODE and ICODE tags.
# 2  
Old 03-22-2015
The stanzaget utility is not mentioned in the standards, and (from the man pages on this site) doesn't appear to be provided by default on any UNIX or Linux system.

So, assuming you (or someone at your site) downloaded and installed stanzaget, what does the documentation for stanzaget say its limits are when reading data from a file?

Many text processing utilities will only be able to process text files. By definition, a text file has lines that contain no more than LINE_MAX bytes (a value that you can determine on your system using the command getconf LINE_MAX). On most systems, LINE_MAX will be 2048; so a line in your configuration file that is 6001 (or more) bytes long (including the terminating <newline> character) means that that configuration file is NOT a text file.

If stanzaget limits line lengths to 1000 bytes instead of LINE_MAX bytes, use a different tool to process your configuration file. Or change your configuration file to contain values that are no longer than LINE_MAX (or whatever limit stanzaget imposes).

Why do you need a configuration variable that contains a list of 1000 5 digit numbers? Why doesn't you configuration contain a minimum value and a maximum value and let software generate the list of numbers it needs to process that those two values?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Ps -ef, output getting truncated, please help

Hi All, here is an output of my command and the problem is that my output string is truncated, I want to exact the full string, I am on BASH shell, please help me out. Regards Rahul command with Output : lonss05903:cmdsvc01 /home/cmdsvc01 > ps -aef|grep 'Copy' cmdsvc01 2642 8675 ... (7 Replies)
Discussion started by: rahulkalra9
7 Replies

2. Solaris

ps output truncated

Hi, I have Solaris-10 server. /usr/ucb/ps auxww is showing full path if I am running it from root. But if I run it from non-root user, its output is truncated. I don't want to use any other alternate command. Please suggest, what can be its solution. Terminal is set to term. (21 Replies)
Discussion started by: solaris_1977
21 Replies

3. Shell Programming and Scripting

stanzaget use ??

Hi, Can anyone tell me what does the following code actually does?? $x = `u\bin\stanzaget u\bin\store.cfg store site`; chomp $x; Thanks, Sur (0 Replies)
Discussion started by: prachisurabhi
0 Replies

4. Shell Programming and Scripting

doubt in stanzaget

can u tell me as what the following code does: x="$(/u/bin/stanzaget $GDS_CONFIG_DIR/runaway_check.cfg $1 $2)" if ; then RET_VAL=$x thanks in advance! (2 Replies)
Discussion started by: pravfraz
2 Replies

5. UNIX for Dummies Questions & Answers

File gets truncated

Hi Guys, I have a master script file. That calls the other script files. The sub script files append some of the data to the log file. Once the master script completes one sub script execution and returns to execute other sub script that appends to the same log file. the log file gets... (2 Replies)
Discussion started by: Swapna173
2 Replies

6. Shell Programming and Scripting

Truncated with a pipe?

OK, I'm stumped. I have a shell script that reads a list, and for every item in the list performs a lookup in our Active Directory. Now, it seems that when I pipe the results into grep, the complete results are not there (truncated?). I'm not sure if this is a limit of the pipe, grep, shell... (1 Reply)
Discussion started by: TheCrunge
1 Replies

7. AIX

PS truncated in AIX

folks; how can i get longer output than the one i got by using "/usr/ucb/ps awwx"? :mad: (2 Replies)
Discussion started by: moe2266
2 Replies

8. Solaris

ps truncated output

Hi Problem of ps on Solaris 8 and 9 Perhaps a silly question but I can't find a solution. the output of the command ps -ef is truncated. I've tried to change the terminal settings with stty putting a big number of colums: no change. Following the man page of ps i have set the variable... (8 Replies)
Discussion started by: renoc
8 Replies

9. UNIX for Advanced & Expert Users

ps output truncated

Hi! I have some shell scripts receiving in input lots of parameters and I need to select the ones having a particular value in one parameter. A typical shell command line is: PROMPT > shell_name.ksh -avalue_a -bvalue_b -cvalue_c -dvalue_d ... I used a combinaton of ps and grep commands... (5 Replies)
Discussion started by: pciatto
5 Replies

10. Shell Programming and Scripting

ps output truncated

Hi! I have some shell scripts receiving in input lots of parameters and I need to select the ones having a particular value in one parameter. A typical shell command line is: PROMPT > shell_name.ksh -avalue_a -bvalue_b -cvalue_c -dvalue_d ... I used a combinaton of ps and grep commands... (1 Reply)
Discussion started by: pciatto
1 Replies
Login or Register to Ask a Question